mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-06 03:57:19 +00:00
fix run_batch unbound error (#3016)
This commit is contained in:
parent
5d4e3bd7ca
commit
5778b6f9e9
@ -600,8 +600,8 @@ class Pipeline:
|
||||
raise PipelineError("For indexing, only a single query can be provided.")
|
||||
if isinstance(labels, list):
|
||||
raise PipelineError("For indexing, only one MultiLabel object can be provided as labels.")
|
||||
flattened_documents: List[Document] = []
|
||||
if documents and isinstance(documents[0], list):
|
||||
flattened_documents: List[Document] = []
|
||||
for doc_list in documents:
|
||||
assert isinstance(doc_list, list)
|
||||
flattened_documents.extend(doc_list)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user