I have the following code to submit a tool response:
let id;
for (let tool of toolCall) {
id = tool.id;
}
run = openai.beta.threads.runs.submitToolOutputsStream(thread.id, run.id, {
tool_outputs: [{ output: JSON.stringify(results), tool_call_id: id}],
});
return new Response(stream);
}
However this stream returns every single thing about the run. Is there some cleaner way to submit to the tool and then stream the response that the AI gives?