langchain-aws
langchain-aws copied to clipboard
Bug: Fix recursion error when using streaming with tools
Added additional param to allow independent turning off for streaming to ensure recursion errors don't occur when calling generate from stream with streaming=True on BedrockChat
Fixes #80
@3coins @bigbernnn can you please have a look? I confirmed this PR is working
@munday-tech Looks good! Please fix small linting error.
@bigbernnn Should be fixed now.
Is there any update on this? I am facing the same issue
I did a quick test with this solution. While this fixes the recursion bug, the tokens are still not being streamed (for claude-3 models)
@munday-tech could you review the changes requested and also confirm if the tokens get streamed with this fix ?
Working on another PR, that allows streaming to work as expected. The change here uses interplay between _stream and _generate and does not return the chunks independently. See https://github.com/langchain-ai/langchain-aws/pull/119
Fixed by #119