Syllabus

  1. 01First RequestsSet up the SDK and your API key safely, build a request, and pull the text out of a response object.3 lessons
    1. 01Setting Up the SDK and Your Key
    2. 02Anatomy of a Request
    3. 03Reading the Response
  2. 02Roles, History and ExamplesStructure input with developer and user roles, carry conversation history while keeping it within limits, and teach patterns with few-shot examples.3 lessons
    1. 01Developer and User Messages
    2. 02Conversation History
    3. 03A Few-Shot Classifier
  3. 03Reliable OutputValidate structured JSON output, estimate tokens and cost, and retry transient errors with exponential backoff.3 lessons
    1. 01Validating Structured Output
    2. 02Estimating Tokens and Cost
    3. 03Retrying with Exponential Backoff
  4. 04Function CallingLet the model request your application's functions, run them safely, and send the results back.1 lesson
    1. 01Handling Function Calls
  5. 05Project: A Pantry Recipe HelperCombine prompt building, structured-output validation and grounding checks into a small recipe helper.1 lesson
    1. 01Project: Pantry Recipe Helper