-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(realtime): include tool arguments in RealtimeToolStart/RealtimeToolEnd events #2028
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
Conversation
|
Hello @seratch. I’ve created this pull request. would really appreciate it if you could take a quick look when you get a chance. Please let me know if there’s anything I should fix or improve here. Thanks a lot for your time and feedback! |
|
Thanks for sending this patch! It seems to be good to go, but I will do manual testing before merging it |
seratch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me. Can you add the same to RealtimeToolEnd events for consistency?
|
Thank you for reviewing the changes. I’ll make sure to apply the same updates to the RealtimeToolEnd events to keep everything consistent. |
…es consistency request from PR openai#2028
|
@seratch I’ve added the arguments field to RealtimeToolEnd events for consistency with RealtimeToolStart. All tests passed. Are there any other issues you’d recommend I look into? I’m free through Friday and would love to spend the time contributing here . Really excited to keep going! |
seratch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for working on this! LGTM
Anything else you think I could help with next? I’d love to keep contributing while I have some free time. |
What I changed
I added an
argumentsfield toRealtimeToolStartevents so developers can see the parameters passed when a tool is invoked.The
tool_endevent already exposes the tool’s output, so adding arguments makes the start and end events more consistent and useful.What I did
argumentsfield to theRealtimeToolStartdataclass inevents.py.It’s stored as a JSON string, following the same convension used by the model layer.
session.pyto include the arguments from the tool call event.argumentsare correctly included — covering normal, empty, and nested JSON cases.Testing
All existing realtime tests passed (156/156).
The new tests verify that arguments are properly included in all scenerios.
This is a simple, low-risk update that fits cleanly into the existing structure of the codebase.
Fixes #1663