Skip to content

Commit

Permalink
bedrock: Fix unchecked error when stream channel is closed (#998)
Browse files Browse the repository at this point in the history
fix(bedrock): Handle unchecked error when stream channel is closed
  • Loading branch information
lucaronca authored Sep 13, 2024
1 parent 71f5789 commit 17d9e48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llms/bedrock/internal/bedrockclient/provider_anthropic.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ func parseStreamingCompletionResponse(ctx context.Context, client *bedrockruntim
}
}
}
if err = stream.Err(); err != nil {
return nil, err
}

return &llms.ContentResponse{
Choices: contentchoices,
Expand Down

0 comments on commit 17d9e48

Please sign in to comment.