Class PineconeEmbeddingStore
java.lang.Object
dev.langchain4j.store.embedding.pinecone.PineconeEmbeddingStore
- All Implemented Interfaces:
EmbeddingStore<TextSegment>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(Embedding embedding, TextSegment textSegment) voidaddAll(List<Embedding> embeddings, List<TextSegment> textSegments) builder()findRelevant(Embedding referenceEmbedding, int maxResults, double minScore) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.langchain4j.store.embedding.EmbeddingStore
findRelevant, findRelevant, findRelevant, search
-
Constructor Details
-
PineconeEmbeddingStore
public PineconeEmbeddingStore(String apiKey, String environment, String projectId, String index, String nameSpace, String metadataTextKey) Creates an instance of PineconeEmbeddingStore.- Parameters:
apiKey- The Pinecone API key.environment- The environment (e.g., "northamerica-northeast1-gcp").projectId- The ID of the project (e.g., "19a129b"). This is not a project name. The ID can be found in the Pinecone URL: https://app.pinecone.io/organizations/.../projects/...:{projectId}/indexes.index- The name of the index (e.g., "test").nameSpace- (Optional) Namespace. If not provided, "default" will be used.metadataTextKey- (Optional) The key to find the text in the metadata. If not provided, "text_segment" will be used.
-
-
Method Details
-
add
- Specified by:
addin interfaceEmbeddingStore<TextSegment>
-
add
- Specified by:
addin interfaceEmbeddingStore<TextSegment>
-
add
- Specified by:
addin interfaceEmbeddingStore<TextSegment>
-
addAll
- Specified by:
addAllin interfaceEmbeddingStore<TextSegment>
-
addAll
- Specified by:
addAllin interfaceEmbeddingStore<TextSegment>
-
findRelevant
public List<EmbeddingMatch<TextSegment>> findRelevant(Embedding referenceEmbedding, int maxResults, double minScore) - Specified by:
findRelevantin interfaceEmbeddingStore<TextSegment>
-
builder
-