From bcd99553744d4013aa9d514f28a4c55737b6de54 Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Sat, 13 Sep 2025 09:03:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20=E7=A7=BB=E9=99=A4=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 工具历史记录功能已被移除,因此相关的配置类 `ToolHistoryConfig` 及其在 `ToolConfig` 中的引用也一并删除,以简化代码库。 --- src/config/official_configs.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/config/official_configs.py b/src/config/official_configs.py index 4db7a512b..94102dce4 100644 --- a/src/config/official_configs.py +++ b/src/config/official_configs.py @@ -343,31 +343,11 @@ class ExpressionConfig(ValidatedConfigBase): # 如果都没有匹配,返回默认值 return True, True, 1.0 - -class ToolHistoryConfig(ValidatedConfigBase): - """工具历史记录配置类""" - - enable_history: bool = True - """是否启用工具历史记录""" - - enable_prompt_history: bool = True - """是否在提示词中加入工具历史记录""" - - max_history: int = 5 - """注入到提示词中的最大工具历史记录数量""" - - data_dir: str = "data/tool_history" - """历史记录保存目录""" - - class ToolConfig(ValidatedConfigBase): """工具配置类""" enable_tool: bool = Field(default=False, description="启用工具") - history: ToolHistoryConfig = Field(default_factory=ToolHistoryConfig) - """工具历史记录配置""" - class VoiceConfig(ValidatedConfigBase): """语音识别配置类"""