refactor(chat): 禁用工具执行器的缓存功能(因为这玩意真的没几次命中过的)

This commit is contained in:
minecraft1024a
2025-08-19 12:06:00 +08:00
committed by Windpicker-owo
parent c1043ef50b
commit 808954a372
2 changed files with 2 additions and 2 deletions

View File

@@ -194,7 +194,7 @@ class DefaultReplyer:
from src.plugin_system.core.tool_use import ToolExecutor # 延迟导入ToolExecutor不然会循环依赖 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( async def generate_reply_with_context(
self, self,

View File

@@ -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: Args: