BaseOpenAIEmbeddingsOptions interface

Base model options common to both OpenAI and Azure OpenAI services.

Properties

dimensions

Optional. Number of dimensions to use when generating embeddings.

logRequests

Optional. Whether to log requests to the console.

requestConfig

Optional. Request options to use when calling the OpenAI API.

retryPolicy

Optional. Retry policy to use when calling the OpenAI API.

Property Details

dimensions

Optional. Number of dimensions to use when generating embeddings.

dimensions?: number

Property Value

number

Remarks

Only valid for embedding models that support dynamic dimensionality.

logRequests

Optional. Whether to log requests to the console.

logRequests?: boolean

Property Value

boolean

Remarks

This is useful for debugging prompts and defaults to false.

requestConfig

Optional. Request options to use when calling the OpenAI API.

requestConfig?: AxiosRequestConfig<any>

Property Value

AxiosRequestConfig<any>

retryPolicy

Optional. Retry policy to use when calling the OpenAI API.

retryPolicy?: number[]

Property Value

number[]

Remarks

The default retry policy is [2000, 5000] which means that the first retry will be after 2 seconds and the second retry will be after 5 seconds.