Skip to content

@chinmaymk/aikit v0.0.40


@chinmaymk/aikit / OpenAIEmbeddingOptions

Interface: OpenAIEmbeddingOptions

Defined in: types.ts:267

OpenAI-specific embedding options. Extends the base embedding options with OpenAI-specific parameters.

Extends

Properties

model?

optional model: string

Defined in: types.ts:233

The specific embedding model you want to use. e.g., 'text-embedding-3-small' or 'text-embedding-004'.

Inherited from

EmbeddingProviderOptions.model


dimensions?

optional dimensions: number

Defined in: types.ts:235

The number of dimensions in the output embeddings. Only supported by some models.

Inherited from

EmbeddingProviderOptions.dimensions


taskType?

optional taskType: "query" | "document" | "similarity" | "classification" | "clustering"

Defined in: types.ts:237

The type of task the embeddings will be used for. Helps optimize the embeddings.

Inherited from

EmbeddingProviderOptions.taskType


autoTruncate?

optional autoTruncate: boolean

Defined in: types.ts:239

Whether to automatically truncate input text that exceeds the model's limit.

Inherited from

EmbeddingProviderOptions.autoTruncate


apiKey?

optional apiKey: string

Defined in: types.ts:248

API key for authentication with the provider.

Inherited from

EmbeddingProviderOptions.apiKey


baseURL?

optional baseURL: string

Defined in: types.ts:250

Custom base URL for the API endpoint.

Inherited from

EmbeddingProviderOptions.baseURL


timeout?

optional timeout: number

Defined in: types.ts:252

Request timeout in milliseconds.

Inherited from

EmbeddingProviderOptions.timeout


maxRetries?

optional maxRetries: number

Defined in: types.ts:254

Maximum number of retry attempts for failed requests.

Inherited from

EmbeddingProviderOptions.maxRetries


mutateHeaders()?

optional mutateHeaders: (headers) => void

Defined in: types.ts:260

A function that allows you to modify the headers before a request is sent. This is useful for adding custom headers or modifying existing ones.

Parameters

headers

Record<string, string>

The original headers object to mutate directly.

Returns

void

Inherited from

EmbeddingProviderOptions.mutateHeaders


organization?

optional organization: string

Defined in: types.ts:269

Your OpenAI organization ID. For when you're part of a fancy club.


project?

optional project: string

Defined in: types.ts:271

Your OpenAI project ID. For even fancier clubs.


encodingFormat?

optional encodingFormat: "float" | "base64"

Defined in: types.ts:273

Encoding format for the embeddings. Defaults to 'float'.


user?

optional user: string

Defined in: types.ts:275

A stable identifier for your end-users.

Released under the MIT License.