Skip to content

Reference

Vantage client

vantage_sdk.client

Contains VantageClient class.

This module contains VantageClient class, which is a main entry point for users using the SDK.

VantageClient(management_api, search_api, account_id, vantage_api_key=None, host=DEFAULT_API_HOST)

Initializes a new instance of the 'VantageClient' class, the main entry point for interacting with Vantage Discovery via the Python SDK, setting up the necessary APIs for management and search operations.

Parameters:

Name Type Description Default
management_api ManagementAPI

An instance of the ManagementAPI class to manage accounts, collections and keys.

required
search_api SearchAPI

An instance of the SearchAPI class to perform search operations.

required
account_id str

The account ID to be used for all operations within the Vantage platform.

required
vantage_api_key Optional[str]

An optional Vantage API key used for search operations. If not provided, must be set elsewhere before performing those operations. Defaults to None.

None
host Optional[str]

The host URL for the Vantage API. If not provided, a default value is used.

DEFAULT_API_HOST

create_collection(collection, account_id=None)

Creates a new collection based on the provided collection object.

Parameters:

Name Type Description Default
collection Collection

Instance of a UserProvidedEmbeddingsCollection, which creates and uses embeddings provided by the user, or instance of OpenAICollection / HuggingFaceCollection, both of which create and use Vantage-managed embeddings.

required

Returns:

Type Description
Collection

A Collection object representing the newly created collection.

Notes

Visit our documentation for more details and examples.

create_external_key(llm_provider, llm_secret, account_id=None)

Creates a new external key associated with a given account.

This method generates a new external key for integrating with external services, specified by the URL, LLM (Large Language Model) provider, and a secret for the LLM. The key is associated with the account identified by account_id. If account_id is not provided, it defaults to the account ID of the current instance. It uses the Management API for the creation operation and returns an ExternalAPIKey object upon success.

Parameters:

Name Type Description Default
llm_provider str

The provider of the Large Language Model (LLM). Supported options are: OpenAI and HuggingFace (Hugging)

required
llm_secret str

The secret key for accessing the LLM.

required
account_id Optional[str]

The unique identifier of the account for which the external API key is to be created. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
ExternalKey

An ExternalKey object containing the details of the newly created key.

Notes

Visit our documentation for more details and examples.

delete_collection(collection_id, account_id=None)

Deletes a specific collection identified by its collection ID within a specified account. It first verifies the existence of the collection in the account and raises an exception if the collection does not exist. Upon successful deletion, it returns the Collection object that was deleted.

Parameters:

Name Type Description Default
collection_id str

The unique identifier of the collection to be deleted.

required
account_id Optional[str]

The account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
Collection

A Collection object representing the collection that was deleted.

Notes

Visit our documentation for more details and examples.

delete_documents(collection_id, document_ids, account_id=None)

Deletes a list of documents from a specified collection.

Parameters:

Name Type Description Default
collection_id str

The unique identifier of the collection from which documents are to be deleted.

required
document_ids List[str]

A list of document IDs that need to be deleted from the collection.

required
account_id Optional[str]

The account identifier under which the collection exists. If not provided, the instance's account ID is used. Defaults to None.

None
Notes

Visit our documentation for more details and examples.

delete_external_key(external_key_id, account_id=None)

Deletes a specific external key associated with a given account.

This method removes an external key identified by external_key_id from the account specified by account_id. If account_id is not provided, it defaults to the account ID of the current instance. It uses the Management API to perform the deletion.

Parameters:

Name Type Description Default
external_key_id str

The unique identifier of the external key to be deleted.

required
account_id Optional[str]

The unique identifier of the account to which the external API key is associated. If not provided, the instance's account ID is used. Defaults to None.

None
Notes

Visit our documentation for more details and examples.

Performs a search within a specified collection using an embedding vector, with optional parameters for accuracy, pagination, and a boolean filter for refined search criteria.

Parameters:

Name Type Description Default
embedding List[int]

The embedding vector used for the search.

required
collection_id str

The ID of the collection to search within.

required
accuracy Optional[float]

The accuracy threshold for the search. Defaults to None.

None
pagination Optional[Pagination]

Pagination settings for the search results. Defaults to None,

None
filter Optional[Filter]

Filter settings to narrow down the search results. Defaults to None,

None
sort Optional[Sort]

Sorting settings for the search results. Defaults to None,

None
field_value_weighting Optional[FieldValueWeighting]

Weighting settings for specific field values in the search. Defaults to None,

None
vantage_api_key Optional[str]

The Vantage API key used for authentication. If not provided, the instance's API key is used. Defaults to None.

None
account_id Optional[str]

The account ID associated with the search. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
SearchResult

An object containing the search results.

Notes

Visit our documentation for more details and examples.

get_account(account_id=None)

Retrieves the details of an Account.

This method fetches the details of an account identified by its account ID. If the account ID is not specified, it defaults to the account ID of the current instance. It uses the Management API to retrieve the account information and returns an Account object upon success.

Parameters:

Name Type Description Default
account_id Optional[str]

The unique identifier of the account to be retrieved. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
Account

An Account object containing the details of the requested account.

