LogoLogo
HomeNewsSupportVideos
  • Welcome
  • Wisej.NET
  • Concepts
    • Getting Started
    • General Concepts
    • Architecture
    • Extensibility
    • AI Providers
    • Vector Databases
    • Usage Metrics
    • Logging & Error Handling
  • Markup
  • Components
    • API
      • SmartAdapter
        • SmartAudioTTSAdapter
        • SmartAudioWhisperAdapter
        • SmartCalendarAdapter
        • SmartChartAdapter
        • SmartChartJS3Adapter
        • SmartChatBoxAdapter
        • SmartComboBoxAdapter
        • SmartCopilotAdapter
        • SmartDataEntryAdapter
        • SmartDocumentAdapter
        • SmartFullCalendarAdapter
        • SmartObjectAdapter
        • SmartPictureBoxAdapter
        • SmartQueryAdapter
        • SmartRealtimeAdapter
        • SmartReportAdapter
        • SmartTextBoxAdapter
        • SmartAdapter.ExtendsAttribute
        • SmartAdapter.FieldNameAttribute
        • SmartAdapter.FieldPromptAttribute
        • SmartAdapter.FieldRectangleAttribute
        • SmartAdapter.WorksWithAttribute
      • SmartEndpoint
        • AmazonBedrockEndpoint
        • AnthropicEndpoint
        • AzureAIEndpoint
        • CerebrasEndpoint
        • DeepSeekEndpoint
        • GoogleAIEndpoint
        • GroqCloudEndpoint
        • GroqCloudEndpointWhisper
        • HuggingFaceEndpoint
        • HuggingFaceJavaScriptEndpoint
        • LocalAIEndpoint
        • LocalAIEndpointImageGen
        • LocalAIEndpointTTS
        • LocalAIEndpointWhisper
        • NvidiaAIEndpoint
        • OllamaEndpoint
        • OpenAIEndpoint
        • OpenAIEndpointDallE
        • OpenAIEndpointRealtime
        • OpenAIEndpointTTS
        • OpenAIEndpointWhisper
        • SambaNovaEndpoint
        • SmartHttpEndpoint
        • TogetherAIEndpoint
        • XAIEndpoint
        • SmartEndpoint.Metrics
        • SmartEndpoint.Response
      • SmartExtensions
      • SmartHub
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartObject
      • SmartPrompt
        • SmartAgentPrompt
        • SmartParallelPrompt
        • SmartPrompt.Parameter
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
      • SmartRealtimeSession
      • SmartSession
        • SmartSession.ConvertParameterEventArgs
        • SmartSession.ConvertParameterEventHandler
        • SmartSession.ErrorEventArgs
        • SmartSession.ErrorEventHandler
        • SmartSession.InvokeToolEventArgs
        • SmartSession.InvokeToolEventHandler
        • SmartSession.Message
        • SmartSession.MessageCollection
        • SmartSession.MessageRole
        • SmartSession.MessagesEventArgs
        • SmartSession.MessagesEventHandler
        • SmartSession.TrimmingStrategy
      • SmartTool
        • SmartTool.IToolProvider
        • SmartTool.ToolAttribute
        • SmartTool.ToolContext
      • Markup
        • MarkupExtensions
      • Controls
        • UVLightOverlay
      • Embeddings
        • EmbeddedDocument
        • Embedding
        • Matches
        • Metadata
      • Helpers
        • ApiKeys
        • Markdown
        • TextTokenizer
      • Services
        • DefaultSessionTrimmingService
        • IDocumentConversionService
          • DefaultDocumentConversionService
        • IEmbeddingGenerationService
          • DefaultEmbeddingGenerationService
          • HuggingFaceEmbeddingGenerationService
        • IEmbeddingStorageService
          • AzureAISearchEmbeddingStorageService
          • ChromaEmbeddingStorageService
          • FileSystemEmbeddingStorageService
          • MemoryEmbeddingStorageService
          • PineconeEmbeddingStorageService
          • QdrantEmbeddingStorageService
        • IHttpClientService
          • DefaultHttpClientService
        • ILoggerService
          • DefaultLoggerService
        • IOCRService
          • DefaultOCRService
        • IRerankingService
          • DefaultRerankingService
          • LocalAIRerankingService
          • PineconeRerankingService
        • ISessionTrimmingService
          • DefaultSessionTrimmingService
        • ITextSplitterService
          • RecursiveCharacterTextSplitterService
          • TextSplitterServiceBase
        • ITokenizerService
          • DefaultTokenizerService
        • IWebSearchService
          • BingWebSearchService
          • BraveWebSearchService
          • GoogleWebSearchService
      • Tools
        • ArxivTools
        • ChartJS3Tools
        • DatabaseTools
        • DataTableFilterTools
        • DocumentSearchTools
        • DocumentTools
        • FullCalendarTools
        • IToolsContainer
        • MathTools
        • ToolsContainer
        • UtilityTools
        • WebSearchTools
    • Built-in Services
      • IOCRService
      • ILoggerService
      • ITextSplitterService
      • ITokenizerService
      • IHttpClientService
      • IWebSearchService
      • IRerankingService
      • ISessionTrimmingService
      • IDocumentConversionService
      • IEmbeddingStorageService
      • IEmbeddingGenerationService
    • Built-in SmartTools
      • ToolsContainer
      • MathTools
      • UtilityTools
      • DatabaseTools
      • DocumentTools
      • DocumentSearchTools
      • WebSearchTools
      • ChartJS3Tools
      • FullCalendarTools
    • Built-in SmartAdapters
      • SmartAdapter
      • SmartAudioTTSAdapter
      • SmartAudioWhisperAdapter
      • SmartCalendarAdapter
      • SmartChartAdapter
      • SmartChartJS3Adapter
      • SmartChatBoxAdapter
      • SmartComboBoxAdapter
      • SmartCopilotAdapter
      • SmartDataEntryAdapter
      • SmartDocumentAdapter
      • SmartFullCalendarAdapter
      • SmartObjectAdapter
      • SmartPictureBoxAdapter
      • SmartQueryAdapter
      • SmartRealtimeAdapter
      • SmartReportAdapter
      • SmartTextBoxAdapter
    • Configure Services
    • Using SmartHub
    • Using SmartTools
    • Using SmartPrompt
    • Using SmartSession
    • Using SmartRealTimeAdapter
    • UVLightOverlay Control
