From ba0e04362a5c4497c3fd6a55d4bcb112b78d95df Mon Sep 17 00:00:00 2001 From: iomgaa Date: Mon, 11 Aug 2025 00:03:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=94=B9=E8=BF=9BDi?= =?UTF-8?q?seaseAnalyst=E6=A8=A1=E5=9E=8B=E9=85=8D=E7=BD=AE=E5=92=8C?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主要改进: - 更新默认模型:从deepseek-v3改为gpt-oss:latest统一配置 - 优化prompt模板:添加明确的输出指令提升JSON解析成功率 - 统一模型配置:保持与项目整体配置一致性 - 完善文档注释:更新模型类型说明信息 技术细节: - 调整constructor默认参数适配新模型配置 - 在prompt末尾添加"输出内容为:"引导符 - 保持向后兼容性支持自定义模型配置 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- agent_system/disease_analyst/agent.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/agent_system/disease_analyst/agent.py b/agent_system/disease_analyst/agent.py index 421cbac..539c279 100644 --- a/agent_system/disease_analyst/agent.py +++ b/agent_system/disease_analyst/agent.py @@ -18,16 +18,16 @@ class DiseaseContextAnalyst(BaseAgent): 4. 为后续子任务确定针对性的评估重点 Attributes: - model_type (str): 使用的大语言模型类型,默认为 deepseek-v3 + model_type (str): 使用的大语言模型类型,默认为 gpt-oss:latest llm_config (dict): LLM模型配置参数 """ - def __init__(self, model_type: str = "deepseek-v3", llm_config: dict = None): + def __init__(self, model_type: str = "gpt-oss:latest", llm_config: dict = None): """ 初始化疾病上下文分析智能体 Args: - model_type (str): 大语言模型类型,默认使用 deepseek-v3 + model_type (str): 大语言模型类型,默认使用 gpt-oss:latest llm_config (dict): LLM模型的配置参数,如果为None则使用默认配置 """ super().__init__( @@ -148,7 +148,8 @@ class DiseaseContextAnalyst(BaseAgent): 输出格式示例: {example_output} -请严格按照上述JSON格式输出。""" +请严格按照上述JSON格式输出。 +输出内容为:""" return prompt