forked from Archives/langchain
unify return types across map-reduce and refine (#442)
This commit is contained in:
parent
0c5d3fd894
commit
ffe35c396c
@ -147,7 +147,8 @@ class MapReduceDocumentsChain(BaseCombineDocumentsChain, BaseModel):
|
||||
result_docs, **kwargs
|
||||
)
|
||||
if self.return_map_steps:
|
||||
extra_return_dict = {"map_steps": results}
|
||||
_results = [r[self.llm_chain.output_key] for r in results]
|
||||
extra_return_dict = {"map_steps": _results}
|
||||
else:
|
||||
extra_return_dict = {}
|
||||
output, _ = self.combine_document_chain.combine_docs(result_docs, **kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user