PineconeEmbeddingStorageService
Wisej.AI.Services.PineconeEmbeddingStorageService
Last updated
Wisej.AI.Services.PineconeEmbeddingStorageService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Represents a service for storing and retrieving embeddings using Pinecone.
This class provides methods to store, retrieve, query, and remove embedded documents in a Pinecone vector database. It uses an HTTP client service to communicate with the Pinecone API.
Initializes a new instance of the class.
url
The URL of the Pinecone service. Default is null
.
: Gets or sets the API key for the Pinecone service. (Default: null
)
: Gets or sets the maximum batch size used to store document vectors into the database. (Default: 100
)
Checks if a document exists in the specified collection.
collectionName
The name of the collection.
documentName
The name of the document.
Retrieves the API key for the Pinecone service.
Queries the specified collection for documents similar to the given query vector.
collectionName
The name of the collection.
query
The query vector.
topN
The number of top similar documents to retrieve.
minSimilarity
The minimum similarity threshold.
An optional filter to apply to the documents. Default is null
.
Queries the specified collection for a document similar to the given query vector.
collectionName
The name of the collection.
documentName
The name of the document.
query
The query vector.
topN
The number of top similar documents to retrieve.
minSimilarity
The minimum similarity threshold.
Throws:
Removes documents from the specified collection that match the given filter.
collectionName
The name of the collection.
An optional filter to apply to the documents. Default is null
.
Removes a document from the specified collection.
collectionName
The name of the collection.
documentName
The name of the document.
Retrieves a document from the specified collection.
collectionName
The name of the collection.
documentName
The name of the document.
includeEmbedding
A value indicating whether to include the embedding in the result.
Retrieves documents from the specified collection that match the given filter.
collectionName
The name of the collection.
includeEmbedding
A value indicating whether to include the embedding in the result.
An optional filter to apply to the documents. Default is null
.
Stores a document in the specified collection.
collectionName
The name of the collection.
document
The document to store.
Throws:
Represents a service for storing and querying embedded documents within specified collections.
: Gets or sets the URL of the Pinecone service. (Default: null
)
Returns: . A task that represents the asynchronous operation. The task result contains a boolean indicating whether the document exists.
Returns: . The API key for the Pinecone service.
filter
Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.
Returns: . A task that represents the asynchronous operation. The task result contains an object.
Thrown when the document is null.
filter
Returns: . A task that represents the asynchronous operation.
Returns: . A task that represents the asynchronous operation.
Returns: . A task that represents the asynchronous operation. The task result contains an object.
filter
Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.
Returns: . A task that represents the asynchronous operation.
Thrown when the document is null
.