Skip to content

Conversation

@sjrl
Copy link
Contributor

@sjrl sjrl commented May 23, 2025

Related Issues

  • fixes #issue-number

Proposed Changes:

  • Updates StreamingChunk construction in ToolInvoker to also stream a chunk with a finish reason. This is useful when using the print_streaming_chunk utility method
  • Update the print_streaming_chunk to have better formatting of messages especially when using it with Agent.
    • Also updated to work with the current version of the AWS Bedrock integration by working with the dict representation of ChoiceDeltaToolCall
  • Further improvements will come in feat: Update streaming chunk #9424 but wanted to get this into the 2.14.0 release

Here is an example of a before and after:

  • Biggest improvement is the spacing between headers e.g. [TOOL CALL]
  • The too many newlines will be addressed in the previously mentioned other PR

Here is a before

Screenshot 2025-05-23 at 10 52 47

and an after

Screenshot 2025-05-23 at 10 51 03

How did you test it?

Tested locally

Notes for the reviewer

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@sjrl sjrl requested a review from a team as a code owner May 23, 2025 08:53
@sjrl sjrl requested review from vblagoje and removed request for a team May 23, 2025 08:53
@github-actions github-actions bot added the type:documentation Improvements on the docs label May 23, 2025
@sjrl sjrl added this to the 2.14.0 milestone May 23, 2025
@sjrl sjrl requested a review from a team as a code owner May 23, 2025 08:56
@sjrl sjrl requested review from dfokina and removed request for a team May 23, 2025 08:56
@sjrl sjrl self-assigned this May 23, 2025
@coveralls
Copy link
Collaborator

coveralls commented May 23, 2025

Pull Request Test Coverage Report for Build 15210001148

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 74 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.1%) to 90.087%

Files with Coverage Reduction New Missed Lines %
components/agents/init.py 1 75.0%
utils/init.py 2 33.33%
components/agents/agent.py 10 91.07%
components/generators/utils.py 10 20.0%
dataclasses/state_utils.py 11 0.0%
utils/base_serialization.py 16 86.99%
components/tools/tool_invoker.py 24 83.92%
Totals Coverage Status
Change from base Build 15205760859: -0.1%
Covered Lines: 11341
Relevant Lines: 12589

💛 - Coveralls

Copy link
Member

@vblagoje vblagoje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some optional stylistic suggestions

@sjrl sjrl enabled auto-merge (squash) May 23, 2025 12:13
@sjrl sjrl merged commit 6f5b745 into main May 23, 2025
20 checks passed
@sjrl sjrl deleted the update-print-streaming-chunk branch May 23, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants