Optional
filter?: TFilterModelProtected
PrismaProtected
dbEmbeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Optional
filterProtected
selectProtected
tableProtected
vectorStatic
ContentStatic
IdAdds the specified documents to the store.
The documents to add.
A promise that resolves when the documents have been added.
Adds the specified models to the store.
The models to add.
A promise that resolves when the models have been added.
Adds the specified vectors to the store.
The vectors to add.
The documents associated with the vectors.
A promise that resolves when the vectors have been added.
Creates a VectorStoreRetriever
instance with flexible configuration options.
Optional
kOrFields: number | Partial<VectorStoreRetrieverInput<PrismaVectorStore<TModel, TModelName, TSelectModel, TFilterModel>>>If a number is provided, it sets the k
parameter (number of items to retrieve).
Optional
filter: TFilterModelOptional filter criteria to limit the items retrieved based on the specified filter type.
Optional
callbacks: CallbacksOptional callbacks that may be triggered at specific stages of the retrieval process.
Optional
tags: string[]Tags to categorize or label the VectorStoreRetriever
. Defaults to an empty array if not provided.
Optional
metadata: Record<string, unknown>Additional metadata as key-value pairs to add contextual information for the retrieval process.
Optional
verbose: booleanIf true
, enables detailed logging for the retrieval process. Defaults to false
.
VectorStoreRetriever
instance based on the provided parameters.Optional
filter: TFilterModelOptional
maxReturn documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Text to look up documents similar to.
Performs a similarity search with the specified query.
The query to use for the similarity search.
The number of results to return.
A promise that resolves with the search results.
Performs a similarity search with the specified vector and returns the results along with their scores.
The vector to use for the similarity search.
The number of results to return.
Optional
filter: TFilterModelThe filter to apply to the results.
A promise that resolves with the search results and their scores.
Performs a similarity search with the specified query and returns the results along with their scores.
The query to use for the similarity search.
Optional
k: numberThe number of results to return.
Optional
filter: TFilterModelThe filter to apply to the results.
A promise that resolves with the search results and their scores.
Static
fromCreates a new PrismaVectorStore from the specified documents.
The documents to use to create the store.
The embeddings to use.
The database configuration.
A promise that resolves with the new PrismaVectorStore.
Static
fromCreates a new PrismaVectorStore from the specified texts.
The texts to use to create the store.
The metadata for the texts.
The embeddings to use.
The database configuration.
A promise that resolves with the new PrismaVectorStore.
Static
withCreates a new PrismaVectorStore with the specified model.
The PrismaClient instance.
An object with create, fromTexts, and fromDocuments methods.
A 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.