mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-05 20:58:25 +00:00
fix bug with length function (#1257)
This commit is contained in:
parent
10e73a3723
commit
9381005098
@ -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…
Reference in New Issue
Block a user