abacusai.vector_store

Module Contents

Classes

VectorStore

A vector store that stores embeddings for a list of document trunks.

class abacusai.vector_store.VectorStore(client, name=None, vectorStoreId=None, createdAt=None, latestVectorStoreVersion={})

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 vector store.

  • vectorStoreId (str) – The unique identifier of the vector store.

  • createdAt (str) – When the vector store was created.

  • latestVectorStoreVersion (VectorStoreVersion) – The latest version of vector store.

__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

update(feature_group_id=None, name=None)

Updates an existing vector store.

Parameters:
  • feature_group_id (str) – The ID of the feature group to update the vector store with.

  • name (str) – The name group to update the vector store with.

Returns:

The updated vector store.

Return type:

VectorStore

create_version()

Creates a vector store version from the latest version of the feature group that the vector store associated with.

Parameters:

vector_store_id (str) – The unique ID associated with the vector store to create version with.

Returns:

The newly created vector store version.

Return type:

VectorStoreVersion

refresh()

Calls describe and refreshes the current object’s fields

Returns:

The current object

Return type:

VectorStore

describe()

Describe a Vector Store.

Parameters:

vector_store_id (str) – A unique string identifier associated with the vector store.

Returns:

The vector store object.

Return type:

VectorStore

delete()

Delete a Vector Store.

Parameters:

vector_store_id (str) – A unique string identifier associated with the vector store.

list_versions(limit=100, start_after_version=None)

List all the vector store versions with a given vector store ID.

Parameters:
  • limit (int) – The number of vector store versions to retrieve.

  • start_after_version (str) – An offset parameter to exclude all vector store versions up to this specified one.

Returns:

All the vector store versions associated with the vector store.

Return type:

VectorStoreVersion

lookup(query, deployment_token, limit_results=None)

Lookup relevant documents from the vector store deployed with given query.

Parameters:
  • query (str) – The query to search for.

  • deployment_token (str) – A deployment token used to authenticate access to created vector store.

  • limit_results (int) – If provided, will limit the number of results to the value specified.

Returns:

The relevant documentation results found from the vector store.

Return type:

VectorStoreLookupResult

wait_until_ready(timeout=3600)

A waiting call until vector store is ready.

Parameters:

timeout (int, optional) – 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 vector store.

Returns:

A string describing the status of a vector store (pending, complete, etc.).

Return type:

str