增加299老师分身agent
This commit is contained in:
@@ -1,32 +1,14 @@
|
||||
import os
|
||||
|
||||
from agent_base.agent_base import HuiYuBaseAgent
|
||||
from google.adk.models.lite_llm import LiteLlm
|
||||
from common.models import minimax_model
|
||||
from critical_awareness_agent.agent import critical_awareness_agent
|
||||
from note_agent.agent import note_agent
|
||||
|
||||
# ============================================================
|
||||
# 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,
|
||||
)
|
||||
|
||||
# ============================================================
|
||||
# 定义 Agent(继承 HuiYuBaseAgent,自动获得防注入 + 日志能力)
|
||||
# ============================================================
|
||||
root_agent = HuiYuBaseAgent(
|
||||
name="huiyu_agent",
|
||||
model=model,
|
||||
model=minimax_model,
|
||||
description="一个智能助手,能够回答用户的各种问题。",
|
||||
instruction=(
|
||||
"你是一个乐于助人的中文 AI 助手,你的名字叫小慧,请用中文回答用户的问题,回答要准确、简洁、友好。\n\n"
|
||||
@@ -35,5 +17,5 @@ root_agent = HuiYuBaseAgent(
|
||||
"你还有一个子助手「临界觉察助手」(critical_awareness_agent),当用户出现心智散乱、情绪化或认知混淆时,"
|
||||
"请将任务委派给 critical_awareness_agent 处理。"
|
||||
),
|
||||
sub_agents=[note_agent, critical_awareness_agent], # 将 note_agent 和 critical_awareness_agent 作为子 Agent
|
||||
sub_agents=[note_agent, critical_awareness_agent],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user