fix text split (#15426)

pull/15484/head
Jyong 1 year ago committed by GitHub
parent adda049265
commit f77f7e1437
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -88,7 +88,10 @@ class FixedRecursiveCharacterTextSplitter(EnhanceRecursiveCharacterTextSplitter)
break
# Now that we have the separator, split the text
if separator:
splits = text.split(separator)
if separator == " ":
splits = text.split()
else:
splits = text.split(separator)
else:
splits = list(text)
# Now go merging things, recursively splitting longer texts.

Loading…
Cancel
Save