Next.js Discord

Discord Forum

resetting the data object that is returned from vercel's useChat in ai sdk

Unanswered
Abyssinian posted this in #help-forum
Open in Discord
AbyssinianOP
has anyone figured out how to reset the 'data' object that comes from vercel's useChat, that is implemented in the create-llama cli apps? I use the 'data' object to send citations and other important metadata for my app, but on subsequent chats it retains the previous information and gets bloated if a session goes on for too long. I don't see a resetData option on vercel's SDK and the only alternative is to reload the page which is slow

0 Replies