-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix handling of streaming response in AnthropicClaudeInvocationLayer #4993
Conversation
Pull Request Test Coverage Report for Build 5154996112
💛 - Coveralls |
@silvanocerza I suggest we make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there - if I'm not mistaken, the current version will not work as we want it to for user-provided stream_handler (e.g. our agent handler). We can adapt the proposed solution with a few lines of code and achieve our intended goal.
Merged with branch |
Updated docstrings language a bit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Related Issues
Proposed Changes:
Change the default streaming handler in
AnthropicClaudeInvocationLayer
to a custom one, so that the received streamed response is handled gracefully.How did you test it?
I added new tests for the
AnthropicTokenStreamingHandler
and changed theAnthropicClaudeInvocationLayer
tests.Notes for the reviewer
More info available in the linked issue.