Refactor: Delete rag (#20425)

This commit is contained in:
Wang Qi
2026-09-30 13:50:24 +08:00
committed by GitHub
parent 2e15fd7d13
commit 866575ce3b
3 changed files with 0 additions and 1057 deletions
-5
View File
@@ -1,5 +0,0 @@
from . import generator
__all__ = [name for name in dir(generator) if not name.startswith("_")]
globals().update({name: getattr(generator, name) for name in __all__})
File diff suppressed because it is too large Load Diff
-19
View File
@@ -1,19 +0,0 @@
import os
PROMPT_DIR = os.path.dirname(__file__)
_loaded_prompts = {}
def load_prompt(name: str) -> str:
if name in _loaded_prompts:
return _loaded_prompts[name]
path = os.path.join(PROMPT_DIR, f"{name}.md")
if not os.path.isfile(path):
raise FileNotFoundError(f"Prompt file '{name}.md' not found in prompts/ directory.")
with open(path, "r", encoding="utf-8") as f:
content = f.read().strip()
_loaded_prompts[name] = content
return content