Skip to main content
To use Azure OpenAI embedding models, set the EMBEDDING_AZURE_OPENAI_API_KEY, EMBEDDING_AZURE_DEPLOYMENT, EMBEDDING_AZURE_ENDPOINT and EMBEDDING_AZURE_API_VERSION environment variables. You can obtain the Azure OpenAI API key from the Azure Portal.

Usage

As an alternative to using an API key, the Azure Identity credential chain can be used to authenticate with Azure OpenAI role-based security.
If an API key is provided, it will be used for authentication over an Azure Identity
Below is a sample configuration for using Mem0 with Azure OpenAI and Azure Identity:
Refer to Azure Identity troubleshooting tips for setting up an Azure Identity credential.

Config

Here are the parameters available for configuring Azure OpenAI embedder:
ParameterDescriptionDefault Value
modelThe name of the embedding model to usetext-embedding-3-small
embedding_dimsDimensions of the embedding model1536
azure_kwargsThe Azure OpenAI configsconfig_keys