Azure OpenAI Embedder is a class that allows you to embed documents using Azure OpenAI.

Parameters

ParameterTypeDescriptionDefault
idstrThe model ID that matches your deployed model"text-embedding-3-small"
dimensionsintOutput dimensions of the embedding1536
encoding_formatLiteral["float", "base64"]Format of the embedding output"float"
userOptional[str]A unique identifier representing your end-userNone
api_keyOptional[str]Azure OpenAI API keyEnvironment variable AZURE_EMBEDDER_OPENAI_API_KEY
api_versionstrAzure OpenAI API versionEnvironment variable AZURE_EMBEDDER_OPENAI_API_VERSION or "2024-10-21"
azure_endpointOptional[str]Azure OpenAI endpoint URLEnvironment variable AZURE_EMBEDDER_OPENAI_ENDPOINT
azure_deploymentOptional[str]Azure OpenAI deployment nameEnvironment variable AZURE_EMBEDDER_DEPLOYMENT
base_urlOptional[str]Base URL for API requestsNone
azure_ad_tokenOptional[str]Azure AD token for authenticationNone
azure_ad_token_providerOptional[Any]Provider for Azure AD tokensNone
organizationOptional[str]Organization ID for API requestsNone
request_paramsOptional[Dict[str, Any]]Additional parameters for embedding requestsNone
client_paramsOptional[Dict[str, Any]]Additional parameters for client initializationNone
openai_clientOptional[AzureOpenAIClient]Pre-configured Azure OpenAI clientNone