Skip to content
WebDev Path
Back

Week 22: Streaming chat with the Vercel AI SDK

Next video

WebDev Path video lesson

About this lesson

Module:
AI features, deployment and jobs
Time:
about 12 hours
Video:
4 min

Build a chatbot that streams answers from your business facts.

By the end of this week you can

  • Stream answers with streamText and useChat
  • Write instructions that keep the bot on topic
  • Add stop, retry and limits

Learn

  • streamText on the server
  • useChat on the client
  • Instructions and prompt basics
  • Validation and abuse limits

Read or watch

Practice

  1. Build a support chatbot from a list of facts
  2. Make it refuse off-topic questions politely

Build

Finish Project 6: AI chatbot or document assistant.

Check your understanding

Score 4 out of 5 to complete this week.

  1. 1. Why stream AI responses?
  2. 2. In the Vercel AI SDK, which hook manages chat messages in React?
  3. 3. What should happen when the user clicks Stop?
  4. 4. Why limit how many past messages you send to the model?
  5. 5. What does a demo mode without an API key help with?
0 of 5 answered