Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ardf committed Sep 2, 2024
1 parent d89fcf8 commit f84b8df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/aws/langchain_aws/llms/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def _stream_response_to_generation_chunk(
return AIMessageChunk(
content="",
response_metadata={
"stop_reason": stream_response["delta"]["stop_reason"],
"stop_sequence": stream_response["delta"]["stop_sequence"],
"stop_reason": stream_response["delta"].get("stop_reason"),
"stop_sequence": stream_response["delta"].get("stop_sequence"),
},
)
else:
Expand Down

0 comments on commit f84b8df

Please sign in to comment.