From 808954a3720a089941f489887f74ce4e3b358cfb Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Tue, 19 Aug 2025 12:06:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(chat):=20=E7=A6=81=E7=94=A8=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=89=A7=E8=A1=8C=E5=99=A8=E7=9A=84=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=8A=9F=E8=83=BD(=E5=9B=A0=E4=B8=BA=E8=BF=99=E7=8E=A9?= =?UTF-8?q?=E6=84=8F=E7=9C=9F=E7=9A=84=E6=B2=A1=E5=87=A0=E6=AC=A1=E5=91=BD?= =?UTF-8?q?=E4=B8=AD=E8=BF=87=E7=9A=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/replyer/default_generator.py | 2 +- src/plugin_system/core/tool_use.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat/replyer/default_generator.py b/src/chat/replyer/default_generator.py index 14fb07aa7..36e227595 100644 --- a/src/chat/replyer/default_generator.py +++ b/src/chat/replyer/default_generator.py @@ -194,7 +194,7 @@ class DefaultReplyer: from src.plugin_system.core.tool_use import ToolExecutor # 延迟导入ToolExecutor,不然会循环依赖 - self.tool_executor = ToolExecutor(chat_id=self.chat_stream.stream_id, enable_cache=True, cache_ttl=3) + self.tool_executor = ToolExecutor(chat_id=self.chat_stream.stream_id, enable_cache=False) async def generate_reply_with_context( self, diff --git a/src/plugin_system/core/tool_use.py b/src/plugin_system/core/tool_use.py index 17e236856..0d50219c6 100644 --- a/src/plugin_system/core/tool_use.py +++ b/src/plugin_system/core/tool_use.py @@ -40,7 +40,7 @@ class ToolExecutor: 可以直接输入聊天消息内容,自动判断并执行相应的工具,返回结构化的工具执行结果。 """ - def __init__(self, chat_id: str, enable_cache: bool = True, cache_ttl: int = 3): + def __init__(self, chat_id: str, enable_cache: bool = False, cache_ttl: int = 3): """初始化工具执行器 Args: