langchain/docs/modules/chains/index_examples
Chandan Routray bc875a9df1
Fixed multi input prompt for MapReduceChain (#4979)
# Fixed multi input prompt for MapReduceChain

Added `kwargs` support for inner chains of `MapReduceChain` via
`from_params` method
Currently the `from_method` method of intialising `MapReduceChain` chain
doesn't work if prompt has multiple inputs. It happens because it uses
`StuffDocumentsChain` and `MapReduceDocumentsChain` underneath, both of
them require specifying `document_variable_name` if `prompt` of their
`llm_chain` has more than one `input`.

With this PR, I have added support for passing their respective `kwargs`
via the `from_params` method.

## Fixes https://github.com/hwchase17/langchain/issues/4752

## Who can review? 
@dev2049 @hwchase17 @agola11

---------

Co-authored-by: imeckr <chandanroutray2012@gmail.com>
2023-06-03 14:41:03 -07:00
..
analyze_document.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
chat_vector_db.ipynb Harrison/condense q llm (#5438) 2023-05-30 07:15:37 -07:00
graph_qa.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
hyde.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
qa_with_sources.ipynb Fix: Updated links for in depth explanation of chain types in the Question Answering notebooks (#3714) 2023-04-28 15:06:46 -07:00
question_answering.ipynb Fix: Updated links for in depth explanation of chain types in the Question Answering notebooks (#3714) 2023-04-28 15:06:46 -07:00
summarize.ipynb Fixed multi input prompt for MapReduceChain (#4979) 2023-06-03 14:41:03 -07:00
vector_db_qa_with_sources.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
vector_db_qa.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00
vector_db_text_generation.ipynb big docs refactor (#1978) 2023-03-26 19:49:46 -07:00