FileSystemEmbeddingStorageService
Wisej.AI.Services.FileSystemEmbeddingStorageService
Last updated
Wisej.AI.Services.FileSystemEmbeddingStorageService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Provides a file system-based implementation of the interface.
This service allows for storing, retrieving, querying, and removing embedded documents from a specified storage path in the file system. It uses JSON files to store metadata and embeddings for each document.
Initializes a new instance of .
: Gets or sets the storage path for embeddings. (Default: "~\AI\Embeddings"
)
Checks if a document exists in the specified collection.
collectionName
The name of the collection.
documentName
The name of the document.
Queries the collection for documents similar to the provided 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 predicate for documents. Default is null
.
Queries a specific document in the collection for similarity to the provided query vector.
collectionName
The name of the collection.
documentName
The name of the document.
query
The query vector.
topN
The number of top similar chunks to retrieve.
minSimilarity
The minimum similarity threshold.
Throws:
Removes documents from the specified collection that match the filter predicate.
collectionName
The name of the collection.
An optional filter predicate for documents. Default is null
.
Removes a specific document from the specified collection.
collectionName
The name of the collection.
documentName
The name of the document.
Retrieves a specific document from the specified 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 filter predicate.
collectionName
The name of the collection.
includeEmbedding
Indicates whether to include embeddings in the retrieved documents.
An optional filter predicate for 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.
Returns: . A task that represents the asynchronous operation. The task result contains a boolean indicating whether the document exists.
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 the with the top similar chunks.
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.