fix 修复了麦麦不会回复的bug

This commit is contained in:
SengokuCola
2025-03-18 12:55:16 +08:00
parent 10f8aa08ca
commit d7165175da
7 changed files with 123 additions and 15 deletions

View File

@@ -336,7 +336,7 @@ def random_remove_punctuation(text: str) -> str:
def process_llm_response(text: str) -> List[str]:
# processed_response = process_text_with_typos(content)
if len(text) > 200:
if len(text) > 100:
logger.warning(f"回复过长 ({len(text)} 字符),返回默认回复")
return ['懒得说']
# 处理长消息
@@ -358,7 +358,7 @@ def process_llm_response(text: str) -> List[str]:
sentences.append(sentence)
# 检查分割后的消息数量是否过多超过3条
if len(sentences) > 5:
if len(sentences) > 3:
logger.warning(f"分割后消息数量过多 ({len(sentences)} 条),返回默认回复")
return [f'{global_config.BOT_NICKNAME}不知道哦']