Embedders#
Supported Embedder Providers#
NeMo Agent toolkit supports the following embedder providers:
Provider |
Type |
Description |
|---|---|---|
|
NVIDIA Inference Microservice (NIM) |
|
|
OpenAI API |
|
|
Azure OpenAI API |
Embedder Configuration#
The embedder configuration is defined in the embedders section of the workflow configuration file. The _type value refers to the embedder provider, and the model_name value always refers to the name of the model to use.
embedders:
nim_embedder:
_type: nim
model_name: nvidia/nv-embedqa-e5-v5
openai_embedder:
_type: openai
model_name: text-embedding-3-small
azure_openai_embedder:
_type: azure_openai
azure_deployment: text-embedding-3-small
NVIDIA NIM#
You can use the following environment variables to configure the NVIDIA NIM embedder provider:
NVIDIA_API_KEY- The API key to access NVIDIA NIM resources
The NIM embedder provider is defined by the NIMEmbedderModelConfig class.
model_name- The name of the model to useapi_key- The API key to use for the modelbase_url- The base URL to use for the modelmax_retries- The maximum number of retries for the requesttruncate- The truncation strategy to use for the model
OpenAI#
You can use the following environment variables to configure the OpenAI embedder provider:
OPENAI_API_KEY- The API key to access OpenAI resources
The OpenAI embedder provider is defined by the OpenAIEmbedderModelConfig class.
model_name- The name of the model to useapi_key- The API key to use for the modelbase_url- The base URL to use for the modelmax_retries- The maximum number of retries for the request
Azure OpenAI#
You can use the following environment variables to configure the Azure OpenAI embedder provider:
AZURE_OPENAI_API_KEY- The API key to access Azure OpenAI resourcesAZURE_OPENAI_ENDPOINT- The Azure OpenAI endpoint to access Azure OpenAI resources
The Azure OpenAI embedder provider is defined by the AzureOpenAIEmbedderModelConfig class.
api_key- The API key to use for the modelapi_version- The API version to use for the modelazure_endpoint- The Azure OpenAI endpoint to use for the modelazure_deployment- The name of the Azure OpenAI deployment to use