Find embedding providers (TypeScript)
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 promise that resolves to a FindEmbeddingProvidersResult object that contains information about the embedding providers.
The information in the response is arranged as a hierarchy of nested classes:
Signature
Use the findEmbeddingProviders method, which belongs to the DbAdmin class.
async findEmbeddingProviders(
options?: {
filterModelStatus?: ModelLifecycleStatus | '',
timeout: number | TimeoutDescriptor,
}
): FindEmbeddingProvidersResult;
Parameters
| Name | Type | Summary |
|---|---|---|
|
|
Optional.
The options for this operation.
See Properties of |
| Name | Type | Summary |
|---|---|---|
|
|
Optional. Filters the available models by status. Default: |
|
|
Optional. The client-side timeout for this operation. |
Examples
The following examples demonstrate how to find embedding providers.
import { DataAPIClient } from "@datastax/astra-db-ts";
const client = new DataAPIClient("APPLICATION_TOKEN");
const admin = client.admin();
const databaseAdmin = admin.dbAdmin("API_ENDPOINT");
(async function () {
const providers = await databaseAdmin.findEmbeddingProviders();
console.log(JSON.stringify(providers));
})();
Errors
Specific error codes for this command include VECTORIZE_FEATURE_NOT_AVAILABLE.
For a full list of Data API error codes and their corresponding messages, see Data API errors and error codes.
For more information about how the client handles underlying Data API errors, see TypeScript client error handling.
Client reference
For more information, see the client reference.