forked from phoenix/litellm-mirror
fix(anthropic_adapter.py): fix sync streaming
This commit is contained in:
parent
23cad65256
commit
f5b93fa80d
1 changed files with 4 additions and 1 deletions
|
@ -118,7 +118,10 @@ class AnthropicStreamWrapper(AdapterCompletionStreamWrapper):
|
||||||
return return_chunk
|
return return_chunk
|
||||||
else:
|
else:
|
||||||
return processed_chunk
|
return processed_chunk
|
||||||
|
if self.holding_chunk is not None:
|
||||||
|
return_chunk = self.holding_chunk
|
||||||
|
self.holding_chunk = None
|
||||||
|
return return_chunk
|
||||||
if self.sent_last_message is False:
|
if self.sent_last_message is False:
|
||||||
self.sent_last_message = True
|
self.sent_last_message = True
|
||||||
return {"type": "message_stop"}
|
return {"type": "message_stop"}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue