Find embedding providers (Python)
Gets information about embedding providers for automatic embedding generation, including supported providers, models, dimensions, and other configuration parameters.
Different databases might have different models available.
|
You need an application token with permission to interact with the target database, such as the Database Administrator role. For more information, see Get endpoint and token. |
Result
Returns a FindEmbeddingProvidersResult object that contains information about the the embedding providers.
The information in the response is arranged as a hierarchy of nested classes:
Parameters
Use the find_embedding_providers method, which belongs to the AstraDBDatabaseAdmin class.
Method signature
find_embedding_providers(
*,
filter_model_status: str | ModelStatus,
database_admin_timeout_ms: int,
request_timeout_ms: int,
timeout_ms: int,
) -> FindEmbeddingProvidersResult
| Name | Type | Summary |
|---|---|---|
|
|
Optional. Filters the available models by status. Default: |
|
|
Optional.
A timeout, in milliseconds, to impose on the underlying API request.
If not provided, the This parameter is aliased as |
Examples
The following examples demonstrate how to find embedding providers.
from astrapy import DataAPIClient
client = DataAPIClient("APPLICATION_TOKEN")
admin = client.get_admin()
database_admin = admin.get_database_admin("API_ENDPOINT")
providers = database_admin.find_embedding_providers()
# Use the raw dict
print(providers.raw_info)
# Or work with the resulting object:
print(providers.embedding_providers.keys())
print(providers.embedding_providers["openai"])
print(providers.embedding_providers["openai"].parameters)
print(providers.embedding_providers["openai"].supported_authentication)
print(providers.embedding_providers["openai"].models[0])
print(providers.embedding_providers["openai"].models[0].parameters)
Client reference
For more information, see the client reference.