增加五位助教老师

This commit is contained in:
2026-04-11 11:57:15 +08:00
parent 3555a2d582
commit bc0a8b49ad
16 changed files with 1690 additions and 0 deletions

26
common/profile_loader.py Normal file
View File

@@ -0,0 +1,26 @@
"""
Profile 加载器 — 从 profiles/ 目录读取 Markdown 文件作为 Agent 的 instruction
"""
from pathlib import Path
PROFILES_DIR = Path(__file__).parent.parent / "profiles"
def load_profile(filename: str) -> str:
"""
加载指定名称的 profile 文件内容。
Args:
filename: profile 文件名,如 "l1_live_course.md"
Returns:
profile 文件的完整文本内容
Raises:
FileNotFoundError: profile 文件不存在
"""
filepath = PROFILES_DIR / filename
if not filepath.exists():
raise FileNotFoundError(f"Profile 文件不存在: {filepath}")
return filepath.read_text(encoding="utf-8")