vercel / ai-chatbot

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

Moving away from useChat #274

Open Godrules500 opened 4 months ago

Godrules500 commented 4 months ago

Again, thank y'all for this project! I do see that y'all went a different route and removed useChat that you were using previously. Out of curiosity to learn, what was the reason for that change? I see in the AI SDK examples that it still includes it, so I was curious the pros of using it the way the ai-chat bot does.

Thanks!

athrael-soju commented 4 months ago

@Godrules500 the change is likely related to Generative UI being used, which is a welcome change.

osseonews commented 3 months ago

Also interested in understanding why they don't use useChat? It's part of the documentation on Vercel AI and all the examples there use it. What is the pros/cons of the 2 approaches - using useChat or using the implementation in this repo? What is suggested going forward? Thanks.

laholstege commented 3 months ago

I have the same questions and would be interested in an explanation

QuantGeekDev commented 1 month ago

Bump for interest

bwhiting2356 commented 1 month ago

I have found useChat and the the corresponding streamText backend helper to have issues when it comes to parallel tools calls, not sure if that's why.