class UpstashVectorStoreThe main class that extends the 'VectorStore' class. It provides methods for interacting with Upstash index, such as adding documents, deleting documents, performing similarity search and more.
Embeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
This method adds the provided documents to Upstash database. The pageContent of the documents will be embedded by Upstash Embeddings.
Returns a string representing the type of vector store, which subclasses must implement to identify their specific vector storage type.
This method adds documents to Upstash database. Documents are first converted to vectors using the provided embeddings instance, and then upserted to the database.
This method adds the provided vectors to Upstash database.
Creates a VectorStoreRetriever instance with flexible configuration options.
This method deletes documents from the Upstash database. You can either provide the target ids, or delete all vectors in the database.
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.
This method performs a similarity search in the Upstash database over the existing vectors.
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
This method creates a new UpstashVector instance from an array of Document instances.
This method creates a new UpstashVector instance from an existing index.
This method creates a new UpstashVector instance from an array of texts. The texts are initially converted to Document instances and added to Upstash database.
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.