chore: remove newline character from split characters in split_model.py

This commit is contained in:
CaptainB 2025-12-03 10:32:36 +08:00
parent 71f1e26c8f
commit ae0a34a220

View File

@ -300,8 +300,9 @@ def smart_split_paragraph(content: str, limit: int):
# 优先级:句号 > 感叹号/问号 > 回车
split_chars = [
('', 0), ('!', 0), ('?', 0), # 句子结束符,包含在当前段
('\n', 0), # 回车符
('', 0), ('.', 0), # 中英文句号
('!', 0), ('!', 0), # 中英文感叹号
('?', 0), ('?', 0), # 中英文问号
]
# 从后往前找分割点