fix(streaming_handler.py): remove chunk logging on sync streaming handler

causes success event to be double logged
This commit is contained in:
Krrish Dholakia 2025-04-04 20:31:02 -07:00
parent b5851769fc
commit b94b6dd76e

View file

@ -1573,11 +1573,11 @@ class CustomStreamWrapper:
completion_start_time=datetime.datetime.now() completion_start_time=datetime.datetime.now()
) )
## LOGGING ## LOGGING
executor.submit( # executor.submit(
self.run_success_logging_and_cache_storage, # self.run_success_logging_and_cache_storage,
response, # response,
cache_hit, # cache_hit,
) # log response # ) # log response
choice = response.choices[0] choice = response.choices[0]
if isinstance(choice, StreamingChoices): if isinstance(choice, StreamingChoices):
self.response_uptil_now += choice.delta.get("content", "") or "" self.response_uptil_now += choice.delta.get("content", "") or ""