feat: 添加选项必须检索长期记忆
This commit is contained in:
@@ -614,7 +614,7 @@ class DefaultReplyer:
|
||||
# 使用统一管理器的智能检索(Judge模型决策)
|
||||
search_result = await unified_manager.search_memories(
|
||||
query_text=query_text,
|
||||
use_judge=True,
|
||||
use_judge=global_config.memory.use_judge,
|
||||
recent_chat_history=chat_history, # 传递最近聊天历史
|
||||
)
|
||||
|
||||
|
||||
@@ -508,6 +508,7 @@ class MemoryConfig(ValidatedConfigBase):
|
||||
short_term_decay_factor: float = Field(default=0.98, description="衰减因子")
|
||||
|
||||
# 长期记忆层配置
|
||||
use_judge: bool = Field(default=True, description="使用评判模型决定是否检索长期记忆")
|
||||
long_term_batch_size: int = Field(default=10, description="批量转移大小")
|
||||
long_term_decay_factor: float = Field(default=0.95, description="衰减因子")
|
||||
long_term_auto_transfer_interval: int = Field(default=60, description="自动转移间隔(秒)")
|
||||
|
||||
@@ -235,7 +235,7 @@ class KFCContextBuilder:
|
||||
|
||||
search_result = await unified_manager.search_memories(
|
||||
query_text=query_text,
|
||||
use_judge=True,
|
||||
use_judge=config.memory.use_judge,
|
||||
recent_chat_history=chat_history,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user