load_summarize_chain#

langchain.chains.summarize.chain.load_summarize_chain(
llm: BaseLanguageModel,
chain_type: str = 'stuff',
verbose: bool | None = None,
**kwargs: Any,
) โ†’ BaseCombineDocumentsChain[source]#

Load summarizing chain.

Parameters:
  • llm (BaseLanguageModel) โ€“ Language Model to use in the chain.

  • chain_type (str) โ€“ Type of document combining chain to use. Should be one of โ€œstuffโ€, โ€œmap_reduceโ€, and โ€œrefineโ€.

  • verbose (bool | None) โ€“ Whether chains should be run in verbose mode or not. Note that this applies to all chains that make up the final chain.

  • kwargs (Any)

Returns:

A chain to use for summarizing.

Return type:

BaseCombineDocumentsChain

Examples using load_summarize_chain