Files
aiagent/backend/scripts/create_homework_manager_agent_3.py

39 lines
1.4 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
"""
一键创建或更新学生作业管理助手3号
- 画布与作业链路与 2 号相同Cache user_memory_* LLM Code JSON 写回
- **基础设施** 2 号同档 TTLhistory 上限8192 max_tokensDeepSeek 关闭 thinking
- **记忆方案**显式对齐知你客服 14 / `agent记忆实现方案.md`见主脚本内 HOMEWORK_V3_ZHINI14_APPEND + 完整版提示词
等价于:
AGENT_NAME=学生作业管理助手3号 .\\venv\\Scripts\\python.exe scripts\\create_homework_manager_agent.py
用法:
cd backend && .\\venv\\Scripts\\python.exe scripts\\create_homework_manager_agent_3.py
"""
from __future__ import annotations
import importlib.util
import os
import sys
BACKEND_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if BACKEND_DIR not in sys.path:
sys.path.insert(0, BACKEND_DIR)
def _run() -> int:
# 必须覆盖外层 shell 里可能残留的 AGENT_NAME如 2 号),否则会误改 2 号
os.environ["AGENT_NAME"] = "学生作业管理助手3号"
path = os.path.join(os.path.dirname(__file__), "create_homework_manager_agent.py")
spec = importlib.util.spec_from_file_location("_homework_agent_mod", path)
mod = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(mod)
return int(mod.main())
if __name__ == "__main__":
raise SystemExit(_run())