mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
azure - log post api call
This commit is contained in:
parent
7041e22aa5
commit
1c263d057d
1 changed files with 9 additions and 1 deletions
|
@ -660,8 +660,16 @@ class AzureChatCompletion(BaseLLM):
|
||||||
response = await azure_client.chat.completions.create(
|
response = await azure_client.chat.completions.create(
|
||||||
**data, timeout=timeout
|
**data, timeout=timeout
|
||||||
)
|
)
|
||||||
|
|
||||||
|
stringified_response = response.model_dump()
|
||||||
|
logging_obj.post_call(
|
||||||
|
input=data["messages"],
|
||||||
|
api_key=api_key,
|
||||||
|
original_response=stringified_response,
|
||||||
|
additional_args={"complete_input_dict": data},
|
||||||
|
)
|
||||||
return convert_to_model_response_object(
|
return convert_to_model_response_object(
|
||||||
response_object=response.model_dump(),
|
response_object=stringified_response,
|
||||||
model_response_object=model_response,
|
model_response_object=model_response,
|
||||||
)
|
)
|
||||||
except AzureOpenAIError as e:
|
except AzureOpenAIError as e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue