fix(main.py): read azure ad token from optional params extra body

This commit is contained in:
Krrish Dholakia 2024-01-18 17:13:54 -08:00
parent a8ba5df90e
commit e0aaa94f28
2 changed files with 6 additions and 6 deletions

View file

@ -692,9 +692,9 @@ def completion(
or get_secret("AZURE_API_KEY")
)
azure_ad_token = optional_params.pop("azure_ad_token", None) or get_secret(
"AZURE_AD_TOKEN"
)
azure_ad_token = optional_params.get("extra_body", {}).pop(
"azure_ad_token", None
) or get_secret("AZURE_AD_TOKEN")
headers = headers or litellm.headers