Improve verbosity of pretty_repr for tool calls #26237
mjclarke94
announced in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Add details of the
call_id
andargs
to thepretty_repr
ofToolMessage()
objects.Motivation
A common pattern is getting an agent to dispatch multiple tool calls in parallel, reducing latency when gathering information. When printing the stream arising from this pattern, it is not apparent which tool message corresponds to which tool call, and async calls would not necessarily preserve ordering.
Modifying the repr for these calls to include a reference to the call_id eliminates ambiguity and makes these responses more meaningful when viewed in isolation.
Proposal (If applicable)
Include the
call_id
in thepretty_repr
:Ideally for readability the args supplied to the function would also be included, but these are not currently present in the
ToolMessage
object and modifying this would have more surface area. This approach seems fairly non-disruptive by comparison.Beta Was this translation helpful? Give feedback.
All reactions