diff --git a/backend/app/models/common.py b/backend/app/models/common.py new file mode 100644 index 0000000..f5500c7 --- /dev/null +++ b/backend/app/models/common.py @@ -0,0 +1,8 @@ +from pydantic import BaseModel + + +class SourceMetadata(BaseModel): + filename: str + upload_date: str + content_summary: str + chunk_index: int diff --git a/backend/app/models/ingest.py b/backend/app/models/ingest.py index 1deda9d..3b54531 100644 --- a/backend/app/models/ingest.py +++ b/backend/app/models/ingest.py @@ -1,27 +1,7 @@ -from datetime import datetime -from typing import List - from pydantic import BaseModel -class SourceMetadata(BaseModel): - filename: str - upload_date: str - content_summary: str - chunk_index: int - - class IngestResponse(BaseModel): document_id: str chunk_count: int filename: str - - -class QueryRequest(BaseModel): - question: str - - -class QueryResponse(BaseModel): - keywords: List[str] - answer: str - sources: List[SourceMetadata] diff --git a/backend/app/models/query.py b/backend/app/models/query.py new file mode 100644 index 0000000..f7ec6ab --- /dev/null +++ b/backend/app/models/query.py @@ -0,0 +1,15 @@ +from typing import List + +from pydantic import BaseModel + +from app.models.common import SourceMetadata + + +class QueryRequest(BaseModel): + question: str + + +class QueryResponse(BaseModel): + keywords: List[str] + answer: str + sources: List[SourceMetadata]