feat(attention): 添加注意力优化器以增强提示词多样性和防止注意力退化

refactor(prompt): 使用 asyncio.gather 替代 as_completed 以提升并发性能
refactor(config): 添加注意力优化配置选项
refactor(prompt_params): 增加注意力优化开关
This commit is contained in:
Windpicker-owo
2025-11-12 22:37:35 +08:00
parent c1cda89d65
commit 310256e24d
8 changed files with 420 additions and 48 deletions

View File

@@ -27,6 +27,7 @@ class PromptParameters:
enable_relation: bool = True
enable_cross_context: bool = True
enable_knowledge: bool = True
enable_attention_optimization: bool = True # 注意力优化开关
# 性能控制
max_context_messages: int = 50