ZepVectorStore#
- class llama_index.vector_stores.ZepVectorStore(collection_name: str, api_url: str, api_key: Optional[str] = None, collection_description: Optional[str] = None, collection_metadata: Optional[Dict[str, Any]] = None, embedding_dimensions: Optional[int] = None, is_auto_embedded: bool = False, **kwargs: Any)#
Bases:
VectorStore
Zep Vector Store for storing and retrieving embeddings.
Zep supports both normalized and non-normalized embeddings. Cosine similarity is used to compute distance and the returned score is normalized to be between 0 and 1.
- Parameters
collection_name (str) โ Name of the Zep collection in which to store embeddings.
api_url (str) โ URL of the Zep API.
api_key (str, optional) โ Key for the Zep API. Defaults to None.
collection_description (str, optional) โ Description of the collection. Defaults to None.
collection_metadata (dict, optional) โ Metadata of the collection. Defaults to None.
embedding_dimensions (int, optional) โ Dimensions of the embeddings. Defaults to None.
is_auto_embedded (bool, optional) โ Whether the embeddings are auto-embedded. Defaults to False.
Attributes Summary
Get client.
Methods Summary
add
(nodes, **add_kwargs)Add nodes to the collection.
adelete
([ref_doc_id])Asynchronously delete a document from the collection.
aquery
(query, **kwargs)Asynchronously query the index for the top k most similar nodes to the
async_add
(nodes, **add_kwargs)Asynchronously add nodes to the collection.
delete
([ref_doc_id])Delete a document from the collection.
query
(query, **kwargs)Query the index for the top k most similar nodes to the given query.
Attributes Documentation
- client#
Get client.
- flat_metadata = False#
- stores_text: bool = True#
Methods Documentation
- add(nodes: List[BaseNode], **add_kwargs: Any) List[str] #
Add nodes to the collection.
- Parameters
nodes (List[BaseNode]) โ List of nodes with embeddings.
- Returns
List of IDs of the added documents.
- Return type
List[str]
- async adelete(ref_doc_id: Optional[str] = None, **delete_kwargs: Any) None #
Asynchronously delete a document from the collection.
- Parameters
ref_doc_id (Optional[str]) โ ID of the document to delete. Not currently supported.
delete_kwargs โ Must contain โuuidโ key with UUID of the document to delete.
- async aquery(query: VectorStoreQuery, **kwargs: Any) VectorStoreQueryResult #
- Asynchronously query the index for the top k most similar nodes to the
given query.
- Parameters
query (VectorStoreQuery) โ Query object containing either a query string or a query embedding.
- Returns
- Result of the query, containing the most similar
nodes, their similarities, and their IDs.
- Return type
- async async_add(nodes: List[BaseNode], **add_kwargs: Any) List[str] #
Asynchronously add nodes to the collection.
- Parameters
nodes (List[BaseNode]) โ List of nodes with embeddings.
- Returns
List of IDs of the added documents.
- Return type
List[str]
- delete(ref_doc_id: Optional[str] = None, **delete_kwargs: Any) None #
Delete a document from the collection.
- Parameters
ref_doc_id (Optional[str]) โ ID of the document to delete. Not currently supported.
delete_kwargs โ Must contain โuuidโ key with UUID of the document to delete.
- query(query: VectorStoreQuery, **kwargs: Any) VectorStoreQueryResult #
Query the index for the top k most similar nodes to the given query.
- Parameters
query (VectorStoreQuery) โ Query object containing either a query string or a query embedding.
- Returns
- Result of the query, containing the most similar
nodes, their similarities, and their IDs.
- Return type