Fix SSE route dependency and align architecture docs
This commit is contained in:
@@ -1,11 +1,29 @@
|
||||
"""RAG服务模块"""
|
||||
"""Initialize the app.services.rag package."""
|
||||
# Keep package boundaries explicit so backend imports stay predictable.
|
||||
|
||||
from .retriever import Retriever, retrieve_regulations
|
||||
from .context_builder import ContextBuilder, build_rag_context
|
||||
from .prompt_templates import PromptTemplates, get_prompt_template
|
||||
|
||||
__all__ = [
|
||||
"Retriever", "retrieve_regulations",
|
||||
"ContextBuilder", "build_rag_context",
|
||||
"PromptTemplates", "get_prompt_template"
|
||||
"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)
|
||||
|
||||
Reference in New Issue
Block a user