-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: #2228 Add tool origin tracking to ToolCallItem and ToolCallOutputItem #2242
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,6 +52,7 @@ | |
| ShellCallOutcome, | ||
| ShellCommandOutput, | ||
| Tool, | ||
| _get_tool_origin_info, | ||
| resolve_computer, | ||
| ) | ||
| from ..tool_context import ToolContext | ||
|
|
@@ -973,10 +974,12 @@ async def run_single_tool(func_tool: FunctionTool, tool_call: ResponseFunctionTo | |
|
|
||
| run_item: RunItem | None = None | ||
| if not nested_interruptions: | ||
| tool_origin = _get_tool_origin_info(tool_run.function_tool) | ||
| run_item = ToolCallOutputItem( | ||
| output=result, | ||
| raw_item=ItemHelpers.tool_call_output_item(tool_run.tool_call, result), | ||
| agent=agent, | ||
|
Comment on lines
+977
to
981
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This path only sets Useful? React with 👍 / 👎. |
||
| tool_origin=tool_origin, | ||
| ) | ||
| else: | ||
| # Skip tool output until nested interruptions are resolved. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.