Spaces:
Sleeping
Sleeping
File size: 620 Bytes
36bfe21 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | from pydantic import BaseModel
from typing import Optional, List
class DocumentChunk(BaseModel):
"""Model for a document chunk to be indexed."""
chunk_id: str
chapter_number: int
chapter_title: str
section_title: str
content: str
content_type: str # text, code, callout, quiz
url: str
keywords: Optional[List[str]] = None
word_count: int
class SearchResult(BaseModel):
"""Model for a search result from Qdrant."""
chunk_id: str
chapter_number: int
chapter_title: str
section_title: str
content: str
content_type: str
url: str
score: float
|