mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
Merge pull request #2728 from BerriAI/litellm_reduce_deep_copies
[FEAT] Proxy - reduce deep copies
This commit is contained in:
commit
c96e1af901
1 changed files with 2 additions and 3 deletions
|
@ -463,16 +463,15 @@ class ProxyLogging:
|
|||
Covers:
|
||||
1. /chat/completions
|
||||
"""
|
||||
new_response = copy.deepcopy(response)
|
||||
for callback in litellm.callbacks:
|
||||
try:
|
||||
if isinstance(callback, CustomLogger):
|
||||
await callback.async_post_call_success_hook(
|
||||
user_api_key_dict=user_api_key_dict, response=new_response
|
||||
user_api_key_dict=user_api_key_dict, response=response
|
||||
)
|
||||
except Exception as e:
|
||||
raise e
|
||||
return new_response
|
||||
return response
|
||||
|
||||
async def post_call_streaming_hook(
|
||||
self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue