mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-28 04:04:31 +00:00
(fix) azure_ad_token
This commit is contained in:
parent
e3369bb260
commit
1bb99af134
1 changed files with 2 additions and 1 deletions
|
@ -214,6 +214,7 @@ class AzureChatCompletion(BaseLLM):
|
||||||
input: list,
|
input: list,
|
||||||
api_key: str,
|
api_key: str,
|
||||||
api_base: str,
|
api_base: str,
|
||||||
|
azure_ad_token: str,
|
||||||
api_version: str,
|
api_version: str,
|
||||||
logging_obj=None,
|
logging_obj=None,
|
||||||
model_response=None,
|
model_response=None,
|
||||||
|
@ -221,7 +222,7 @@ class AzureChatCompletion(BaseLLM):
|
||||||
super().embedding()
|
super().embedding()
|
||||||
exception_mapping_worked = False
|
exception_mapping_worked = False
|
||||||
try:
|
try:
|
||||||
headers = self.validate_environment(api_key)
|
headers = self.validate_environment(api_key, azure_ad_token=azure_ad_token)
|
||||||
# Ensure api_base ends with a trailing slash
|
# Ensure api_base ends with a trailing slash
|
||||||
if not api_base.endswith('/'):
|
if not api_base.endswith('/'):
|
||||||
api_base += '/'
|
api_base += '/'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue