DashVectorReader#

class llama_index.readers.DashVectorReader(api_key: str, endpoint: str)#

Bases: BaseReader

DashVector reader.

Parameters
  • api_key (str) – DashVector API key.

  • endpoint (str) – DashVector cluster endpoint.

Methods Summary

load_data(collection_name, id_to_text_map, ...)

Load data from DashVector.

Methods Documentation

load_data(collection_name: str, id_to_text_map: Dict[str, str], vector: Optional[List[float]], top_k: int, separate_documents: bool = True, filter: Optional[str] = None, include_vector: bool = True) List[Document]#

Load data from DashVector.

Parameters
  • collection_name (str) – Name of the collection.

  • id_to_text_map (Dict[str, str]) – A map from ID’s to text.

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

  • vector (List[float]) – Query vector.

  • top_k (int) – Number of results to return.

  • filter (Optional[str]) – doc fields filter conditions that meet the SQL where clause specification.

  • include_vector (bool) – Whether to include the embedding in the response. Defaults to True.

Returns

A list of documents.

Return type

List[Document]