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
Retrieve a run stream with ai.beta.threads.runs.stream
Add the .on('toolCallDone') hook.
Wait for the response, it does not return with what arguments should the function be called.
Code snippets
conststream=ai.beta.threads.runs.stream(threadId,{assistant_id: assistantId,});stream.on('toolCallDone',(toolCall)=>{console.log(toolCall);// no arguments for function});
OS
macOS
Node version
v20.11.1
Library version
openai v4.36.0
The text was updated successfully, but these errors were encountered:
Just for completeness. In the toolCallDone event with the toolCall.type === code_interpreter, then toolCall.code_interpreter.input is also empty.
As a workaround I'm listening to the event thread.run.step.completed and handling runStep.step_details.type === 'tool_calls' then the input and output properties are both not empty for function and code_interpreter.
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
The "
.on('toolCallDone')
used on the stream returned byai.beta.threads.runs.stream
" does not return arguments (empty string), only function name:To Reproduce
ai.beta.threads.runs.stream
.on('toolCallDone')
hook.Code snippets
OS
macOS
Node version
v20.11.1
Library version
openai v4.36.0
The text was updated successfully, but these errors were encountered: