Learn how to use structured outputs with IronaAI to get responses in a specific format.
response_format={"type": "json_object"}
to the create
method. The response will be a valid JSON string.
json.loads()
in Python or JSON.parse()
in TypeScript.
response_format
. The response will be an instance of that model.
EventsList
instance, allowing direct access to its attributes.
Note: Pydantic models are Python-specific. In TypeScript, use JSON schema or other validation tools.