fix(utils.py): azure tool calling streaming

This commit is contained in:
Krrish Dholakia 2023-11-27 19:07:38 -08:00
parent 4cdd930fa2
commit e8331a4647
4 changed files with 55 additions and 12 deletions

View file

@ -194,7 +194,6 @@ class AzureChatCompletion(BaseLLM):
azure_client_params["azure_ad_token"] = azure_ad_token
azure_client = AsyncAzureOpenAI(**azure_client_params)
response = await azure_client.chat.completions.create(**data)
response.model = "azure/" + str(response.model)
return convert_to_model_response_object(response_object=json.loads(response.model_dump_json()), model_response_object=model_response)
except AzureOpenAIError as e:
exception_mapping_worked = True