feat: 重构聊天系统的内存处理与格式化功能
- 更新了DefaultReplyer,采用新的内存格式化工具以提供更优质的内存描述。 - 已移除 Config 类中已弃用的内存配置。 - 在主系统中增强内存系统初始化检查,确保配置正确。 - 优化了MemoryManager,使其可直接使用全局配置进行内存设置。 - 新增了一个内存格式化工具,用于将内存对象转换为自然语言描述。 - 更新了内存工具,提供了更清晰的内存创建与管理指南。 - 精炼插件工具与使用提示,提升用户交互体验与记忆准确性。 - 根据内存系统结构的变化调整了机器人配置模板。
This commit is contained in:
@@ -133,8 +133,10 @@ class MemoryGraphConfig:
|
||||
def from_bot_config(cls, bot_config) -> MemoryGraphConfig:
|
||||
"""从bot_config加载配置"""
|
||||
try:
|
||||
# 尝试获取新配置
|
||||
if hasattr(bot_config, 'memory_graph'):
|
||||
# 尝试获取配置(优先使用memory,兼容memory_graph)
|
||||
if hasattr(bot_config, 'memory') and bot_config.memory is not None:
|
||||
mg_config = bot_config.memory
|
||||
elif hasattr(bot_config, 'memory_graph'):
|
||||
mg_config = bot_config.memory_graph
|
||||
|
||||
config = cls(
|
||||
|
||||
Reference in New Issue
Block a user