@chinmaymk/aikit / EmbeddingProviderOptions
Interface: EmbeddingProviderOptions
Defined in: types.ts:246
Base interface for embedding provider-specific configuration options. Contains common options shared across all AI embedding providers.
Extends
Extended by
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
dimensions?
optional
dimensions:number
Defined in: types.ts:235
The number of dimensions in the output embeddings. Only supported by some models.
Inherited from
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
autoTruncate?
optional
autoTruncate:boolean
Defined in: types.ts:239
Whether to automatically truncate input text that exceeds the model's limit.
Inherited from
apiKey?
optional
apiKey:string
Defined in: types.ts:248
API key for authentication with the provider.
baseURL?
optional
baseURL:string
Defined in: types.ts:250
Custom base URL for the API endpoint.
timeout?
optional
timeout:number
Defined in: types.ts:252
Request timeout in milliseconds.
maxRetries?
optional
maxRetries:number
Defined in: types.ts:254
Maximum number of retry attempts for failed requests.
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