mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(utils.py): fix vertex anthropic streaming
This commit is contained in:
parent
7007ace6c2
commit
ed5fc3d1f9
4 changed files with 22 additions and 202 deletions
|
@ -8035,6 +8035,10 @@ class CustomStreamWrapper:
|
|||
str_line = chunk
|
||||
if isinstance(chunk, bytes): # Handle binary data
|
||||
str_line = chunk.decode("utf-8") # Convert bytes to string
|
||||
index = str_line.find("data:")
|
||||
if index != -1:
|
||||
str_line = str_line[index:]
|
||||
|
||||
text = ""
|
||||
is_finished = False
|
||||
finish_reason = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue