YUNOVA · AI Agents · Module 9: Agents with the OpenAI and Claude SDKs
Structured outputs in the SDK
Structured outputs in the SDK
Key points
- Structured outputs में model का जवाब तय schema वाले JSON में मिलता है।
- Python में अक्सर Pydantic model से schema define किया जाता है और जवाब उसी में parse होता है।
- इससे code में जवाब पढ़ना भरोसेमंद होता है; फिर भी validation और error handling रखें।