fix: aws agent events#9807
Closed
edwinjosechittilappilly wants to merge 4 commits into
Closed
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Member
|
please follow up this PR #9822 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request introduces enhanced support for AWS Anthropic function call streaming in the agent event handling logic. The main changes focus on detecting, processing, and cleaning up AWS Anthropic-specific markup in streaming agent messages, ensuring a smoother and more accurate user experience. Additionally, the dependency specification for
langchain-awsis updated for broader compatibility.AWS Anthropic function call streaming support
_aws_anthropic_state) and helper functions to detect, accumulate, process, and clean AWS Anthropic function call markup in streamed agent text (src/lfx/src/lfx/base/agents/events.py). [1] [2]handle_on_chain_streamto always accumulate text for Anthropic processing, clean up markup, and only send new, cleaned text chunks to the agent message (src/lfx/src/lfx/base/agents/events.py).handle_on_chain_endto perform final processing and cleanup of any remaining AWS Anthropic function call markup before completing the agent message (src/lfx/src/lfx/base/agents/events.py).src/lfx/src/lfx/base/agents/events.py).Dependency update
langchain-awsdependency from an exact version to a minimum version requirement for improved compatibility (pyproject.toml).