class PrismaVectorStoreA specific implementation of the VectorStore class that is designed to work with Prisma. It provides methods for adding models, documents, and vectors, as well as for performing similarity searches.
Embeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
When true, addDocuments uses INSERT statements to create new records. When false (default), addDocuments uses UPDATE statements to update existing records by ID. Set to true when using with ParentDocumentRetriever or when documents don't pre-exist in the database.
Returns a string representing the type of vector store, which subclasses must implement to identify their specific vector storage type.
Adds the specified documents to the store.
Adds documents with their corresponding vectors to the store using INSERT statements. This method ensures documents are created if they don't exist, making it compatible with ParentDocumentRetriever which creates new child documents.
Adds the specified models to the store.
Adds the specified vectors to the store.
Creates a VectorStoreRetriever instance with flexible configuration options.
Deletes documents from the vector store based on the specified parameters.
Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Performs a similarity search with the specified query.
Performs a similarity search with the specified vector and returns the results along with their scores.
Performs a similarity search with the specified query and returns the results along with their scores.
Creates a new PrismaVectorStore from the specified documents.
Creates a new PrismaVectorStore from the specified texts.
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.
Creates a new PrismaVectorStore with the specified model.