Find answers from the community

Updated 3 months ago

Seeing above error message when using

Seeing above error message when using
llama-index-embeddings-azure-openai
version 0.2.2

The error message I'm encountering indicates that the azure_ad_token_provider field in the AzureOpenAIEmbedding class expects a callable (i.e., a function), but it's receiving None instead. This is causing the validation to fail. I'm passing in an api_key as I always did, wonder what's wrong here and why it's throwing a vliadation error?

```
llm = AzureOpenAI(
model="gpt-4o",
deployment_name="gpt-4o",
api_key=aoai_api_key,
azure_endpoint=aoai_endpoint,
api_version=aoai_api_version,
)

embed_model = AzureOpenAIEmbedding(
model="text-embedding-ada-002",
deployment_name="text-embedding-ada-002",
api_key=aoai_api_key,
azure_endpoint=aoai_endpoint,
api_version=aoai_api_version,
)
ValidationError: 1 validation error for AzureOpenAIEmbedding
azure_ad_token_provider
Input should be callable [type=callable_type, input_value=None, input_type=NoneType]
Add a reply
Sign up and join the conversation on Discord