fix text split (#15426)

This commit is contained in:
Jyong
2025-03-11 00:24:27 +08:00
committed by GitHub
parent adda049265
commit f77f7e1437

View File

@@ -88,6 +88,9 @@ class FixedRecursiveCharacterTextSplitter(EnhanceRecursiveCharacterTextSplitter)
break break
# Now that we have the separator, split the text # Now that we have the separator, split the text
if separator: if separator:
if separator == " ":
splits = text.split()
else:
splits = text.split(separator) splits = text.split(separator)
else: else:
splits = list(text) splits = list(text)