DeepLakeVectorStore#
- pydantic model llama_index.vector_stores.DeepLakeVectorStore#
The DeepLake Vector Store.
In this vector store we store the text, its embedding and a few pieces of its metadata in a deeplake dataset. This implementation allows the use of an already existing deeplake dataset if it is one that was created this vector store. It also supports creating a new one if the dataset doesn’t exist or if overwrite is set to True.
Show JSON schema
{ "title": "DeepLakeVectorStore", "description": "The DeepLake Vector Store.\n\nIn this vector store we store the text, its embedding and\na few pieces of its metadata in a deeplake dataset. This implementation\nallows the use of an already existing deeplake dataset if it is one that was created\nthis vector store. It also supports creating a new one if the dataset doesn't\nexist or if `overwrite` is set to True.", "type": "object", "properties": { "stores_text": { "title": "Stores Text", "default": true, "type": "boolean" }, "is_embedding_query": { "title": "Is Embedding Query", "default": true, "type": "boolean" }, "flat_metadata": { "title": "Flat Metadata", "default": true, "type": "boolean" }, "ingestion_batch_size": { "title": "Ingestion Batch Size", "type": "integer" }, "num_workers": { "title": "Num Workers", "type": "integer" }, "token": { "title": "Token", "type": "string" }, "read_only": { "title": "Read Only", "type": "boolean" }, "dataset_path": { "title": "Dataset Path", "type": "string" }, "class_name": { "title": "Class Name", "type": "string", "default": "base_component" } }, "required": [ "ingestion_batch_size", "num_workers", "dataset_path" ] }
- Config
schema_extra: function = <function BaseComponent.Config.schema_extra at 0x7ff1e41e53a0>
- Fields
dataset_path (str)
flat_metadata (bool)
ingestion_batch_size (int)
num_workers (int)
read_only (Optional[bool])
stores_text (bool)
token (Optional[str])
- field dataset_path: str [Required]#
- field flat_metadata: bool = True#
- field ingestion_batch_size: int [Required]#
- field num_workers: int [Required]#
- field read_only: Optional[bool] = None#
- field stores_text: bool = True#
- field token: Optional[str] = None#
- add(nodes: List[BaseNode], **add_kwargs: Any) List[str] #
Add the embeddings and their nodes into DeepLake.
- Parameters
nodes (List[BaseNode]) – List of nodes with embeddings to insert.
- Returns
List of ids inserted.
- Return type
List[str]
- 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) – VectorStoreQuery class input, it has the following attributes: 1. query_embedding (List[float]): query embedding 2. similarity_top_k (int): top k most similar nodes
deep_memory (bool) – Whether to use deep memory for query execution.
- Returns
VectorStoreQueryResult
- property client: Any#
Get client.
- Returns
DeepLake vectorstore dataset.
- Return type
Any