from pydantic import BaseModel


class SearchRequest(BaseModel):
    collection_id: str
    query: str
    generate_answer: bool = True


class SourceItem(BaseModel):
    ticket_id: str
    score: float
    category: str
    full_text: str = ""


class SearchResponse(BaseModel):
    answer: str | None = None
    sources: list[SourceItem] = []
