Demo-Agentic-Service-Data-Eyond / src /models /structured_output.py
ishaq101's picture
[NOTICKET] Demo agentic agent
bef5e76
raw
history blame contribute delete
635 Bytes
"""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.)"
)