WeaviateReader#

class llama_index.readers.WeaviateReader(host: str, auth_client_secret: Optional[Any] = None)#

Bases: BaseReader

Weaviate reader.

Retrieves documents from Weaviate through vector lookup. Allows option to concatenate retrieved documents into one Document, or to return separate Document objects per document.

Parameters
  • host (str) – host.

  • auth_client_secret (Optional[weaviate.auth.AuthCredentials]) – auth_client_secret.

Methods Summary

load_data([class_name, properties, ...])

Load data from Weaviate.

Methods Documentation

load_data(class_name: Optional[str] = None, properties: Optional[List[str]] = None, graphql_query: Optional[str] = None, separate_documents: Optional[bool] = True) List[Document]#

Load data from Weaviate.

If graphql_query is not found in load_kwargs, we assume that class_name and properties are provided.

Parameters
  • class_name (Optional[str]) – class_name to retrieve documents from.

  • properties (Optional[List[str]]) – properties to retrieve from documents.

  • graphql_query (Optional[str]) – Raw GraphQL Query. We assume that the query is a Get query.

  • separate_documents (Optional[bool]) – Whether to return separate documents. Defaults to True.

Returns

A list of documents.

Return type

List[Document]