abacusai.document_retriever_version — AbacusAI documentation

# abacusai.document_retriever_version

## Classes

`DocumentRetrieverConfig` | A config for document retriever creation.
`AbstractApiClass` |
`DocumentRetrieverVersion` | A version of document retriever.

## Module Contents

class abacusai.document_retriever_version.DocumentRetrieverConfig(client, chunkSize=None, chunkOverlapFraction=None, textEncoder=None, scoreMultiplierColumn=None, pruneVectors=None)

  Bases: `abacusai.return_class.AbstractApiClass`

  A config for document retriever creation.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - chunkSize (int) – The size of chunks for vector store, i.e., maximum number of words in the chunk.

    - chunkOverlapFraction (float) – The fraction of overlap between two consecutive chunks.

    - textEncoder (str) – The text encoder used to encode texts in the vector store.

    - scoreMultiplierColumn (str) – The values in this metadata column are used to modify the relevance scores of returned chunks.

    - pruneVectors (bool) – Corpus specific transformation of vectors that applies dimensional reduction techniques to strip common components from the vectors.

  __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:

      dict

class abacusai.document_retriever_version.AbstractApiClass(client, id)
  __eq__(other)

    Return self==value.

  _get_attribute_as_dict(attribute)

class abacusai.document_retriever_version.DocumentRetrieverVersion(client, documentRetrieverId=None, documentRetrieverVersion=None, createdAt=None, status=None, deploymentStatus=None, featureGroupId=None, featureGroupVersion=None, error=None, numberOfChunks=None, embeddingFileSize=None, warnings=None, resolvedConfig={})

  Bases: `abacusai.return_class.AbstractApiClass`

  A version of document retriever.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - documentRetrieverId (str) – The unique identifier of the Document Retriever.

    - documentRetrieverVersion (str) – The unique identifier of the Document Retriever version.

    - createdAt (str) – When the Document Retriever was created.

    - status (str) – The status of creating Document Retriever version.

    - deploymentStatus (str) – The status of deploying the Document Retriever version.

    - featureGroupId (str) – The feature group id associated with the document retriever.

    - featureGroupVersion (str) – The unique identifier of the feature group version at which the Document Retriever version is created.

    - error (str) – The error message when it failed to create the document retriever version.

    - numberOfChunks (int) – The number of chunks for the document retriever.

    - embeddingFileSize (int) – The size of embedding file for the document retriever.

    - warnings (list) – The warning messages when creating the document retriever.

    - resolvedConfig (DocumentRetrieverConfig) – The resolved configurations, such as default settings, for indexing documents.

  __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:

      dict

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      DocumentRetrieverVersion

  describe()

    Describe a document retriever version.

    Parameters:

      document_retriever_version (str) – A unique string identifier associated with the document retriever version.

    Returns:

      The document retriever version object.

    Return type:

      DocumentRetrieverVersion

  wait_for_results(timeout=3600)

    A waiting call until document retriever version is complete.

    Parameters:

      timeout (int) – The waiting time given to the call to finish, if it doesn’t finish by the allocated time, the call is said to be timed out.

  wait_until_ready(timeout=3600)

    A waiting call until the document retriever version is ready. It restarts the document retriever if it is stopped.

    Parameters:

      timeout (int) – The waiting time given to the call to finish, if it doesn’t finish by the allocated time, the call is said to be timed out.

  wait_until_deployment_ready(timeout=3600)

    A waiting call until the document retriever deployment is ready to serve.

    Parameters:

      timeout (int) – The waiting time given to the call to finish, if it doesn’t finish by the allocated time, the call is said to be timed out. Default value given is 3600 seconds.

  get_status()

    Gets the status of the document retriever version.

    Returns:

      A string describing the status of a document retriever version (pending, complete, etc.).

    Return type:

      str

  get_deployment_status()

    Gets the status of the document retriever version.

    Returns:

      A string describing the deployment status of a document retriever version (pending, deploying, etc.).

    Return type:

      str