EpsillaVectorStore#

class llama_index.vector_stores.EpsillaVectorStore(client: Any, collection_name: str = 'llama_collection', db_path: Optional[str] = './storage', db_name: Optional[str] = 'llama_db', dimension: Optional[int] = None, overwrite: bool = False, **kwargs: Any)#

Bases: VectorStore

The Epsilla Vector Store.

In this vector store we store the text, its embedding and a few pieces of its metadata in a Epsilla collection. This implemnetation allows the use of an already existing collection. It also supports creating a new one if the collection does not exist or if overwrite is set to True.

As a prerequisite, you need to install pyepsilla package and have a running Epsilla vector database (for example, through our docker image) See the following documentation for how to run an Epsilla vector database: https://epsilla-inc.gitbook.io/epsilladb/quick-start

Parameters
  • client (Any) – Epsilla client to connect to.

  • collection_name (Optional[str]) – Which collection to use. Defaults to “llama_collection”.

  • db_path (Optional[str]) – The path where the database will be persisted. Defaults to “/tmp/langchain-epsilla”.

  • db_name (Optional[str]) – Give a name to the loaded database. Defaults to “langchain_store”.

  • dimension (Optional[int]) – The dimension of the embeddings. If not provided, collection creation will be done on first insert. Defaults to None.

  • overwrite (Optional[bool]) – Whether to overwrite existing collection with same name. Defaults to False.

Returns

Vectorstore that supports add, delete, and query.

Return type

EpsillaVectorStore

Attributes Summary

Methods Summary

add(nodes, **add_kwargs)

Add nodes to Epsilla vector store.

client()

Return the Epsilla client.

delete(ref_doc_id, **delete_kwargs)

Delete nodes using with ref_doc_id.

query(query, **kwargs)

Query index for top k most similar nodes.

Attributes Documentation

flat_metadata: bool = False#
stores_text: bool = True#

Methods Documentation

add(nodes: List[BaseNode], **add_kwargs: Any) List[str]#

Add nodes to Epsilla vector store.

Parameters

nodes – List[BaseNode]: list of nodes with embeddings

Returns

List of ids inserted.

Return type

List[str]

client() Any#

Return the Epsilla client.

delete(ref_doc_id: str, **delete_kwargs: Any) None#

Delete nodes using with ref_doc_id.

Parameters

ref_doc_id (str) – The doc_id of the document to delete.

query(query: VectorStoreQuery, **kwargs: Any) VectorStoreQueryResult#

Query index for top k most similar nodes.

Parameters

query (VectorStoreQuery) – query.

Returns

Vector store query result.