Powered by GitBook
On this page
  • Constructors
  • FileSystemEmbeddingStorageService()
  • Properties
  • StoragePath
  • Methods
  • ExistsAsync(collectionName, documentName)
  • QueryAsync(collectionName, query, topN, minSimilarity, filter)
  • QueryAsync(collectionName, documentName, query, topN, minSimilarity)
  • RemoveAsync(collectionName, filter)
  • RemoveAsync(collectionName, documentName)
  • RetrieveAsync(collectionName, documentName, includeEmbedding)
  • RetrieveAsync(collectionName, includeEmbedding, filter)
  • StoreAsync(collectionName, document)
  • Implements
Export as PDF
  1. Components
  2. API
  3. Services
  4. IEmbeddingStorageService

FileSystemEmbeddingStorageService

Wisej.AI.Services.FileSystemEmbeddingStorageService

PreviousChromaEmbeddingStorageServiceNextMemoryEmbeddingStorageService

Last updated 5 days ago

Namespace: Wisej.AI.Services

Assembly: Wisej.AI (3.5.0.0)

Provides a file system-based implementation of the interface.

public class FileSystemEmbeddingStorageService : IEmbeddingStorageService
Public Class FileSystemEmbeddingStorageService
    Inherits IEmbeddingStorageService

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.

Constructors

FileSystemEmbeddingStorageService()

Initializes a new instance of .

Properties

StoragePath

: Gets or sets the storage path for embeddings. (Default: "~\AI\Embeddings")

Methods

ExistsAsync(collectionName, documentName)

Checks if a document exists in the specified collection.

Parameter
Type
Description

collectionName

The name of the collection.

documentName

The name of the document.

Queries the collection for documents similar to the provided query vector.

Parameter
Type
Description

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.

Parameter
Type
Description

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.

Parameter
Type
Description

collectionName

The name of the collection.

An optional filter predicate for documents. Default is null.

Removes a specific document from the specified collection.

Parameter
Type
Description

collectionName

The name of the collection.

documentName

The name of the document.

Retrieves a specific document from the specified collection.

Parameter
Type
Description

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.

Parameter
Type
Description

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.

Parameter
Type
Description

collectionName

The name of the collection.

document

The document to store.

Throws:

Implements

Name
Description

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.

QueryAsync(collectionName, query, topN, minSimilarity, filter)

filter

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

QueryAsync(collectionName, documentName, query, topN, minSimilarity)

Returns: . A task that represents the asynchronous operation. The task result contains the with the top similar chunks.

Thrown when the document is null.

RemoveAsync(collectionName, filter)

filter

Returns: . A task that represents the asynchronous operation.

RemoveAsync(collectionName, documentName)

Returns: . A task that represents the asynchronous operation.

RetrieveAsync(collectionName, documentName, includeEmbedding)

Returns: . A task that represents the asynchronous operation. The task result contains the .

RetrieveAsync(collectionName, includeEmbedding, filter)

filter

Returns: . A task that represents the asynchronous operation. The task result contains an array of objects.

StoreAsync(collectionName, document)

Returns: . A task that represents the asynchronous operation.

Thrown when the document is null.

Task<Boolean>
Task<EmbeddedDocument[]>
EmbeddedDocument
Task<EmbeddedDocument>
EmbeddedDocument
ArgumentNullException
Task
Task
Task<EmbeddedDocument>
EmbeddedDocument
Task<EmbeddedDocument[]>
EmbeddedDocument
Task
ArgumentNullException
String
String
String
Single[]
Int32
Single
Predicate<EmbeddedDocument>
String
String
Single[]
Int32
Single
String
Predicate<EmbeddedDocument>
String
String
String
String
Boolean
String
Boolean
Predicate<EmbeddedDocument>
String
EmbeddedDocument
IEmbeddingStorageService
IEmbeddingStorageService
FileSystemEmbeddingStorageService
String