24 lines
466 B
Python
24 lines
466 B
Python
from typing import Literal
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from app.schemas.catalog import Input
|
|
from app.schemas.retrieval import QueryText
|
|
|
|
|
|
class ChatRequest(Input):
|
|
question: QueryText
|
|
|
|
|
|
class SourcePreview(BaseModel):
|
|
title: str
|
|
source_url: str | None = None
|
|
|
|
|
|
class ChatResponse(BaseModel):
|
|
answer: str
|
|
status: Literal["retrieval_only", "no_evidence"]
|
|
sources: list[SourcePreview] = []
|
|
retrieval_run_id: UUID
|