fix text splitter (#22596)

This commit is contained in:
znn
2025-07-18 11:21:58 +05:30
committed by GitHub
parent d37b6716cd
commit ed263aed9f

View File

@@ -102,6 +102,7 @@ class FixedRecursiveCharacterTextSplitter(EnhanceRecursiveCharacterTextSplitter)
splits = text.split()
else:
splits = text.split(separator)
splits = [item + separator if i < len(splits) else item for i, item in enumerate(splits)]
else:
splits = list(text)
splits = [s for s in splits if (s not in {"", "\n"})]