重构:重命名疾病分析模块为DiseaseAnalyst
- 将文件夹从 disease_analyzer 重命名为 disease_analyst - 统一类名:DiseaseAnalyzer → DiseaseAnalyst相关类 - 更新所有导入路径和引用关系 - 保持功能不变,提高命名一致性 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ab88c50827
commit
c89d6dd1c0
6
agent_system/disease_analyst/__init__.py
Normal file
6
agent_system/disease_analyst/__init__.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# 疾病分析智能体模块初始化文件
|
||||||
|
from .agent import DiseaseContextAnalyst
|
||||||
|
from .prompt import DiseaseAnalystPrompt
|
||||||
|
from .response_model import DiseaseAnalysisResult
|
||||||
|
|
||||||
|
__all__ = ['DiseaseContextAnalyst', 'DiseaseAnalystPrompt', 'DiseaseAnalysisResult']
|
||||||
@ -1,10 +1,10 @@
|
|||||||
from typing import Dict, Any, List
|
from typing import Dict, Any, List
|
||||||
from agent_system.base import BaseAgent
|
from agent_system.base import BaseAgent
|
||||||
from agent_system.disease_analyzer.prompt import DiseaseAnalyzerPrompt
|
from agent_system.disease_analyst.prompt import DiseaseAnalystPrompt
|
||||||
from agent_system.disease_analyzer.response_model import DiseaseAnalysisResult
|
from agent_system.disease_analyst.response_model import DiseaseAnalysisResult
|
||||||
|
|
||||||
|
|
||||||
class DiseaseContextAnalyzer(BaseAgent):
|
class DiseaseContextAnalyst(BaseAgent):
|
||||||
"""
|
"""
|
||||||
疾病上下文分析智能体
|
疾病上下文分析智能体
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ class DiseaseContextAnalyzer(BaseAgent):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
model_type=model_type,
|
model_type=model_type,
|
||||||
description="基于患者主述分析疾病上下文并确定评估重点",
|
description="基于患者主述分析疾病上下文并确定评估重点",
|
||||||
instructions=DiseaseAnalyzerPrompt.instructions,
|
instructions=DiseaseAnalystPrompt.instructions,
|
||||||
response_model=DiseaseAnalysisResult,
|
response_model=DiseaseAnalysisResult,
|
||||||
llm_config=llm_config or {},
|
llm_config=llm_config or {},
|
||||||
structured_outputs=True,
|
structured_outputs=True,
|
||||||
@ -136,8 +136,8 @@ class DiseaseContextAnalyzer(BaseAgent):
|
|||||||
past_history_display = ph_content.strip() if ph_content.strip() else "暂无既往史信息"
|
past_history_display = ph_content.strip() if ph_content.strip() else "暂无既往史信息"
|
||||||
|
|
||||||
# 从prompt类获取示例输出格式
|
# 从prompt类获取示例输出格式
|
||||||
from agent_system.disease_analyzer.prompt import DiseaseAnalyzerPrompt
|
from agent_system.disease_analyst.prompt import DiseaseAnalystPrompt
|
||||||
example_output = DiseaseAnalyzerPrompt.get_example_output()
|
example_output = DiseaseAnalystPrompt.get_example_output()
|
||||||
|
|
||||||
prompt = f"""患者病史信息:
|
prompt = f"""患者病史信息:
|
||||||
现病史: {hpi_content}
|
现病史: {hpi_content}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
from agent_system.base import BasePrompt
|
from agent_system.base import BasePrompt
|
||||||
|
|
||||||
|
|
||||||
class DiseaseAnalyzerPrompt(BasePrompt):
|
class DiseaseAnalystPrompt(BasePrompt):
|
||||||
"""
|
"""
|
||||||
疾病上下文分析智能体的提示词模板
|
疾病上下文分析智能体的提示词模板
|
||||||
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
# 疾病分析智能体模块初始化文件
|
|
||||||
from .agent import DiseaseContextAnalyzer
|
|
||||||
from .prompt import DiseaseAnalyzerPrompt
|
|
||||||
from .response_model import DiseaseAnalysisResult
|
|
||||||
|
|
||||||
__all__ = ['DiseaseContextAnalyzer', 'DiseaseAnalyzerPrompt', 'DiseaseAnalysisResult']
|
|
||||||
Loading…
x
Reference in New Issue
Block a user