WeaviateVectorStore#
- pydantic model llama_index.vector_stores.WeaviateVectorStore#
Weaviate vector store.
In this vector store, embeddings and docs are stored within a Weaviate collection.
During query time, the index uses Weaviate to query for the top k most similar nodes.
- Parameters
weaviate_client (weaviate.Client) – WeaviateClient instance from weaviate-client package
index_name (Optional[str]) – name for Weaviate classes
Show JSON schema
{ "title": "WeaviateVectorStore", "description": "Weaviate vector store.\n\nIn this vector store, embeddings and docs are stored within a\nWeaviate collection.\n\nDuring query time, the index uses Weaviate to query for the top\nk most similar nodes.\n\nArgs:\n weaviate_client (weaviate.Client): WeaviateClient\n instance from `weaviate-client` package\n index_name (Optional[str]): name for Weaviate classes", "type": "object", "properties": { "stores_text": { "title": "Stores Text", "default": true, "type": "boolean" }, "is_embedding_query": { "title": "Is Embedding Query", "default": true, "type": "boolean" }, "index_name": { "title": "Index Name", "type": "string" }, "url": { "title": "Url", "type": "string" }, "text_key": { "title": "Text Key", "type": "string" }, "auth_config": { "title": "Auth Config", "type": "object" }, "client_kwargs": { "title": "Client Kwargs", "type": "object" }, "class_name": { "title": "Class Name", "type": "string", "default": "WeaviateVectorStore" } }, "required": [ "index_name", "text_key" ] }
- Config
schema_extra: function = <function BaseComponent.Config.schema_extra at 0x7ff1e41e53a0>
- Fields
auth_config (Dict[str, Any])
client_kwargs (Dict[str, Any])
index_name (str)
stores_text (bool)
text_key (str)
url (Optional[str])
- field auth_config: Dict[str, Any] [Optional]#
- field client_kwargs: Dict[str, Any] [Optional]#
- field index_name: str [Required]#
- field stores_text: bool = True#
- field text_key: str [Required]#
- field url: Optional[str] = None#
- add(nodes: List[BaseNode], **add_kwargs: Any) List[str] #
Add nodes to index.
- Parameters
nodes – List[BaseNode]: list of nodes with embeddings
- classmethod class_name() str #
Get the class name, used as a unique ID in serialization.
This provides a key that makes serialization robust against actual class name changes.
- 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.
- classmethod from_params(url: str, auth_config: Any, index_name: Optional[str] = None, text_key: str = 'text', client_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any) WeaviateVectorStore #
Create WeaviateVectorStore from config.
- query(query: VectorStoreQuery, **kwargs: Any) VectorStoreQueryResult #
Query index for top k most similar nodes.
- property client: Any#
Get client.