Skip to content
skillbld
Day 4 of 14 35 minMulti-turnStreamingStop reasons

Build multi-turn chat by sending the history with every request, keep long conversations inside the context window, and stream replies so users see text as it's written.

By the end of today you can

  • Explain why chat apps resend the whole conversation on every turn
  • Build and manage a message history in code
  • Keep long conversations within the context window
  • Stream responses so text appears as it's generated
  • Handle the different stop reasons correctly

What's inside

  • 5 sections
  • 3 diagrams and mind maps
  • 4 code examples you can run
  • 5-question quiz
  1. 1The API has no memory
  2. 2Long conversations cost more
  3. 3Keeping inside the context window
  4. 4Streaming: show text as it's written
  5. 5Handling stop reasons

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free
Day 4: Conversations & Streaming · AI: Building with LLMs · SkillBld