JVMFileVectorStorageBackend
A JVM-specific implementation of FileVectorStorageBackend for managing the storage of documents and associated vector embeddings on a file system.
This class utilizes a ai.koog.rag.base.files.JVMDocumentProvider along with a JVM-compatible ai.koog.rag.base.files.FileSystemProvider.ReadWrite to handle document operations and vector storage in a structured directory format. It uses a root directory as the base for storing documents and their associated embeddings in separate directories.
Use this class to persistently store and retrieve documents and their vector payloads to and from a file-based system in JVM environments.
Parameters
The root directory where all documents and vector embeddings will be stored.
Constructors
Initializes the JVMFileVectorStorageBackend with a specified root directory root.
Functions
Retrieves a flow of all documents.
Retrieves a flow of all documents with their vector embeddings.
Retrieves the vector payload associated with the document identified by the given document ID.
Reads a document along with its vector embedding by document ID.
Stores a document along with its pre-computed vector embedding.
Updates a document along with its pre-computed vector embedding under the specified ID. Only updates if a document with the given ID already exists.