@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?
optionalmodel: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?
optionaldimensions:number
Defined in: types.ts:235
The number of dimensions in the output embeddings. Only supported by some models.
Inherited from
EmbeddingProviderOptions.dimensions
taskType?
optionaltaskType:"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?
optionalautoTruncate:boolean
Defined in: types.ts:239
Whether to automatically truncate input text that exceeds the model's limit.
Inherited from
EmbeddingProviderOptions.autoTruncate
apiKey?
optionalapiKey:string
Defined in: types.ts:248
API key for authentication with the provider.
Inherited from
EmbeddingProviderOptions.apiKey
baseURL?
optionalbaseURL:string
Defined in: types.ts:250
Custom base URL for the API endpoint.
Inherited from
EmbeddingProviderOptions.baseURL
timeout?
optionaltimeout:number
Defined in: types.ts:252
Request timeout in milliseconds.
Inherited from
EmbeddingProviderOptions.timeout
maxRetries?
optionalmaxRetries:number
Defined in: types.ts:254
Maximum number of retry attempts for failed requests.
Inherited from
EmbeddingProviderOptions.maxRetries
mutateHeaders()?
optionalmutateHeaders: (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?
optionalorganization:string
Defined in: types.ts:269
Your OpenAI organization ID. For when you're part of a fancy club.
project?
optionalproject:string
Defined in: types.ts:271
Your OpenAI project ID. For even fancier clubs.
encodingFormat?
optionalencodingFormat:"float"|"base64"
Defined in: types.ts:273
Encoding format for the embeddings. Defaults to 'float'.
user?
optionaluser:string
Defined in: types.ts:275
A stable identifier for your end-users.