Visit our [documentation](https://docs.vantagediscovery.com/docs/management-api) for more details and examples.

get_collection(collection_id, account_id=None)

Retrieves the details of a specified collection.

This method fetches the details of a collection identified by its unique ID within a specified account. It checks for the existence of the collection ID and raises an exception if no collection with the given ID exists. The method returns a Collection object containing the collection's details upon successful retrieval.

Parameters:

Name Type Description Default
collection_id str

The unique identifier of the collection to be retrieved.

required
account_id Optional[str]

The account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
Collection

A Collection object containing the details of the specified collection.

Notes

Visit our documentation for more details and examples.

get_external_key(external_key_id, account_id=None)

Retrieves a specific external key associated with a given account.

This method fetches the details of an external key identified by external_key_id for the account specified by account_id. If account_id is not provided, it defaults to the account ID of the current instance. It uses the Management API to perform the retrieval and returns an ExternalAPIKey object containing the details of the requested API key upon success.

Parameters:

Name Type Description Default
external_key_id str

The unique identifier of the external API key to be retrieved.

required
account_id Optional[str]

The unique identifier of the account to which the external API key is associated. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
ExternalKey

An ExternalKey object containing the details of the requested external key.

Notes

Visit our documentation for more details and examples.

get_external_keys(account_id=None)

Retrieves a list of external keys associated with a given account.

This method fetches all external keys linked to the account specified by account_id. If account_id is not provided, it defaults to the account ID of the current instance. It uses the Management API to obtain the keys and returns a list of ExternalAPIKey objects upon success.

Parameters:

Name Type Description Default
account_id Optional[str]

The unique identifier of the account for which the external API keys are to be retrieved. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
List[ExternalKey]

A list of ExternalKey objects, each representing an external key associated with the account.

Notes

Visit our documentation for more details and examples.

get_vantage_api_key(vantage_api_key_id, account_id=None)

Retrieves a specific Vantage API key for a given account.

This method obtains the details of a specific Vantage API key identified by vantage_api_key_id for the account specified by account_id. If the account ID is not specified, it defaults to the account ID of the current instance. It uses the Management API to retrieve the key and returns an VantageAPIKey object upon success.

Parameters:

Name Type Description Default
vantage_api_key_id str

The unique identifier of the Vantage API key to be retrieved.

required
account_id Optional[str]

The unique identifier of the account for which the Vantage API key is associated. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
VantageAPIKey

A VantageAPIKey object containing the details of the requested API key.

Notes

Visit our documentation for more details and examples.

get_vantage_api_keys(account_id=None)

Retrieves a list of Vantage API keys for a specified account.

This method fetches all the Vantage API keys associated with an account identified by its account ID. If the account ID is not specified, it defaults to the account ID of the current instance. It uses the Management API to retrieve the keys and returns a list of VantageAPIKey objects upon success.

Parameters:

Name Type Description Default
account_id Optional[str]

The unique identifier of the account for which the Vantage API keys are to be retrieved. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
List[VantageAPIKey]

A list of VantageAPIKey objects, each representing a Vantage API key associated with the account.

Notes

Visit our documentation for more details and examples.

list_collections(account_id=None)

Retrieves a list of collections associated with a given account.

This method fetches all collections linked to the account specified by account_id. If account_id is not provided, it defaults to the account ID of the current instance. It uses the Management API to obtain the list of collections and returns a list of Collection objects upon success.

Parameters:

Name Type Description Default
account_id Optional[str]

The unique identifier of the account for which the collections are to be retrieved. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
List[Collection]

A list of Collection objects, each representing a collection associated with the account.

Notes

Visit our documentation for more details and examples.

Performs a "More Like These" search to find documents similar to a specified list of MoreLikeTheseItem objects within a specified collection using optional parameters for accuracy, pagination, and a boolean filter for refined search criteria.

Parameters:

Name Type Description Default
more_like_these list[MoreLikeTheseItem]

The list of "MoreLikeTheseItem" objects to find similar documents to.

required
collection_id str

The ID of the collection to search within.

required
accuracy Optional[float]

The accuracy threshold for the search. Defaults to None.

None
pagination Optional[Pagination]

Pagination settings for the search results. Defaults to None,

None
filter Optional[Filter]

Filter settings to narrow down the search results. Defaults to None,

None
sort Optional[Sort]

Sorting settings for the search results. Defaults to None,

None
field_value_weighting Optional[FieldValueWeighting]

Weighting settings for specific field values in the search. Defaults to None,

None
vantage_api_key Optional[str]

The Vantage API key used for authentication. If not provided, the instance's API key is used. Defaults to None.

None
account_id Optional[str]

The account ID associated with the search. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
SearchResult

An object containing the search results similar to the specified document.

Notes

Visit our documentation for more details and examples.

Performs a "More Like This" search to find documents similar to a specified document within a specified collection using optional parameters for accuracy, pagination, and a boolean filter for refined search criteria.

Parameters:

Name Type Description Default
document_id str

The ID of the document to find similar documents to.

required
collection_id str

The ID of the collection to search within.

required
accuracy Optional[float]

The accuracy threshold for the search. Defaults to None.

None
pagination Optional[Pagination]

Pagination settings for the search results. Defaults to None,

None
filter Optional[Filter]

Filter settings to narrow down the search results. Defaults to None,

None
sort Optional[Sort]

Sorting settings for the search results. Defaults to None,

None
field_value_weighting Optional[FieldValueWeighting]

Weighting settings for specific field values in the search. Defaults to None,

None
vantage_api_key Optional[str]

The Vantage API key used for authentication. If not provided, the instance's API key is used. Defaults to None.

None
account_id Optional[str]

The account ID associated with the search. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
SearchResult

An object containing the search results similar to the specified document.

Notes

Visit our documentation for more details and examples.

Performs a search within a specified collection using a text query, with optional parameters for accuracy, pagination, and a boolean filter for refined search criteria.

Parameters:

Name Type Description Default
text str

The text query for the semantic search.

required
collection_id str

The ID of the collection to search within.

required
accuracy Optional[float]

The accuracy threshold for the search. Defaults to None.

None
pagination Optional[Pagination]

Pagination settings for the search results. Defaults to None,

None
filter Optional[Filter]

Filter settings to narrow down the search results. Defaults to None,

None
sort Optional[Sort]

Sorting settings for the search results. Defaults to None,

None
field_value_weighting Optional[FieldValueWeighting]

Weighting settings for specific field values in the search. Defaults to None,

None
vantage_api_key Optional[str]

The Vantage API key used for authentication. If not provided, the instance's API key is used. Defaults to None.

None
account_id Optional[str]

The account ID associated with the search. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
SearchResult

An object containing the search results.

Notes

Visit our documentation for more details and examples.

update_account(account_name=None, account_id=None)

Updates the Account.

This method allows for updating the name of an account identified by its account ID. If the account ID is not specified, it defaults to the account ID of the current instance. It uses the Management API to perform the update operation and returns an updated Account object upon success.

Parameters:

Name Type Description Default
account_name Optional[str]

The new name for the account.

None
account_id Optional[str]

The unique identifier of the account to be updated. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
Account

An updated Account object reflecting the changes made.

Notes

Visit our documentation for more details and examples.

update_collection(collection_id, collection_name=None, external_key_id=None, secondary_external_accounts=None, account_id=None)

Updates an existing collection's details such as its name, associated external key ID, and secondary accounts. It checks for the existence of the collection within the specified account and raises an exception if the collection does not exist. Upon successful update, it returns an updated Collection object.

Parameters:

Name Type Description Default
collection_id str

Unique identifier of the collection to be updated.

required
collection_name Optional[str]

New name for the collection, if updating.

None
external_key_id Optional[str]

New external key ID, if updating.

None
secondary_external_accounts Optional[List[SecondaryExternalAccount]]

Additional external accounts/keys used for indexing, search or both. Applicable if llm_provider is set to OpenAI.

None
account_id Optional[str]

Account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
Collection

A Collection object representing the updated collection.

Notes

Visit our documentation for more details and examples.

update_external_key(external_key_id, llm_provider, llm_secret, account_id=None)

Updates the details of a specific external key associated with a given account.

This method allows for updating the URL, LLM (Large Language Model) provider, and LLM secret of an external key identified by external_key_id. If account_id is not specified, it defaults to using the account ID of the current instance. It uses the Management API to perform the update and returns an updated ExternalKey object upon success.

Parameters:

Name Type Description Default
external_key_id str

The unique identifier of the external key to be updated.

required
llm_provider str

The new provider of the Large Language Model (LLM).

required
llm_secret str

The new secret key for accessing the LLM.

required
account_id Optional[str]

The unique identifier of the account to which the external key is associated. If not provided, the instance's account ID is used. Defaults to None.

None

Returns:

Type Description
ExternalKey

An ExternalKey object containing the updated details of the external key.

Notes

Visit our documentation for more details and examples.

upsert_documents(collection_id, documents, account_id=None)

Upserts documents to a specified collection from a list of Vantage documents. The documents object should be a list of one type of Vantage document objects—either VantageManagedEmbeddingsDocument or UserProvidedEmbeddingsDocument, depending on the type of the collection to which you are upserting.

Parameters:

Name Type Description Default
collection_id str

The unique identifier for the collection to which the documents will be upserted.

required
documents Union[List[VantageManagedEmbeddingsDocument], List[UserProvidedEmbeddingsDocument]]

A list of documents to upsert. This list should contain only one type of document, either VantageManagedEmbeddingsDocument or UserProvidedEmbeddingsDocument, depending on the collection's type.

required
account_id Optional[str]

The account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None.

None
Notes

Visit our documentation for more details and examples.

upsert_documents_from_jsonl_file(collection_id, jsonl_file_path, batch_identifier=None, account_id=None)

Upserts documents to a specified collection from a JSONL file located at a given file path. This method checks if the file exists at the specified path and raises a FileNotFoundError if it does not. It then reads the file and uploads the documents contained within the file to the specified collection using the upsert_documents_from_jsonl_string method.

Parameters:

Name Type Description Default
collection_id str

The unique identifier of the collection to which the documents will be uploaded.

required
file_path str

The path to the JSONL file containing the documents to be uploaded.

required
batch_identifier Optional[str]

An optional identifier provided by the user to track the batch of document uploads.

None
account_id Optional[str]

The account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None.

None
Notes

Visit our documentation for more details and examples.

upsert_documents_from_jsonl_string(collection_id, documents_jsonl, batch_identifier=None, account_id=None)

Upserts documents to a specified collection from a string containing JSONL-formatted documents. The documents string is expected to be in JSONL format, where each line is a valid JSON document.

Parameters:

Name Type Description Default
collection_id str

The unique identifier of the collection to which the documents will be uploaded.

required
documents_jsonl str

A string containing the documents to be uploaded, formatted as JSONL.

required
batch_identifier Optional[str]

An optional identifier provided by the user to track the batch of document uploads.

None
account_id Optional[str]

The account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None.

None
Notes

Visit our documentation for more details and examples.

upsert_documents_from_parquet_file(collection_id, parquet_file_path, account_id=None)

Upserts embeddings from a parquet file to a collection.

Parameters:

Name Type Description Default
collection_id str

The unique identifier of the collection embeddings are being uploaded to.

required
parquet_file_path str

Path to the parquet file in a filesystem.

required
account_id Optional[str]

The account ID to which the collection belongs. If not provided, the instance's account ID is used. Defaults to None

None

Returns:

Type Description
int

HTTP status of upload execution.

Notes

Visit our documentation for more details and examples.

using_client_credentials(vantage_client_id, vantage_client_secret, account_id, vantage_api_key=None, api_host=DEFAULT_API_HOST, auth_host=DEFAULT_AUTH_HOST) classmethod

Instantiates a VantageClient using OAuth client credentials for authentication.

This class method simplifies the process of creating a VantageClient instance by handling OAuth authentication automatically, using the provided client ID and secret.

Parameters:

Name Type Description Default
vantage_client_id str

The client ID issued by Vantage for OAuth authentication.

required
vantage_client_secret str

The client secret issued by Vantage for OAuth authentication.

required
account_id str

The account ID to be used with the Vantage operations.

required
vantage_api_key Optional[str]

An optional Vantage API key used for search operations. If not provided, must be set elsewhere before performing those operations. Defaults to None.

None
api_host Optional[str]

The host URL for the Vantage API. If not provided, a default value is used.

DEFAULT_API_HOST
auth_host Optional[str]

The base URL of the Vantage authentication server. If not provided, a default value is used.

DEFAULT_AUTH_HOST

Returns:

Type Description
VantageClient

An instance of the VantageClient.

Notes
  • The method performs authentication with the Vantage OAuth server automatically and configures the internal API client with the obtained access token.

using_jwt_token(vantage_api_jwt_token, account_id, vantage_api_key=None, api_host=DEFAULT_API_HOST) classmethod

Instantiates a VantageClient using a JWT token for authentication.

Parameters:

Name Type Description Default
vantage_api_jwt_token str

The JWT token for authenticating API requests.

required
account_id str

The account ID associated with the Vantage operations.

required
vantage_api_key Optional[str]

An optional Vantage API key used for search operations. If not provided, must be set elsewhere before performing those operations. Defaults to None.

None
api_host Optional[str]

The host URL for the Vantage API. If not provided, a default value is used.

DEFAULT_API_HOST

Returns:

Type Description
VantageClient

An instance of the VantageClient.

using_vantage_api_key(vantage_api_key, account_id, api_host=DEFAULT_API_HOST) classmethod

Instantiates a VantageClient using a Vantage API key for authentication.

Parameters:

Name Type Description Default
vantage_api_key str

The Vantage API key for authenticating API requests.

required
account_id str

The account ID associated with the Vantage operations.

required
api_host Optional[str]

The host URL for the Vantage API. If not provided, a default value is used.

DEFAULT_API_HOST

Returns:

Type Description
VantageClient

An instance of the VantageClient.

validate_documents_from_jsonl(file_path, collection_type, model=None, embeddings_dimension=None)

Validates documents from a JSONL file.

Parameters:

Name Type Description Default
file_path str

Path of the JSONL file in the filesystem.

required
collection_type CollectionType

For what kind of collection are documents from this file intended.

required
model Optional[str] = None

Which model should be used to generate embeddings (if any).

None
embeddings_dimension Optional[int] = None

Dimension of embeddings (if provided in file).

None

Raises:

Type Description
FileNotFoundError

If specified file is not found.

Returns:

Type Description
List of encountered errors. If file is valid, the list will be empty.

validate_documents_from_parquet(file_path, collection_type, model=None, embeddings_dimension=None)

Validates documents from a Parquet file.

Parameters:

Name Type Description Default
file_path str

Path of the Parquet file in the filesystem.

required
collection_type CollectionType

For what kind of collection are documents from this file intended.

required
model Optional[str] = None

Which model should be used to generate embeddings (if any).

None
embeddings_dimension Optional[int] = None

Dimension of embeddings (if provided in file).

None

Raises:

Type Description
FileNotFoundError

If specified file is not found.

Returns:

Type Description
List of encountered errors. If file is valid, the list will be empty.

vantage_sdk.model.collection

Models for the Collection API.

Collection

Bases: BaseModel

A collection of documents.

Attributes:

Name Type Description
collection_id str

ID of the collection.

embeddings_dimension int

Dimension of embeddings in the collection documents.

user_provided_embeddings bool

If the collection uses user-provided embeddings.

collection_name Optional[StrictStr]

Name of the collection.

collection_state Optional[StrictStr]

Current state of the collection.

collection_status Optional[StrictStr]

Current status of the collection.

collection_created_time Optional[StrictStr]

When the collection was created.

collection_preview_url_pattern Optional[StrictStr]

Preview URL pattern of the collection.

CollectionUploadURL

Bases: BaseModel

Represents the upload URL details for a collection.

Attributes:

Name Type Description
collection_id (Optional[StrictStr], optional)

The unique identifier for the collection.

customer_batch_identifier (Optional[StrictStr], optional)

The identifier for the customer batch.

upload_url_type (Optional[StrictStr], optional)

The type of the upload URL.

upload_url (Optional[StrictStr], optional)

The URL used for uploading to the collection.

HuggingFaceCollection

Bases: VantageManagedEmbeddingsCollection

Vantage-managed embeddings collection which uses HuggingFace as LLM provider.

Attributes:

Name Type Description
llm_provider StrictStr

The provider of the embedding model, set to HuggingFace.

external_url StrictStr

The external URL for the HuggingFace model.

OpenAICollection

Bases: VantageManagedEmbeddingsCollection

Vantage-managed embeddings collection which uses OpenAI as LLM provider.

Attributes:

Name Type Description
llm_provider StrictStr

The provider of the embedding model, set to OpenAI.

llm StrictStr

The specific embedding model used from OpenAI.

secondary_external_accounts (Optional[List[SecondaryExternalAccount]], optional)

A list of secondary external accounts associated with the collection.

UserProvidedEmbeddingsCollection

Bases: Collection

A collection of documents with user-provided embeddings.

Attributes:

Name Type Description
user_provided_embeddings StrictBool

Indicates that the embeddings in this collection are provided by the user.

VantageManagedEmbeddingsCollection

Bases: Collection

A collection of documents with Vantage-managed embeddings.

Attributes:

Name Type Description
user_provided_embeddings StrictBool

Indicates that the embeddings in this collection are managed by Vantage.

llm_provider StrictStr

The provider of the embedding model used to generate embeddings.

llm_secret (Optional[StrictStr], optional)

The secret key used to authenticate with the model provider.

external_key_id (Optional[StrictStr], optional)

The external key ID used to authenticate with the model provider.

vantage_sdk.model.keys

Models for the Keys API.

ExternalKey

Bases: BaseModel

Key for accessing one of the external APIs.

Attributes:

Name Type Description
external_key_id Optional[StrictStr]

The unique identifier of the external API key.

account_id Optional[StrictStr]

The unique identifier of the account for which the Vantage API key is associated.

external_key_created_date Optional[StrictStr]

Date when the key was created in the user account.

llm_provider Optional[StrictStr]

For which LLM provider this key is intended.

llm_secret Optional[StrictStr]

External key secret value.

state Optional[StrictStr]

External key state.

LLMProvider

Bases: Enum

Supported LLM providers.

SecondaryExternalAccount

Bases: BaseModel

Secondary external account data.

Attributes:

Name Type Description
external_account_id Optional[StrictStr]

Unique identifier of the external account.

external_type Optional[StrictStr]

Type of the external account.

VantageAPIKey

Bases: BaseModel

Key for accessing Vantage API.

Attributes:

Name Type Description
vantage_api_key_id Optional[StrictStr]

The unique identifier of the Vantage API key.

account_id (Optional[str], optional)

The unique identifier of the account for which the Vantage API key is associated.

vantage_api_key_obfuscated Optional[StrictStr]

Obfuscated value of the Vantage API key.

status Optional[StrictStr]

Key status.

vantage_sdk.core.management.management

This module contains ManagementAPI, a class for accessing management API.

ManagementAPI(account_api, collection_api, external_keys_api, vantage_api_keys_api, documents_api)

Class for accessing Management API.

Attributes:

Name Type Description
account_api AccountManagementApi

Account management API component.

collection_api CollectionManagementApi

Collection management API component.

external_api_keys_api ExternalAPIKeysApi

External API keys management API component.

vantage_api_keys_api VantageAPIKeysApi

Vantage API keys management API component.

documents_api DocumentsApi

Documents management API component.

Default constructor.

Parameters:

Name Type Description Default
account_api AccountManagementApi

Account management API component.

required
collection_api CollectionManagementApi

Collection management API component.

required
external_api_keys_api

External API keys management API component.

required
vantage_api_keys_api VantageAPIKeysApi

Vantage API keys management API component.

required
documents_api DocumentsApi

Documents management API component.

required

from_defaults(api_client) classmethod

Constructs ManagementAPI instance using default values.

This method is the preferred way to construct ManagementAPI instance.

Parameters:

Name Type Description Default
api_client ApiClient

API client component used to call the API.

required

Returns:

Type Description
ManagementAPI

ManagementAPI instance.

vantage_sdk.core.search.search

This module contains SearchAPI, a class for accessing search API.

SearchAPI(api_client)

Component for accessing the search API.

Attributes:

Name Type Description
api SearchApi

Component used to access the search API.

Default constructor.

Parameters:

Name Type Description Default
api_client ApiClient

Component used to make HTTP calls to the API.

required

Exceptions

VantageException

Bases: Exception

The base exception class for all Vantage client exceptions.

VantageFileUploadError(error_msg, status_code)

Bases: VantageException

Thrown if error occurs while uploading a file.

VantageForbiddenError(error_msg)

Bases: VantageException

Thrown if unauthenticated user tries to access the API.

VantageInvalidRequestError(reason, status, response)

Bases: VantageException

Thrown if user sends invalid request to the API.

VantageInvalidResponseError(error_message, validation_error=None)

Bases: VantageException

Thrown if server returns invalid response.

VantageNotFoundError(message)

Bases: VantageException

Thrown if requested resource is not found.

VantageServiceError(reason, status, response)

Bases: VantageException

Thrown if the API server reports a HTTP 500 error during normal usage.

VantageUnauthorizedError(error_msg)

Bases: VantageException

Thrown if user tries to access the API without valid authorization.

VantageValueError(error_msg)

Bases: VantageException, ValueError

Thrown if value(s) passed to the API are incorrect in given context.

Models generated from OpenAPI specification

Part of the source code has been generated using OpenAPI specification of VantageDiscovery API. Users of SDK will most likely use some of these modules, and thus we are listing them here for reference.

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

account

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

Account

Bases: BaseModel

Account

Parameters:

Name Type Description Default
account_id Annotated[str, Strict] | None
None
account_name Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of Account from a dict

from_json(json_str) classmethod

Create an instance of Account from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

account_modifiable

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

AccountModifiable

Bases: BaseModel

AccountModifiable

Parameters:

Name Type Description Default
account_name Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of AccountModifiable from a dict

from_json(json_str) classmethod

Create an instance of AccountModifiable from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

account_read_only

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

AccountReadOnly

Bases: BaseModel

AccountReadOnly

Parameters:

Name Type Description Default
account_id Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of AccountReadOnly from a dict

from_json(json_str) classmethod

Create an instance of AccountReadOnly from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

collection

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

Collection

Bases: BaseModel

Collection

Parameters:

Name Type Description Default
collection_created_time Annotated[str, Strict] | None
None
collection_status Annotated[str, Strict] | None
None
collection_state Annotated[str, Strict] | None
None
collection_id Annotated[str, Strict] | None

Immutable. Unique identifier within an account, 3 to 36 characters long with only lower case letters, numeric digits and "-"

None
user_provided_embeddings Annotated[bool, Strict] | None

Ignore llm field will provide own embeddings for both ingest and search

False
llm Annotated[str, Strict] | None
None
llm_provider Annotated[str, Strict] | None
None
llm_secret Annotated[str, Strict] | None
None
external_url Annotated[str, Strict] | None
None
embeddings_dimension Annotated[int, Strict] | None

The dimensionality or vector size of the embeddings. Applies to both user provided embeddings and vantage managed embeddings.

None
external_key_id Annotated[str, Strict] | None

The external key, for the llm_provider to use for the collection

None
secondary_external_accounts List[SecondaryExternalAccount] | None
None
collection_name Annotated[str, Strict] | None
None

collection_state_validate_enum(value)

Validates the enum

collection_status_validate_enum(value)

Validates the enum

from_dict(obj) classmethod

Create an instance of Collection from a dict

from_json(json_str) classmethod

Create an instance of Collection from a JSON string

llm_provider_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

collection_immutable

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

CollectionImmutable

Bases: BaseModel

CollectionImmutable

Parameters:

Name Type Description Default
collection_id Annotated[str, Strict] | None

Immutable. Unique identifier within an account, 3 to 36 characters long with only lower case letters, numeric digits and "-"

None
user_provided_embeddings Annotated[bool, Strict] | None

Ignore llm field will provide own embeddings for both ingest and search

False
llm Annotated[str, Strict] | None
None
llm_provider Annotated[str, Strict] | None
None
llm_secret Annotated[str, Strict] | None
None
external_url Annotated[str, Strict] | None
None
embeddings_dimension Annotated[int, Strict] | None

The dimensionality or vector size of the embeddings. Applies to both user provided embeddings and vantage managed embeddings.

None

from_dict(obj) classmethod

Create an instance of CollectionImmutable from a dict

from_json(json_str) classmethod

Create an instance of CollectionImmutable from a JSON string

llm_provider_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

collection_modifiable

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

CollectionModifiable

Bases: BaseModel

CollectionModifiable

Parameters:

Name Type Description Default
external_key_id Annotated[str, Strict] | None

The external key, for the llm_provider to use for the collection

None
secondary_external_accounts List[SecondaryExternalAccount] | None
None
collection_name Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of CollectionModifiable from a dict

from_json(json_str) classmethod

Create an instance of CollectionModifiable from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

collection_read_only

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

CollectionReadOnly

Bases: BaseModel

CollectionReadOnly

Parameters:

Name Type Description Default
collection_created_time Annotated[str, Strict] | None
None
collection_status Annotated[str, Strict] | None
None
collection_state Annotated[str, Strict] | None
None

collection_state_validate_enum(value)

Validates the enum

collection_status_validate_enum(value)

Validates the enum

from_dict(obj) classmethod

Create an instance of CollectionReadOnly from a dict

from_json(json_str) classmethod

Create an instance of CollectionReadOnly from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

collection_upload_url

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

CollectionUploadURL

Bases: BaseModel

CollectionUploadURL

Parameters:

Name Type Description Default
collection_id Annotated[str, Strict] | None
None
customer_batch_identifier Annotated[str, Strict] | None
None
upload_url_type Annotated[str, Strict] | None
None
upload_url Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of CollectionUploadURL from a dict

from_json(json_str) classmethod

Create an instance of CollectionUploadURL from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

upload_url_type_validate_enum(value)

Validates the enum

create_collection_request

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

CreateCollectionRequest

Bases: BaseModel

CreateCollectionRequest

Parameters:

Name Type Description Default
collection_id str

Immutable. Unique identifier within an account, 3 to 36 characters long with only lower case letters, numeric digits and "-"

required
user_provided_embeddings Annotated[bool, Strict] | None

Ignore llm field will provide own embeddings for both ingest and search

False
llm Annotated[str, Strict] | None
None
llm_provider Annotated[str, Strict] | None
None
llm_secret Annotated[str, Strict] | None
None
external_url Annotated[str, Strict] | None
None
embeddings_dimension int

The dimensionality or vector size of the embeddings. Applies to both user provided embeddings and vantage managed embeddings.

required
external_key_id Annotated[str, Strict] | None

The external key, for the llm_provider to use for the collection

None
secondary_external_accounts List[SecondaryExternalAccount] | None
None
collection_name str
required

from_dict(obj) classmethod

Create an instance of CreateCollectionRequest from a dict

from_json(json_str) classmethod

Create an instance of CreateCollectionRequest from a JSON string

llm_provider_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

document_batch

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

DocumentBatch

Bases: BaseModel

DocumentBatch

Parameters:

Name Type Description Default
customer_batch_identifier Annotated[str, Strict] | None

The customer provided batch or group identifier. Could be a file identifier if uploaded via Vantage console

None

from_dict(obj) classmethod

Create an instance of DocumentBatch from a dict

from_json(json_str) classmethod

Create an instance of DocumentBatch from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

embedding_search_query

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

EmbeddingSearchQuery

Bases: BaseModel

EmbeddingSearchQuery

Parameters:

Name Type Description Default
collection SearchOptionsCollection | None
None
request_id Annotated[int, Strict] | None
None
filter SearchOptionsFilter | None
None
field_value_weighting SearchOptionsFieldValueWeighting | None
None
pagination SearchOptionsPagination | None
None
sort SearchOptionsSort | None
None
embedding List[Union[Annotated[float, Strict], Annotated[int, Strict]]] | None
None

from_dict(obj) classmethod

Create an instance of EmbeddingSearchQuery from a dict

from_json(json_str) classmethod

Create an instance of EmbeddingSearchQuery from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

external_key

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

ExternalKey

Bases: BaseModel

ExternalKey

Parameters:

Name Type Description Default
external_key_id Annotated[str, Strict] | None

The unique id of the key

None
account_id Annotated[str, Strict] | None

The account this key is contained within

None
external_key_created_date Annotated[str, Strict] | None

date this key was created

None
llm_provider Annotated[str, Strict] | None
None
llm_secret Annotated[str, Strict] | None
None
state Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of ExternalKey from a dict

from_json(json_str) classmethod

Create an instance of ExternalKey from a JSON string

llm_provider_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

external_key_modifiable

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

ExternalKeyModifiable

Bases: BaseModel

ExternalKeyModifiable

Parameters:

Name Type Description Default
llm_provider Annotated[str, Strict] | None
None
llm_secret Annotated[str, Strict] | None
None
state Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of ExternalKeyModifiable from a dict

from_json(json_str) classmethod

Create an instance of ExternalKeyModifiable from a JSON string

llm_provider_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

external_key_read_only

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

ExternalKeyReadOnly

Bases: BaseModel

ExternalKeyReadOnly

Parameters:

Name Type Description Default
external_key_id Annotated[str, Strict] | None

The unique id of the key

None
account_id Annotated[str, Strict] | None

The account this key is contained within

None
external_key_created_date Annotated[str, Strict] | None

date this key was created

None

from_dict(obj) classmethod

Create an instance of ExternalKeyReadOnly from a dict

from_json(json_str) classmethod

Create an instance of ExternalKeyReadOnly from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

ml_these

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

MLThese

Bases: BaseModel

MLThese

Parameters:

Name Type Description Default
these List[MLTheseTheseInner] | None
None

from_dict(obj) classmethod

Create an instance of MLThese from a dict

from_json(json_str) classmethod

Create an instance of MLThese from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

ml_these_these_inner

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

MLTheseTheseInner

Bases: BaseModel

MLTheseTheseInner

Parameters:

Name Type Description Default
weight Annotated[float, Strict] | Annotated[int, Strict]
required
query_text Annotated[str, Strict] | None
None
query_document_id Annotated[str, Strict] | None
None
embedding List[Union[Annotated[float, Strict], Annotated[int, Strict]]] | None
None
these List[Dict[str, Any]] | None
None

from_dict(obj) classmethod

Create an instance of MLTheseTheseInner from a dict

from_json(json_str) classmethod

Create an instance of MLTheseTheseInner from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

more_like_these_query

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

MoreLikeTheseQuery

Bases: BaseModel

MoreLikeTheseQuery

Parameters:

Name Type Description Default
these List[MLTheseTheseInner] | None
None
collection SearchOptionsCollection | None
None
request_id Annotated[int, Strict] | None
None
filter SearchOptionsFilter | None
None
field_value_weighting SearchOptionsFieldValueWeighting | None
None
pagination SearchOptionsPagination | None
None
sort SearchOptionsSort | None
None

from_dict(obj) classmethod

Create an instance of MoreLikeTheseQuery from a dict

from_json(json_str) classmethod

Create an instance of MoreLikeTheseQuery from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

more_like_this_query

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

MoreLikeThisQuery

Bases: BaseModel

MoreLikeThisQuery

Parameters:

Name Type Description Default
collection SearchOptionsCollection | None
None
request_id Annotated[int, Strict] | None
None
filter SearchOptionsFilter | None
None
field_value_weighting SearchOptionsFieldValueWeighting | None
None
pagination SearchOptionsPagination | None
None
sort SearchOptionsSort | None
None
document_id Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of MoreLikeThisQuery from a dict

from_json(json_str) classmethod

Create an instance of MoreLikeThisQuery from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_options

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchOptions

Bases: BaseModel

SearchOptions

Parameters:

Name Type Description Default
collection SearchOptionsCollection | None
None
request_id Annotated[int, Strict] | None
None
filter SearchOptionsFilter | None
None
field_value_weighting SearchOptionsFieldValueWeighting | None
None
pagination SearchOptionsPagination | None
None
sort SearchOptionsSort | None
None

from_dict(obj) classmethod

Create an instance of SearchOptions from a dict

from_json(json_str) classmethod

Create an instance of SearchOptions from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_options_collection

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchOptionsCollection

Bases: BaseModel

SearchOptionsCollection

Parameters:

Name Type Description Default
accuracy Annotated[float, Strict] | Annotated[int, Strict] | None
None

from_dict(obj) classmethod

Create an instance of SearchOptionsCollection from a dict

from_json(json_str) classmethod

Create an instance of SearchOptionsCollection from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_options_field_value_weighting

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchOptionsFieldValueWeighting

Bases: BaseModel

SearchOptionsFieldValueWeighting

Parameters:

Name Type Description Default
query_key_word_max_overall_weight Annotated[float, Strict] | Annotated[int, Strict] | None
None
query_key_word_weighting_mode Annotated[str, Strict] | None
None
weighted_field_values List[WeightedFieldValues] | None
None

from_dict(obj) classmethod

Create an instance of SearchOptionsFieldValueWeighting from a dict

from_json(json_str) classmethod

Create an instance of SearchOptionsFieldValueWeighting from a JSON string

query_key_word_weighting_mode_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_options_filter

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchOptionsFilter

Bases: BaseModel

SearchOptionsFilter

Parameters:

Name Type Description Default
boolean_filter Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of SearchOptionsFilter from a dict

from_json(json_str) classmethod

Create an instance of SearchOptionsFilter from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_options_pagination

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchOptionsPagination

Bases: BaseModel

SearchOptionsPagination

Parameters:

Name Type Description Default
page Annotated[int, Strict] | None
None
count Annotated[int, Strict] | None
None
threshold Annotated[int, Strict] | None
None

from_dict(obj) classmethod

Create an instance of SearchOptionsPagination from a dict

from_json(json_str) classmethod

Create an instance of SearchOptionsPagination from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_options_sort

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchOptionsSort

Bases: BaseModel

SearchOptionsSort

Parameters:

Name Type Description Default
field Annotated[str, Strict] | None
None
order Annotated[str, Strict] | None
None
mode Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of SearchOptionsSort from a dict

from_json(json_str) classmethod

Create an instance of SearchOptionsSort from a JSON string

mode_validate_enum(value)

Validates the enum

order_validate_enum(value)

Validates the enum

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_result

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchResult

Bases: BaseModel

SearchResult

Parameters:

Name Type Description Default
request_id Annotated[int, Strict] | None
None
status Annotated[int, Strict] | None
None
message Annotated[str, Strict] | None
None
results List[SearchResultResultsInner] | None
None

from_dict(obj) classmethod

Create an instance of SearchResult from a dict

from_json(json_str) classmethod

Create an instance of SearchResult from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

search_result_results_inner

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SearchResultResultsInner

Bases: BaseModel

SearchResultResultsInner

Parameters:

Name Type Description Default
id Annotated[str, Strict] | None
None
score Annotated[float, Strict] | Annotated[int, Strict] | None
None

from_dict(obj) classmethod

Create an instance of SearchResultResultsInner from a dict

from_json(json_str) classmethod

Create an instance of SearchResultResultsInner from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

secondary_external_account

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SecondaryExternalAccount

Bases: BaseModel

SecondaryExternalAccount

Parameters:

Name Type Description Default
external_account_id Annotated[str, Strict] | None

The external key ID

None
external_type Annotated[str, Strict] | None
None

external_type_validate_enum(value)

Validates the enum

from_dict(obj) classmethod

Create an instance of SecondaryExternalAccount from a dict

from_json(json_str) classmethod

Create an instance of SecondaryExternalAccount from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

semantic_search_query

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

SemanticSearchQuery

Bases: BaseModel

SemanticSearchQuery

Parameters:

Name Type Description Default
collection SearchOptionsCollection | None
None
request_id Annotated[int, Strict] | None
None
filter SearchOptionsFilter | None
None
field_value_weighting SearchOptionsFieldValueWeighting | None
None
pagination SearchOptionsPagination | None
None
sort SearchOptionsSort | None
None
text Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of SemanticSearchQuery from a dict

from_json(json_str) classmethod

Create an instance of SemanticSearchQuery from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

vantage_api_key

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

VantageAPIKey

Bases: BaseModel

VantageAPIKey

Parameters:

Name Type Description Default
vantage_api_key_id Annotated[str, Strict] | None

The unique id of the API key to access Vantage API endpoints

None
account_id Annotated[str, Strict] | None

The account this key is contained within

None
vantage_api_key_created_date Annotated[str, Strict] | None

date this key was created

None
vantage_api_key_obfuscated Annotated[str, Strict] | None

obfuscated key

None
status Annotated[str, Strict] | None
None

from_dict(obj) classmethod

Create an instance of VantageAPIKey from a dict

from_json(json_str) classmethod

Create an instance of VantageAPIKey from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.
  • OpenAPI readOnly fields are excluded.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias

weighted_field_values

Vantage API

This is a the API to interact with Vantage Discovery, the amazing Semantic Search Platform in the world. We enable developers to build magical discovery experiences into their products and websites. Some useful links: - TODO: Semantic Search Guide: What Is It And Why Does It Matter?

The version of the OpenAPI document: v1.1.2 Contact: devrel@vantagediscovery.com Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

WeightedFieldValues

Bases: BaseModel

WeightedFieldValues

Parameters:

Name Type Description Default
field Annotated[str, Strict] | None
None
value Annotated[str, Strict] | None
None
weight Annotated[float, Strict] | Annotated[int, Strict] | None
None

from_dict(obj) classmethod

Create an instance of WeightedFieldValues from a dict

from_json(json_str) classmethod

Create an instance of WeightedFieldValues from a JSON string

to_dict()

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json()

Returns the JSON representation of the model using alias

to_str()

Returns the string representation of the model using alias