Module 17
The real language model API
anthropic SDK: messages, JSON, tools
When you finish this module you can say:
I can write programs that talk to a real language model while keeping my key safe, parse JSON from it, and let it call tools.
By the end of this module you’ll be able to write an assistant that calls a calculator tool on its own, remembers history, and reports tool errors back to the model.
StartLessons
7 lessons · ≈ 71 min
- First real call and key safety10 min
- The message list and roles9 min
- System prompt and parameters10 min
- Multi-turn chat and the context limit10 min
- Structured output and JSON parsing10 min
- Tool use10 min
- Project: The tool-calling assistant12 min · project
Practice exercises
Short writing exercises, independent of the lessons: Go to the exercises