Closed uahmad235 closed 1 month ago
Hey @uahmad235 , Looking into it will get back to you.
Were you able to reproduce it? @ketangangal
Finally got it working. Took me a couple of hours before i could figure it out. Docs literally need an update! Here's the solution, you have to initialize embedder as well otherwise it looks for openai embedder by default:
config = {
"llm": {
"provider": "azure_openai",
"config": {
"model": '<deployment-name-in-azure>',
"temperature": 0.1,
"max_tokens": 2000,
"azure_kwargs" : {
"azure_deployment" : DEPLOYMENT_NAME,
"api_version" : AZURE_API_VERSION,
"azure_endpoint" : AZURE_OPENAI_ENDPOINT,
"api_key" : AZURE_OPENAI_API_KEY
}
}
},
"embedder": {
"provider": "azure_openai",
"config": {
"model": "text-embedding-3-large", # this is "model" name and not azure deployment name
"azure_kwargs" : {
"api_version" :AZURE_API_VERSION,
"azure_deployment" : "<your-embeddings-deployment-in-azure-openai>",
"azure_endpoint" : AZURE_OPENAI_ENDPOINT,
"api_key": AZURE_OPENAI_API_KEY
}
}
}
}
🐛 Describe the bug
I am trying to get this example working from docs but getting error. The deployment works if i directly use
litellm
sdk.Here's my code:
Full Error traceback: