2026-05-18 16:32:42 +08:00
|
|
|
"""Initialize the app.services.rag package."""
|
|
|
|
|
# Keep package boundaries explicit so backend imports stay predictable.
|
2026-05-14 15:07:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
2026-05-18 16:32:42 +08:00
|
|
|
"Retriever",
|
|
|
|
|
"retrieve_regulations",
|
|
|
|
|
"ContextBuilder",
|
|
|
|
|
"build_rag_context",
|
|
|
|
|
"PromptTemplates",
|
|
|
|
|
"get_prompt_template",
|
2026-05-14 18:09:15 +08:00
|
|
|
]
|
2026-05-18 16:32:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|