The Message List
Messages
Part of: Chat Roles & Messages
Open the developer console while chatting with an AI app and you won't see a paragraph being sent. You'll see a list, a few labeled boxes, each tagged with who said it. That list is the request. Once you see chat as a list of messages instead of a stream of text, the whole API stops feeling like magic. What it is A chat request is an ordered list of messages . Each message is a small object with two parts: a role (who is speaking) and content (what they said). There are three roles you'll use constantly: - system : instructions that set up how the assistant should behave. - user : what the human typed. - assistant : what the model said back. The model reads the entire list , top to bottom, and predicts one thing: the next assistant message. That's the whole contract. You hand it a labeled transcript; it writes the next assistant line. How it works A message is just structured data. In Python it's a dictionary, and the conversation is a list of them: You send that list. The model treats it as one big input, the context from the prediction lessons, and continues it with an assistant turn: Order matters. The roles tell the model who said what, but the sequence tells it how the convers
Challenge: Transcript Renderer