from __future__ import annotations

from pathlib import Path
from typing import Any

from ketju.rag.llama_index.contracts import LlamaIndexIngestionHandler
from ketju.rag.llama_index.ingestion.simple_docling_full_ctx import DoclingFullCtxIngestionHandler
from ketju.rag.llama_index.variants.simple import LlamaIndexRag


class SimpleDoclingFullCtxRag(LlamaIndexRag):
    data = {}
    _pdf_by_name: dict[str, Path] = {}

    def __init__(
        self,
        ingestion_handler: LlamaIndexIngestionHandler | None = None,
        **kwargs: Any,
    ) -> None:
        super().__init__(**kwargs)
        self.ingestion_handler = ingestion_handler or DoclingFullCtxIngestionHandler()
