prompts.py 398 B

12345678910111213
  1. """提示词加载:从 prompts/<name>.txt 读取模板。
  2. 只剩多模态读取用的 extract / extract_video(图文、视频提炼成结构化内容)。
  3. """
  4. from __future__ import annotations
  5. from pathlib import Path
  6. PROMPTS_DIR = Path(__file__).resolve().parent.parent / "prompts"
  7. def load_prompt(name: str) -> str:
  8. return (PROMPTS_DIR / f"{name}.txt").read_text(encoding="utf-8")