mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(databricks.py): handle DONE chunk from databricks
This commit is contained in:
parent
f76cad210c
commit
6f9c29d39b
1 changed files with 2 additions and 0 deletions
|
@ -795,6 +795,8 @@ class ModelResponseIterator:
|
|||
try:
|
||||
chunk = chunk.replace("data:", "")
|
||||
chunk = chunk.strip()
|
||||
if chunk == "[DONE]":
|
||||
raise StopAsyncIteration
|
||||
if len(chunk) > 0:
|
||||
json_chunk = json.loads(chunk)
|
||||
return self.chunk_parser(chunk=json_chunk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue