feat(affinity-flow): 优化提及检测逻辑和阈值配置
- 简化提及检测逻辑,移除冗余的私聊检查变量 - 使用配置项 mention_bot_adjustment_threshold 替换硬编码的50%阈值 - 在消息处理中清除开头可能存在的空行 - 增加首次认识用户的信息存储方法,避免未知用户处理逻辑 - 调整消息管理器检查间隔从2秒到5秒,减少系统负载 - 修复计划执行器中用户ID比较逻辑,防止自我回复死循环
This commit is contained in:
@@ -352,6 +352,8 @@ def process_llm_response(text: str, enable_splitter: bool = True, enable_chinese
|
||||
|
||||
sentences = []
|
||||
for sentence in split_sentences:
|
||||
# 清除开头可能存在的空行
|
||||
sentence = sentence.lstrip("\n").rstrip()
|
||||
if global_config.chinese_typo.enable and enable_chinese_typo:
|
||||
typoed_text, typo_corrections = typo_generator.create_typo_sentence(sentence)
|
||||
sentences.append(typoed_text)
|
||||
|
||||
Reference in New Issue
Block a user