Hi, I’m using window.openai.sendFollowUpMessage in my widget.
The issue is that the Promise returned by this function resolves immediately, long before GPT even starts or finishes writing the response.
JavaScript
// It resolves instantly, regardless of the GPT's response status
await window.openai.sendFollowUpMessage({ prompt: "..." });
console.log("Resolved!"); // This prints almost at the same time as the call
Is there any way to know when GPT has completely finished generating the response? I need to sync my UI with the end of the message.
Is there a specific callback or an event listener for this?
For features requiring synchronization between widgets and LLM responses, a method to check the LLM’s response completion status is absolutely essential.
In PIP or FullScreen modes, synchronizing user interactions with the widget is often critical.
I’d like to know if you plan to add this functionality, perhaps by including additional information in the status values readable by the widget.
This is sort of a feature request, when would you expect this message triggered a response and maybe multiple tool calls? Resolve after the first response? Or resolve after everything settled?
NOTE: I’m not responsible for implementing this, or even saying it will definitely be implemented, I’m just gathering information.
I need a way to detect when GPT has finished generating its response for each sendFollowUpMessage() call. Since I’m making multiple consecutive calls in the same session, I need to know when each response completes so I can sync my UI and then trigger the next message.
any new info on this? on another threads they suggest a settimeout or related solutions but they are not really best practices or matching the intent of what we need