mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
Fix using sync 'litellm.client_session' for async calls in azure.py
This commit is contained in:
parent
765e020e75
commit
9492277fea
1 changed files with 6 additions and 3 deletions
|
|
@ -692,7 +692,7 @@ class AzureChatCompletion(BaseLLM):
|
|||
"api_version": api_version,
|
||||
"azure_endpoint": api_base,
|
||||
"azure_deployment": model,
|
||||
"http_client": litellm.client_session,
|
||||
"http_client": litellm.aclient_session,
|
||||
"max_retries": max_retries,
|
||||
"timeout": timeout,
|
||||
}
|
||||
|
|
@ -860,7 +860,7 @@ class AzureChatCompletion(BaseLLM):
|
|||
"api_version": api_version,
|
||||
"azure_endpoint": api_base,
|
||||
"azure_deployment": model,
|
||||
"http_client": litellm.client_session,
|
||||
"http_client": litellm.aclient_session,
|
||||
"max_retries": data.pop("max_retries", 2),
|
||||
"timeout": timeout,
|
||||
}
|
||||
|
|
@ -989,13 +989,16 @@ class AzureChatCompletion(BaseLLM):
|
|||
"api_version": api_version,
|
||||
"azure_endpoint": api_base,
|
||||
"azure_deployment": model,
|
||||
"http_client": litellm.client_session,
|
||||
"max_retries": max_retries,
|
||||
"timeout": timeout,
|
||||
}
|
||||
azure_client_params = select_azure_base_url_or_endpoint(
|
||||
azure_client_params=azure_client_params
|
||||
)
|
||||
if aembedding:
|
||||
azure_client_params["http_client"] = litellm.aclient_session
|
||||
else:
|
||||
azure_client_params["http_client"] = litellm.client_session
|
||||
if api_key is not None:
|
||||
azure_client_params["api_key"] = api_key
|
||||
elif azure_ad_token is not None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue