From c89d6dd1c044926c353d844c1fe7097c79b5f8aa Mon Sep 17 00:00:00 2001 From: iomgaa Date: Sun, 10 Aug 2025 21:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E7=96=BE=E7=97=85=E5=88=86=E6=9E=90=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=B8=BADiseaseAnalyst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将文件夹从 disease_analyzer 重命名为 disease_analyst - 统一类名:DiseaseAnalyzer → DiseaseAnalyst相关类 - 更新所有导入路径和引用关系 - 保持功能不变,提高命名一致性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- agent_system/disease_analyst/__init__.py | 6 ++++++ .../{disease_analyzer => disease_analyst}/agent.py | 12 ++++++------ .../{disease_analyzer => disease_analyst}/prompt.py | 2 +- .../response_model.py | 0 agent_system/disease_analyzer/__init__.py | 6 ------ 5 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 agent_system/disease_analyst/__init__.py rename agent_system/{disease_analyzer => disease_analyst}/agent.py (94%) rename agent_system/{disease_analyzer => disease_analyst}/prompt.py (99%) rename agent_system/{disease_analyzer => disease_analyst}/response_model.py (100%) delete mode 100644 agent_system/disease_analyzer/__init__.py diff --git a/agent_system/disease_analyst/__init__.py b/agent_system/disease_analyst/__init__.py new file mode 100644 index 0000000..b7dc9eb --- /dev/null +++ b/agent_system/disease_analyst/__init__.py @@ -0,0 +1,6 @@ +# 疾病分析智能体模块初始化文件 +from .agent import DiseaseContextAnalyst +from .prompt import DiseaseAnalystPrompt +from .response_model import DiseaseAnalysisResult + +__all__ = ['DiseaseContextAnalyst', 'DiseaseAnalystPrompt', 'DiseaseAnalysisResult'] \ No newline at end of file diff --git a/agent_system/disease_analyzer/agent.py b/agent_system/disease_analyst/agent.py similarity index 94% rename from agent_system/disease_analyzer/agent.py rename to agent_system/disease_analyst/agent.py index 20647d7..421cbac 100644 --- a/agent_system/disease_analyzer/agent.py +++ b/agent_system/disease_analyst/agent.py @@ -1,10 +1,10 @@ from typing import Dict, Any, List from agent_system.base import BaseAgent -from agent_system.disease_analyzer.prompt import DiseaseAnalyzerPrompt -from agent_system.disease_analyzer.response_model import DiseaseAnalysisResult +from agent_system.disease_analyst.prompt import DiseaseAnalystPrompt +from agent_system.disease_analyst.response_model import DiseaseAnalysisResult -class DiseaseContextAnalyzer(BaseAgent): +class DiseaseContextAnalyst(BaseAgent): """ 疾病上下文分析智能体 @@ -33,7 +33,7 @@ class DiseaseContextAnalyzer(BaseAgent): super().__init__( model_type=model_type, description="基于患者主述分析疾病上下文并确定评估重点", - instructions=DiseaseAnalyzerPrompt.instructions, + instructions=DiseaseAnalystPrompt.instructions, response_model=DiseaseAnalysisResult, llm_config=llm_config or {}, structured_outputs=True, @@ -136,8 +136,8 @@ class DiseaseContextAnalyzer(BaseAgent): past_history_display = ph_content.strip() if ph_content.strip() else "暂无既往史信息" # 从prompt类获取示例输出格式 - from agent_system.disease_analyzer.prompt import DiseaseAnalyzerPrompt - example_output = DiseaseAnalyzerPrompt.get_example_output() + from agent_system.disease_analyst.prompt import DiseaseAnalystPrompt + example_output = DiseaseAnalystPrompt.get_example_output() prompt = f"""患者病史信息: 现病史: {hpi_content} diff --git a/agent_system/disease_analyzer/prompt.py b/agent_system/disease_analyst/prompt.py similarity index 99% rename from agent_system/disease_analyzer/prompt.py rename to agent_system/disease_analyst/prompt.py index 63cb59b..1bf1192 100644 --- a/agent_system/disease_analyzer/prompt.py +++ b/agent_system/disease_analyst/prompt.py @@ -1,7 +1,7 @@ from agent_system.base import BasePrompt -class DiseaseAnalyzerPrompt(BasePrompt): +class DiseaseAnalystPrompt(BasePrompt): """ 疾病上下文分析智能体的提示词模板 diff --git a/agent_system/disease_analyzer/response_model.py b/agent_system/disease_analyst/response_model.py similarity index 100% rename from agent_system/disease_analyzer/response_model.py rename to agent_system/disease_analyst/response_model.py diff --git a/agent_system/disease_analyzer/__init__.py b/agent_system/disease_analyzer/__init__.py deleted file mode 100644 index 0dd8cd8..0000000 --- a/agent_system/disease_analyzer/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# 疾病分析智能体模块初始化文件 -from .agent import DiseaseContextAnalyzer -from .prompt import DiseaseAnalyzerPrompt -from .response_model import DiseaseAnalysisResult - -__all__ = ['DiseaseContextAnalyzer', 'DiseaseAnalyzerPrompt', 'DiseaseAnalysisResult'] \ No newline at end of file