mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
fix test custom callback router
This commit is contained in:
parent
a765bae2b6
commit
c417ab7a77
1 changed files with 21 additions and 0 deletions
|
@ -717,11 +717,32 @@ class AzureChatCompletion(BaseLLM):
|
|||
model_response_object=model_response,
|
||||
)
|
||||
except AzureOpenAIError as e:
|
||||
## LOGGING
|
||||
logging_obj.post_call(
|
||||
input=data["messages"],
|
||||
api_key=api_key,
|
||||
additional_args={"complete_input_dict": data},
|
||||
original_response=str(e),
|
||||
)
|
||||
exception_mapping_worked = True
|
||||
raise e
|
||||
except asyncio.CancelledError as e:
|
||||
## LOGGING
|
||||
logging_obj.post_call(
|
||||
input=data["messages"],
|
||||
api_key=api_key,
|
||||
additional_args={"complete_input_dict": data},
|
||||
original_response=str(e),
|
||||
)
|
||||
raise AzureOpenAIError(status_code=500, message=str(e))
|
||||
except Exception as e:
|
||||
## LOGGING
|
||||
logging_obj.post_call(
|
||||
input=data["messages"],
|
||||
api_key=api_key,
|
||||
additional_args={"complete_input_dict": data},
|
||||
original_response=str(e),
|
||||
)
|
||||
if hasattr(e, "status_code"):
|
||||
raise e
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue