Skip to content

01b · Python typing, data modelling and validation

Chapter 1 §3–4 gave you enough typing and Pydantic to make Relay's first service pass mypy and validate one tool call. This chapter is what happens six months later: the schema has grown into elaborate discriminated unions, three engineers are extending it in parallel without reading each other's diffs, mypy and pyright disagree on a rebase, a provider's structured-output mode silently rejects a schema that worked fine straight out of the SDK's own tutorial, and the production number nobody wrote down anywhere is how often does the model's raw output actually validate on the first try. …

🔒 La suite est en accès freemium

Tu lis ici l'aperçu libre. Avec un compte gratuit (30 secondes, sans carte), tu lis en entier les chapitres de base : l'introduction à la pile agentique, Python moderne pour l'IA, Java moderne pour l'IA et la boucle d'agent. Les LLM de l'intérieur, le RAG, les outils et MCP, la mémoire, le multi-agents, les frameworks, la production, les exercices, les quiz corrigés et les solutions font partie du manuel complet.

Créer un compte gratuit Se connecter