modified: src/plugins/chat/utils.py

This commit is contained in:
dax
2025-03-19 18:54:02 +08:00
parent 61007ffc5e
commit 65c26af25b

View File

@@ -355,7 +355,7 @@ def random_remove_punctuation(text: str) -> str:
def process_llm_response(text: str) -> List[str]: def process_llm_response(text: str) -> List[str]:
# processed_response = process_text_with_typos(content) # processed_response = process_text_with_typos(content)
# 对西文字符段落的回复长度设置为汉字字符的两倍 # 对西文字符段落的回复长度设置为汉字字符的两倍
if len(text) > 100 and not is_western_paragraph(text) : if len(text) > 100 and not is_western_paragraph(text) :
logger.warning(f"回复过长 ({len(text)} 字符),返回默认回复") logger.warning(f"回复过长 ({len(text)} 字符),返回默认回复")
return ['懒得说'] return ['懒得说']
elif len(text) > 200 : elif len(text) > 200 :