v0.5.8 修复 回复重复输出的bug
This commit is contained in:
@@ -395,13 +395,13 @@ def add_typos(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) > 300:
|
||||
print(f"回复过长 ({len(text)} 字符),返回默认回复")
|
||||
return ['懒得说']
|
||||
# 处理长消息
|
||||
sentences = split_into_sentences_w_remove_punctuation(add_typos(text))
|
||||
# 检查分割后的消息数量是否过多(超过3条)
|
||||
if len(sentences) > 3:
|
||||
if len(sentences) > 4:
|
||||
print(f"分割后消息数量过多 ({len(sentences)} 条),返回默认回复")
|
||||
return [f'{global_config.BOT_NICKNAME}不知道哦']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user