Next.js Discord

Discord Forum

Genrative UI example - how to get assistant reply from AI state for making request

Unanswered
Korean bullhead posted this in #help-forum
Open in Discord
Korean bullheadOP
Hi,

I've been making changes to the example found in the docs here : https://sdk.vercel.ai/docs/concepts/ai-rsc

I've have the assistant providing a query object response for my external api to request, however, I am unable to retrieve this from the AI state within the function callback?

For example, within the get_flight_info function, how would I replace the flightNumber with a response from the assistant rather than user input?

Any help relly appreciated 🙏

0 Replies