Defines the filter type used in search and delete operations. Can be an object for structured conditions or a string for simpler filtering.
The ZepClient instance used to interact with Zep's API.
The Zep document collection.
Embeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Adds documents to the collection. The documents are first embedded into vectors using the provided embedding model.
The documents to add.
Adds vectors and corresponding documents to the collection.
The vectors to add.
The corresponding documents to add.
Creates a VectorStoreRetriever
instance with flexible configuration options.
Optional
kOrFields: number | Partial<VectorStoreRetrieverInput<ZepVectorStore>>If a number is provided, it sets the k
parameter (number of items to retrieve).
Optional
filter: string | objectOptional 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.Deletes documents from the collection.
The list of Zep document UUIDs to delete.
Return 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 on the Zep collection.
The query string to search for.
Optional
k: number = 4The number of results to return. Defaults to 4.
Optional
filter: string | object = undefinedAn optional set of JSONPath filters to apply to the search.
Optional
_callbacks: Callbacks = undefinedOptional callbacks. Currently not implemented.
Performs a similarity search in the collection and returns the results with their scores.
The query vector.
The number of results to return.
Optional
filter: Record<string, unknown>The filter to apply to the search. Zep only supports Record<string, unknown> as filter.
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
Text query for finding similar documents.
Number of similar results to return. Defaults to 4.
Optional filter based on FilterType
.
Optional callbacks for monitoring search progress
A promise resolving to an array of tuples, each containing a document and its similarity score.
Static
fromCreates a new ZepVectorStore instance from an array of Documents. Each Document is added to a Zep collection.
The Documents to add.
The embeddings to use for vectorizing the Document contents.
The configuration object for the Zep API.
Static
fromCreates a new ZepVectorStore instance from an array of texts. Each text is converted into a Document and added to the collection.
The texts to convert into Documents.
The metadata to associate with each Document. If an array is provided, each element is associated with the corresponding Document. If an object is provided, it is associated with all Documents.
The embeddings to use for vectorizing the texts.
The configuration object for the Zep API.
ZepVectorStore is a VectorStore implementation that uses the Zep long-term memory store as a backend.
If the collection does not exist, it will be created automatically.
Requires
zep-js
to be installed: