Open 10xchs opened 5 months ago
Is there any update to this? So much development time is getting wasted because this documentation doesn't make anything clear. I can't find any reference to these events anywhere. Ex: .on('textCreated')
Sorry about this.
It sounds like the assistants streaming helper docs specifically are the most unhelpful, is that so?
I'll reword the title of this issue assuming that's the case, but if you have other specific suggestions or documentation problems to make, I can expand (or you can file a separate issue).
The fix is in, boys. They removed literally all documentation for streaming now. Great?
Yeah, it's unclear in docs... I used to solve it this way, may be it will be helpful for someone else:
const stream = openai.beta.threads.runs.stream(threadId, {
assistant_id: assistantId,
instructions,
// ...
})
.on('event', ({ event, data }) => {
console.log('Received', event, data);
});
I'm also encountering the same error when trying to use the thread running service in my Flutter project. When the event is thread.run.requires_action, the data is not a complete JSON object, so I face issues parsing it. I can listen to each step in the stream to obtain the JSON object, but why should I have to do this? Has it really been so difficult to fix this issue that has been ongoing for months?
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
Look at this code from the docs:
Here it listens for events with
on
.I'm assuming these are just example events, although I have no clue why you wouldn't include an obviously useful event like "completed" in this list.
Below this is this quote: "See the full list of Assistants streaming events in our API reference here."
The link goes here: https://platform.openai.com/docs/api-reference/assistants-streaming/events
It contains this information:
Now aren't those COMPLETELY different from the ones we just saw? And indeed I can't write any of them, for example this:
So now I have to work out this on my own. This is the case with literally every piece of available information in the documentation. Why not make it useful? Is it really THAT difficult? I guess so since no one can do it, but still.
Additional context
No response