mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Fix log spamming for custom sagemaker [DONE] chunk in streams
This commit is contained in:
parent
8e30cfbeb1
commit
9cffbdb1ba
1 changed files with 5 additions and 1 deletions
|
|
@ -173,7 +173,11 @@ class AWSEventStreamDecoder:
|
|||
except Exception as e:
|
||||
verbose_logger.error(f"Error parsing message: {e}. Attempting to combine with next event.")
|
||||
continue
|
||||
|
||||
|
||||
# remove custom sagemaker [DONE] message in stream
|
||||
if accumulated_json.endswith("[DONE]"):
|
||||
accumulated_json = accumulated_json[:-6].strip()
|
||||
|
||||
# Handle any remaining data after the iterator is exhausted
|
||||
if accumulated_json:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue