feat:合并工具调用模型和心流模型

This commit is contained in:
SengokuCola
2025-04-24 14:18:41 +08:00
parent 2871e4efc2
commit f8450f705a
22 changed files with 973 additions and 331 deletions

View File

@@ -327,8 +327,8 @@ def split_into_sentences_w_remove_punctuation(text: str) -> List[str]:
# 提取最终的句子内容
final_sentences = [content for content, sep in merged_segments if content] # 只保留有内容的段
# 清理可能引入的空字符串
final_sentences = [s for s in final_sentences if s]
# 清理可能引入的空字符串和仅包含空白的字符串
final_sentences = [s for s in final_sentences if s.strip()] # 过滤掉空字符串以及仅包含空白(如换行符、空格)的字符串
logger.debug(f"分割并合并后的句子: {final_sentences}")
return final_sentences