Next.js Discord

Discord Forum

How to use execute from StreamUI in Vercel AI SDK

Unanswered
Cape lion posted this in #help-forum
Open in Discord
Cape lionOP
In the generateText, tools have the function signature that includes an execute parameter to return the output of the tool to the llm in order to inform further generation. The streamUI function replaces that with a generate param that returns a React component to be rendered. However, I want to use streamUI, but have my tool return a data to inform the model, and I don't need anything to be rendered. All the examples in the Vercel ai chatbot that use the ai parameter do not use the generate to inform the model. Is this possible?

1 Reply

Devon Rex
I am confused about this also. Are the vercel ai rsc "tools" the same as the OpenAI concept of tools. Or are they different things? I could see needing two different concepts. A tool that has serilizable (text) output to be used by the LLM. Then maybe a UI tool for processing LLM output into React components to be streamed to the client.