Ship the Persona Chatbot
assembling and shipping
Part of: Persona Chatbot
Every piece is built: message history, a persona system prompt, token budgeting, summarize-and-drop trimming, streaming, and error handling. This lesson bolts them into one runnable object and ships it. Finish this and the project lands in your Portfolio . The whole thing, assembled A chat session is just the loop from lesson 3 wrapped around the guards from lessons 4-7. Here's the shape: Read it top to bottom and every lesson is there: system is the persona (lesson 2), history is the memory (lesson 1), tokens and trim are the budget and sliding window (lessons 4-5), the stream block is streaming (lesson 6), and the empty-input guard is the hardening (lesson 7). The loop discipline, append user, get reply, append assistant, is lesson 3, untouched. What "shipped" means You don't need a fancy deployment. Shipped means three things are true: 1. It runs from a clean start with one command and your API key in the environment. 2. It handles an empty or weird input without crashing. 3. Someone else could use it from your instructions alone. Run it, chat with your character for a dozen turns, watch it stay in persona and stream, then feed it a blank line and a very long message to prove th
Challenge: Ship Checklist