"""Structured output models for LLM.""" from pydantic import BaseModel, Field class IntentClassification(BaseModel): """Intent classification output.""" intent: str = Field( description="The user's intent: 'question', 'greeting', 'goodbye', 'other'" ) needs_search: bool = Field( description="Whether document search is needed" ) search_query: str = Field( default="", description="The query to use for document search if needed" ) direct_response: str = Field( default="", description="Direct response if no search needed (for greetings, etc.)" ) source_hint: str = Field( default="both", description="Which sources to search: 'document' (PDF/DOCX/TXT), 'schema' (DB/CSV/XLSX), or 'both'" )