增加299老师分身agent
This commit is contained in:
@@ -1,35 +1,16 @@
|
||||
import os
|
||||
|
||||
|
||||
from google.adk.models.lite_llm import LiteLlm
|
||||
from agent_base.agent_base import HuiYuBaseAgent
|
||||
|
||||
# ============================================================
|
||||
# MiniMax 模型配置(从 .env 文件读取)
|
||||
# ============================================================
|
||||
MINIMAX_API_KEY = os.getenv("MINIMAX_API_KEY")
|
||||
MINIMAX_API_BASE = os.getenv("MINIMAX_API_BASE")
|
||||
MINIMAX_MODEL = os.getenv("MINIMAX_MODEL")
|
||||
|
||||
# ============================================================
|
||||
# 创建 LiteLlm 模型适配器
|
||||
# ============================================================
|
||||
model = LiteLlm(
|
||||
model=MINIMAX_MODEL,
|
||||
api_base=MINIMAX_API_BASE,
|
||||
api_key=MINIMAX_API_KEY,
|
||||
)
|
||||
from common.models import minimax_model
|
||||
|
||||
# ============================================================
|
||||
# 定义 Agent(继承 HuiYuBaseAgent)
|
||||
# ============================================================
|
||||
critical_awareness_agent = HuiYuBaseAgent(
|
||||
name="critical_awareness_agent",
|
||||
model=model,
|
||||
description="用于处理用户心智散乱、情绪化或认知混淆的专家。它通过‘三界(外中内)’判别法强制用户回归觉知。当用户表达焦虑、愤怒、分心或无法区分事实与观点时,必须调用此工具。",
|
||||
model=minimax_model,
|
||||
description="用于处理用户心智散乱、情绪化或认知混淆的专家。它通过'三界(外中内)'判别法强制用户回归觉知。当用户表达焦虑、愤怒、分心或无法区分事实与观点时,必须调用此工具。",
|
||||
instruction=(
|
||||
"""
|
||||
你是一位精通“临界觉察法”的资深导师。你的目标是协助学生通过识别外界、中界、内界的边界,回归当下觉知。
|
||||
你是一位精通"临界觉察法"的资深导师。你的目标是协助学生通过识别外界、中界、内界的边界,回归当下觉知。
|
||||
|
||||
判定逻辑:
|
||||
- 外界 (External): 纯粹感官原始数据,无形容词/评价。
|
||||
@@ -39,10 +20,10 @@ critical_awareness_agent = HuiYuBaseAgent(
|
||||
回复规范:
|
||||
1. 必须快速拆解输入内容,给出 [外界/中界/内界] 的结构化分析。
|
||||
2. 语气简洁、敏锐,像手术刀一样切开混沌。
|
||||
3. 引导学生作为“观察者”,清晰的觉知三界都在发生什么。
|
||||
3. 引导学生作为"观察者",清晰的觉知三界都在发生什么。
|
||||
4. 提醒学生回归当下的觉知
|
||||
"""
|
||||
)
|
||||
)
|
||||
|
||||
root_agent = critical_awareness_agent # 将 critical_awareness_agent 作为 root_agent 导出,供 adk web 注册
|
||||
root_agent = critical_awareness_agent
|
||||
|
||||
Reference in New Issue
Block a user