Back to prompt library
Pydantic AI Agent Configuration
Linked challenge: Extract Short-Term Rental Analytics with Pydantic AI and Together AI
Prompt source
implementation9 lines3 sectionsNo variables0 checklist items
from pydantic import BaseModel
from pydantic_ai import Agent
class VacationMarketStats(BaseModel):
market_name: str
peak_occupancy_rate: float
average_daily_rate: float
permit_capped: bool
max_active_permits: int
agent = Agent('together:meta-llama/Llama-3.3-70B-Instruct', result_type=VacationMarketStats)