You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
This is a feature request for the Node library
Describe the feature or improvement you're requesting
Current Behavior
When handling tool outputs using submitToolOutputsStream(), we currently need to track the run_id through the runStepCreated event; it would be better if the run_id is available in the toolCallDone event's payload.
The toolCallDone event handler should receive the run_id directly in its payload, eliminating the need for the separate runStepCreated event handler. This would simplify the code and remove potential race conditions.
Eliminates potential race conditions between events
Reduces unnecessary state management
More intuitive API design
Additional Context
This enhancement would be particularly useful when chaining multiple tool calls, as it would remove the need to maintain run ID state between event handlers.
Environment
OpenAI Node.js Library Version: [4.77.3]
Additional context
No response
The text was updated successfully, but these errors were encountered:
carmen0208
changed the title
[streaming]get run_id from toolCallDone event
streaming - get run_id from toolCallDone event
Jan 13, 2025
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
Current Behavior
When handling tool outputs using
submitToolOutputsStream()
, we currently need to track therun_id
through therunStepCreated
event; it would be better if therun_id
is available in thetoolCallDone
event's payload.Current pattern:
Proposed Enhancement
The
toolCallDone
event handler should receive therun_id
directly in its payload, eliminating the need for the separaterunStepCreated
event handler. This would simplify the code and remove potential race conditions.Suggested pattern:
Benefits
Additional Context
This enhancement would be particularly useful when chaining multiple tool calls, as it would remove the need to maintain run ID state between event handlers.
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: