mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Merge 9cffbdb1ba into a2c814654e
This commit is contained in:
commit
4f14b5b80b
1 changed files with 5 additions and 1 deletions
|
|
@ -174,7 +174,11 @@ class AWSEventStreamDecoder:
|
|||
except Exception as e:
|
||||
verbose_logger.error("Error parsing message: %s. Attempting to combine with next event.", e)
|
||||
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