mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
add bedrock anthropic streaming
This commit is contained in:
parent
c8d0a907ac
commit
eb25e9f15f
1 changed files with 2 additions and 0 deletions
|
@ -3026,6 +3026,8 @@ class CustomStreamWrapper:
|
||||||
finish_reason = ""
|
finish_reason = ""
|
||||||
if "outputText" in chunk_data:
|
if "outputText" in chunk_data:
|
||||||
text = chunk_data['outputText']
|
text = chunk_data['outputText']
|
||||||
|
if "completion" in chunk_data:
|
||||||
|
text = chunk_data['completion'] # bedrock.anthropic
|
||||||
if chunk_data.get("completionReason", None):
|
if chunk_data.get("completionReason", None):
|
||||||
is_finished = True
|
is_finished = True
|
||||||
finish_reason = chunk_data["completionReason"]
|
finish_reason = chunk_data["completionReason"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue