Class EmbeddingAPIKeyHeaderProvider

The most basic embedding header provider, used for the vast majority of providers.

Generally, anywhere this can be used in the public astra-db-ts interfaces, you may also pass in a plain string or null/undefined, which is transformed into an EmbeddingAPIKeyHeaderProvider under the hood.

Example

const provider = new EmbeddingAPIKeyHeaderProvider('api-key');
const collection = await db.collection('my_coll', { embeddingApiKey: provider });

// or just

const collection = await db.collection('my_coll', { embeddingApiKey: 'api-key' });

See

EmbeddingHeadersProvider

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

#headers: Record<string, string>

Methods