PineconeReader#

class llama_index.readers.PineconeReader(api_key: str, environment: Optional[str] = None)#

Bases: BaseReader

Pinecone reader.

Parameters
  • api_key (str) – Pinecone API key.

  • environment (str) – Pinecone environment.

Methods Summary

load_data(index_name, id_to_text_map, ...[, ...])

Load data from Pinecone.

Methods Documentation

load_data(index_name: str, id_to_text_map: Dict[str, str], vector: Optional[List[float]], top_k: int, separate_documents: bool = True, include_values: bool = True, **query_kwargs: Any) List[Document]#

Load data from Pinecone.

Parameters
  • index_name (str) – Name of the index.

  • 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.

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

  • **query_kwargs – Keyword arguments to pass to the query. Arguments are the exact same as those found in Pinecone’s reference documentation for the query method.

Returns

A list of documents.

Return type

List[Document]