Skip to content

Commit

Permalink
Update docs-site/docs/03_components/01_core_abstractions.md
Browse files Browse the repository at this point in the history
Co-authored-by: Javier Toledo <[email protected]>
  • Loading branch information
juanjoman and javiertoledo authored Aug 31, 2023
1 parent 0575bbe commit f540ff5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs-site/docs/03_components/01_core_abstractions.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ EmbeddingsStore pineconeStore = new PineconeEmbeddingsStore("YOUR_PINECONE_URL",
// You can now insert, fetch, delete or perform similarity searches using the pineconeStore instance:
pineconeStore.store(someEmbedding);
List<Embedding> similarEmbeddings = pineconeStore.similaritySearch(referenceEmbedding, 5);
Embedding embedding = pineconeStore.get("my-uuid");
Embedding anotherEmbedding = pineconeStore.get("my-uuid", "my-namespace");
pineconeStore.delete("my-uuid");

// Get back an embedding by id without a namespace
UUID someEmbeddingId = someEmbedding.id()
Embedding embedding = pineconeStore.get(someEmbeddingId);

// Get a namespaced embedding by id
UUID anotherEmbeddingId = UUID.fromString("01870603-f211-7b9a-a7ea-4a98f5320ff8")
Embedding anotherEmbedding = pineconeStore.get(anotherEmbeddingId, "my-namespace");

// Delete an embedding by id
pineconeStore.delete(anotherEmbeddingId);
```

0 comments on commit f540ff5

Please sign in to comment.