fix bug with length function (#1257)

Harrison Chase 1 year ago committed by blob42
parent a1f6421655
commit df37dd1be4

@ -250,7 +250,7 @@ class RecursiveCharacterTextSplitter(TextSplitter):
# Now go merging things, recursively splitting longer texts.
_good_splits = []
for s in splits:
if len(s) < self._chunk_size:
if self._length_function(s) < self._chunk_size:
_good_splits.append(s)
else:
if _good_splits:

Loading…
Cancel
Save