abacusai.document_retriever
Module Contents
Classes
A vector store that stores embeddings for a list of document trunks. |
- class abacusai.document_retriever.DocumentRetriever(client, name=None, documentRetrieverId=None, createdAt=None, latestDocumentRetrieverVersion={}, documentRetrieverConfig={})
Bases:
abacusai.return_class.AbstractApiClass
A vector store that stores embeddings for a list of document trunks.
- Parameters:
client (ApiClient) – An authenticated API Client instance
name (str) – The name of the document retriever.
documentRetrieverId (str) – The unique identifier of the vector store.
createdAt (str) – When the vector store was created.
latestDocumentRetrieverVersion (DocumentRetrieverVersion) – The latest version of vector store.
documentRetrieverConfig (DocumentRetrieverConfig) – The config for vector store creation.
- __repr__()
Return repr(self).
- to_dict()
Get a dict representation of the parameters in this class
- Returns:
The dict value representation of the class parameters
- Return type:
- update(name=None, feature_group_id=None, document_retriever_config=None)
Updates an existing document retriever.
- Parameters:
name (str) – The name group to update the document retriever with.
feature_group_id (str) – The ID of the feature group to update the document retriever with.
document_retriever_config (DocumentRetrieverConfig) – The configuration, including chunk_size and chunk_overlap_fraction, for document retrieval.
- Returns:
The updated document retriever.
- Return type:
- create_version()
Creates a document retriever version from the latest version of the feature group that the document retriever associated with.
- Parameters:
document_retriever_id (str) – The unique ID associated with the document retriever to create version with.
- Returns:
The newly created document retriever version.
- Return type:
- refresh()
Calls describe and refreshes the current object’s fields
- Returns:
The current object
- Return type:
- describe()
Describe a Document Retriever.
- Parameters:
document_retriever_id (str) – A unique string identifier associated with the document retriever.
- Returns:
The document retriever object.
- Return type:
- list_versions(limit=100, start_after_version=None)
List all the document retriever versions with a given ID.
- Parameters:
- Returns:
All the document retriever versions associated with the document retriever.
- Return type:
- lookup(query, deployment_token, limit_results=None)
Lookup relevant documents from the document retriever deployed with given query.
- Parameters:
- Returns:
The relevant documentation results found from the document retriever.
- Return type: