"""Initialize the app.services.rag package."""
# Keep package boundaries explicit so backend imports stay predictable.


__all__ = [
    "Retriever",
    "retrieve_regulations",
    "ContextBuilder",
    "build_rag_context",
    "PromptTemplates",
    "get_prompt_template",
]


def __getattr__(name: str):
    """Handle getattr for this module."""
    if name in {"Retriever", "retrieve_regulations"}:
        from .retriever import Retriever, retrieve_regulations

        return {"Retriever": Retriever, "retrieve_regulations": retrieve_regulations}[name]
    if name in {"ContextBuilder", "build_rag_context"}:
        from .context_builder import ContextBuilder, build_rag_context

        return {"ContextBuilder": ContextBuilder, "build_rag_context": build_rag_context}[name]
    if name in {"PromptTemplates", "get_prompt_template"}:
        from .prompt_templates import PromptTemplates, get_prompt_template

        return {"PromptTemplates": PromptTemplates, "get_prompt_template": get_prompt_template}[name]
    raise AttributeError(name)
