28 lines
460 B
Python
28 lines
460 B
Python
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]
|