ChromaEmbeddingStorageService
Wisej.AI.Services.ChromaEmbeddingStorageService
Last updated
Wisej.AI.Services.ChromaEmbeddingStorageService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Represents a service for storing and retrieving embeddings using Chroma.
This class provides methods to store, retrieve, query, and remove embedded documents in a Chroma vector database. It uses an HTTP client service to communicate with the Chroma API.
Initializes a new instance of the class.
url
The URL of the Chroma service. Default is null
.
: Gets or sets the API key for the Chroma service. (Default: null
)
: Gets or sets the Authentication method for the Chroma service. (Default: null
)
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 Chroma service.
Queries the specified collection for documents similar to the provided query vector.
collectionName
The name of the collection.
query
The query vector to compare against.
topN
The number of top similar documents to return.
minSimilarity
The minimum similarity threshold for documents to be considered.
An optional filter predicate to apply to 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 predicate to apply to documents. Default is null.
Removes a specific document from the collection.
collectionName
The name of the collection.
documentName
The name of the document.
Retrieves a specific document from the collection.
collectionName
The name of the collection.
documentName
The name of the document.
includeEmbedding
Indicates whether to include the embedding in the retrieved document.
Retrieves all documents from the specified collection that match the given filter.
collectionName
The name of the collection.
includeEmbedding
Indicates whether to include the embedding in the retrieved documents.
An optional filter predicate to apply to 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 Chroma 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 Chroma 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 the .
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.