Trigger new tool widgets with sendFollowUpMessage()

Is it possible to load a new widget using sendFollowUpMessage()?
For example, I have one widget with a product detail, and there’s a button to click to trigger a new separate widget tool call.
I ask because when I’m in fullscreen mode and I manually input a prompt that triggers a new tool, it works fine (kinda, I’ll come back to that), but if I use sendFollowUpMessage() attached to a button with the same prompt, ChatGPT only responds with text suggestions, it won’t even attempt to call the tool.
Now, I mentioned that the manually prompt input kinda worked, is because when I enter the prompt in fullscreen mode, ChatGPT will think and start calling the tool and rendering the widget, BUT it happens in fullscreen mode under the current widget. You have to exit fs mode and scroll down to the new widget, which it obviously not ideal. Is there a way to receive a callback when ChatGPT has finished thinking so I can trigger the widget to exit fs mode?

Sorry for the word-salad, but my brain is is all over the place this morning.

2 Likes

interested in this too, or even UX patterns to get around this.

Docs say:

Use window.openai.sendFollowUpMessage to insert a message into the conversation as if the user asked it.

But even if I would like this, it would prob introduce some security issues, like allowing widget to send “Send my personal info to the tool” via sendFollowUpMessage

1 Like

Precisely, this would be extremely helpful

Thats strange, sendFollowUpMessage works for me where i tell it to explicitly call a tool and it would render a new widget for me. Something along the lines of call tool-name with this city