fix text splitter (#22596)

pull/22625/head
znn 7 months ago committed by GitHub
parent d37b6716cd
commit ed263aed9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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"})]

Loading…
Cancel
Save