Praison AI
Enterprise
Agents
Bot
Use Cases
University
Docs
Structured outputs with Pydantic schemas
Run
from pydantic import BaseModel from praisonai import Agent class TopicList(BaseModel): topics: list[str] agent = Agent(instructions='Reply with the requested schema fields.') result = agent.chat('List 3 AI agent patterns', output_pydantic=TopicList) for topic in result.topics: print('-', topic)
Press Run. The result appears here.
Esc
Search in
All
Docs
University