Interface VectorizeServiceOptions

The options for defining the embedding service used for vectorize, to automatically transform your text into a vector ready for semantic vector searching.

You can find out more information about each provider/model in the DataStax docs, or through DbAdmin.findEmbeddingProviders.

Field

provider - The name of the embedding provider which provides the model to use

Field

model - The specific model to use for embedding, or undefined if it's an endpoint-defined model

Field

authentication - Object containing any necessary collection-bound authentication, if any

Field

parameters - Object allowing arbitrary parameters that may be necessary on a per-model basis

interface VectorizeServiceOptions {
    authentication?: Record<string, undefined | string>;
    modelName: string | nullish;
    parameters?: Record<string, unknown>;
    provider: string;
}

Properties

authentication?: Record<string, undefined | string>

Object containing any necessary collection-bound authentication, if any.

Most commonly, providerKey: '*SHARED_SECRET_NAME*' may be used here to reference an API key from the Astra KMS.

Db.createCollection and Db.collection both offer an embeddingApiKey parameter which utilizes header-based auth to pass the provider's token/api-key to the Data API on a per-request basis instead, if that is preferred (or necessary).

modelName: string | nullish

The name of the embedding model to use.

You can find out more information about each model in the DataStax docs, or through DbAdmin.findEmbeddingProviders.

parameters?: Record<string, unknown>

Object allowing arbitrary parameters that may be necessary on a per-model/per-provider basis.

Not all providers need this, but some, such as huggingfaceDedicated have required parameters, others have optional parameters (e.g. openAi), and some don't require any at all.

You can find out more information about each provider/model in the DataStax docs, or through DbAdmin.findEmbeddingProviders.

provider: string

The name of the embedding provider which provides the model to use.

You can find out more information about each provider in the DataStax docs, or through DbAdmin.findEmbeddingProviders.