Find reranking providers (TypeScript)
|
Hybrid search and reranking are currently in public preview. Development is ongoing, and the features and functionality are subject to change. Astra DB Serverless, and the use of such, is subject to the DataStax Preview Terms. |
Gets information about reranking providers for the find and rerank command, including supported providers, models, and 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 FindRerankingProvidersResult object that contains information about the the reranking providers.
The object contains a single key, rerankingProviders, which holds an untyped map with provider names as keys, and objects describing the provider as values.
Parameters
Use the findRerankingProviders method, which belongs to the DbAdmin class.
Method signature
async findRerankingProviders(
options?: {
filterModelStatus?: ModelLifecycleStatus | '',
timeout: number | TimeoutDescriptor,
}
): FindRerankingProvidersResult;
| 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 reranking 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.findRerankingProviders();
console.log(JSON.stringify(providers));
})();
Client reference
For more information, see the client reference.