vercel / ai-chatbot

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

streamUI vs render 😢 #333

Open kevb10 opened 4 months ago

kevb10 commented 4 months ago

first off, huge props to you guys for putting this project out into the world, including the AI SDK work.

Im running into a problem with streamUI that I didn't experience with render. for some reason, it always wants to use tools even when it already has the info.

streamUI example:

user: get today's events
assistant: [ok here are all of today's events in a nice ui] 
user: awesome, suggest 3 times to schedule a 15 minute call this pm
assistant: [ok here are all of today's events in a nice ui] 
user: can you just write it in plain text
assistant: [ok here are all of today's events in a nice ui] 

it's as if it's unable to look at its memory/history and just pull from there. ps: when I print aiState.get(), I see all history. pss: I followed the migration guide -- made sure it aligns with this commit https://github.com/vercel/ai-chatbot/commit/095550d4dca22dc506cdbda815cab94cfe8fbe74

render example:

user: get today's events
assistant: [ok here are all of today's events in a nice ui] 
user: awesome, suggest 3 times to schedule a 15 minute call this pm
assistant: seems like you're free at 4,5,6 so just pick which one works best

I've tried tweaking temp/top_p and the system prompt to no avail. I didn't make any changes other than what were mentioned in the migration guide. I've downgraded to 3.0.12. Using render still works great so I'm going to keep using it until this is addressed.

Thank you @vercel team

defless commented 2 months ago

Hey 👋

Could you provide your streamUI code ? I was facing a similar issue and I would like to compare

Thanks @kevb10