Skip to content

https://arxiv.org/abs/2606.28344. The end of web parsing. The beginning of scalable pixel-native search. link: https://pixelrag.ai/

415 B
Raw Blame
"""Base class for document sources."""

from dataclasses import dataclass, field
from typing import Iterator


@dataclass
class Document:
    id: str
    url: str | None = None
    path: str | None = None
    metadata: dict = field(default_factory=dict)


class Source:
    def __iter__(self) -> Iterator[Document]:
        raise NotImplementedError

    def __len__(self) -> int:
        raise NotImplementedError