triage/agent_system/controller/response_model.py
iomgaa a9144062bf 新增:添加Controller智能体模块并优化Prompter智能体
- 新增Controller智能体模块,负责任务选择和指导建议生成
  - 实现任务信息模型和决策响应模型
  - 支持基于患者病史的智能任务选择
  - 提供针对选定任务的专业指导建议

- 优化Prompter智能体,支持Controller指导建议整合
  - 更新run函数支持specific_guidance参数
  - 添加系统化的4步子智能体生成流程
  - 增强prompt指令,提升生成质量和专业性
  - 保持向后兼容性

- 完善测试验证,确保功能正常运行

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 18:17:23 +08:00

39 lines
939 B
Python

from pydantic import Field
from agent_system.base import BaseResponseModel
class TaskInfo(BaseResponseModel):
"""
任务信息模型
"""
task_name: str = Field(
...,
description="任务名称"
)
priority: str = Field(
...,
description="任务优先级(紧急、高、中、低)"
)
description: str = Field(
...,
description="任务描述"
)
class ControllerDecision(BaseResponseModel):
"""
Controller智能体决策结果模型
基于未完成的任务列表、现病史、既往史与主诉,
输出选择的任务以及具体的指导建议。
"""
selected_task: TaskInfo = Field(
...,
description="选择执行的任务信息"
)
specific_guidance: str = Field(
...,
description="基于现病史、既往史与主诉,针对选定任务的具体指导建议"
)