Locked · Module 2, lesson 1 of 8

The messages API, properly: roles, turns and stop reasons

Build a conversation as a list of messages, read why a reply stopped (finished, length, tool call), and predict the reply's shape for four requests.

This lesson comes with the course. Enrolment is not open yet, and no payment is taken now.

Tell me when the course opens

The 7 lessons of module 1 are free: see the lessons of the course.

Your first agent in forty linesNext: A thin client of your own: one function, any provider