vercel / ai-chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
https://chat.vercel.ai
Other
9.89k stars 2.5k forks source link

Distinguish between UI and data-only tool outputs #566

Closed ludwigfrank closed 4 days ago

ludwigfrank commented 4 days ago

Currently, the behaviour is that when a tool returns data, it is logged in the chat. If for example a RAG application returns data in getInformation this is rendered, even though it should only be used to generate a final response. Given that some tools require the data to be rendered as react components, what's the suggested way of not rendering the results for other tools? Would it make sense to include this as part of the allowedTools settings?