feat(memory): 增加瞬时记忆系统的独立开关
在配置文件中为基于LLM的瞬时记忆和基于向量的瞬时记忆增加了独立的启用开关。这允许用户根据需要更灵活地控制每种记忆类型。 同时,将记忆系统初始化日志的级别从DEBUG提升到INFO,使其在默认配置下可见,便于问题排查。
This commit is contained in:
@@ -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 # 初始化失败则禁用
|
||||
|
||||
Reference in New Issue
Block a user