class XataVectorSearchClass for interacting with a Xata database as a VectorStore. Provides methods to add documents and vectors to the database, delete entries, and perform similarity searches.
Embeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Returns a string representing the type of vector store, which subclasses must implement to identify their specific vector storage type.
Method to add documents to the Xata database. Maps the page content of each document, embeds the documents using the embeddings, and adds the vectors to the database.
Method to add vectors to the Xata database. Maps each vector to a row with the document's content, embedding, and metadata. Creates or replaces these rows in the Xata database.
Creates a VectorStoreRetriever instance with flexible configuration options.
Method to delete entries from the Xata database. Deletes the entries with the provided ids.
Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Searches for documents similar to a text query by embedding the query and performing a similarity search on the resulting vector.
Method to perform a similarity search in the Xata database. Returns the k most similar documents along with their scores.
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
Creates a VectorStore instance from an array of documents, using the specified
embeddings and database configuration.
Subclasses must implement this method to define how documents are embedded and stored. Throws an error if not overridden.
Creates a VectorStore instance from an array of text strings and optional
metadata, using the specified embeddings and database configuration.
Subclasses must implement this method to define how text and metadata are embedded and stored in the vector store. Throws an error if not overridden.
The name of the serializable. Override to provide an alias or to preserve the serialized module name in minified environments.
Implemented as a static method to support loading logic.