mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 14:50:00 +00:00
langchain: split docs, don't return empty batch
This commit is contained in:
parent
fb2ea169f2
commit
cb76472de1
@ -78,7 +78,9 @@ def split_list_of_docs(
|
|||||||
_num_tokens = (
|
_num_tokens = (
|
||||||
(length_func([], **kwargs) + _partial_tokens) if acum_length else 0
|
(length_func([], **kwargs) + _partial_tokens) if acum_length else 0
|
||||||
)
|
)
|
||||||
new_result_doc_list.append(_sub_result_docs)
|
|
||||||
|
if _sub_result_docs:
|
||||||
|
new_result_doc_list.append(_sub_result_docs)
|
||||||
return new_result_doc_list
|
return new_result_doc_list
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user