feat(memory): 增加瞬时记忆系统的独立开关

在配置文件中为基于LLM的瞬时记忆和基于向量的瞬时记忆增加了独立的启用开关。这允许用户根据需要更灵活地控制每种记忆类型。

同时,将记忆系统初始化日志的级别从DEBUG提升到INFO,使其在默认配置下可见,便于问题排查。
This commit is contained in:
minecraft1024a
2025-08-22 14:08:07 +08:00
parent d67a831eb4
commit 822491abd5
2 changed files with 4 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ class AsyncInstantMemoryWrapper:
try:
from src.chat.memory_system.instant_memory import InstantMemory
self.llm_memory = InstantMemory(self.chat_id)
logger.debug(f"LLM瞬时记忆系统已初始化: {self.chat_id}")
logger.info(f"LLM瞬时记忆系统已初始化: {self.chat_id}")
except Exception as e:
logger.warning(f"LLM瞬时记忆系统初始化失败: {e}")
self.llm_memory_enabled = False # 初始化失败则禁用
@@ -44,7 +44,7 @@ class AsyncInstantMemoryWrapper:
try:
from src.chat.memory_system.vector_instant_memory import VectorInstantMemoryV2
self.vector_memory = VectorInstantMemoryV2(self.chat_id)
logger.debug(f"向量瞬时记忆系统已初始化: {self.chat_id}")
logger.info(f"向量瞬时记忆系统已初始化: {self.chat_id}")
except Exception as e:
logger.warning(f"向量瞬时记忆系统初始化失败: {e}")
self.vector_memory_enabled = False # 初始化失败则禁用