ractogateway.rag.page_index._models
Pydantic models for the PageIndexRAG pipeline.
- class ractogateway.rag.page_index._models.PageEntry(**data)[source]
Bases:
BaseModelA single page (or fixed-size window) extracted from a document.
Produced by
PageIndexRAGduring ingestion and stored in the in-process index.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- entry_id: str
- content: str
- source: str
- doc_id: str
- char_count: int
- ocr_applied: bool
- property text: str
Alias for content.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway.rag.page_index._models.PageIndexResult(**data)[source]
Bases:
BaseModelA single retrieved page together with its BM25 relevance score.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- entry: PageEntry
- score: float
- rank: int
- property content: str
Alias for entry.content.
- property text: str
Alias for entry.content.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway.rag.page_index._models.PageIndexResponse(**data)[source]
Bases:
BaseModelFull response from
PageIndexRAG.query()/PageIndexRAG.aquery().Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- answer: LLMResponse | None
- sources: list[PageIndexResult]
- query: str
- context_used: str
- property results: list[PageIndexResult]
Alias for sources.
- property pages: list[PageIndexResult]
Alias for sources.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].