HitendraKawale's picture
Deploy RAG Chunk Visualizer with multi-provider LLM support
1c223a0 verified
Raw History Blame Contribute Delete
377 Bytes
from __future__ import annotations
from dataclasses import asdict, dataclass
@dataclass(frozen=True, slots=True)
class ChunkRecord:
chunk_id: str
doc_id: str
filename: str
chunk_index: int
char_start: int
char_end: int
char_count: int
word_count: int
preview: str
text: str
def to_dict(self) -> dict:
return asdict(self)