Skip to content

Added support for passing tool_call_id via the RunContextWrapper #766

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

niv-hertz
Copy link

This PR fixes issue: #559

By adding the tool_call_id to the RunContextWrapper prior to calling tools. This gives the ability to access the tool_call_id in the implementation of the tool.

@niv-hertz
Copy link
Author

@rm-openai - This addressed the issue we discussed in another thread, would love you review :)

Copy link
Collaborator

@rm-openai rm-openai left a comment

Choose a reason for hiding this comment

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

Sorry for delayed review. Was thinking about it, and it feels a bit bad to have tool_call_id be nullable.

What if instead we had ToolContext subclass RunContextWrapper. That way, existing usecases would just work since the downcast is fine. And tool_call_id would be non-null always?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants