load_summarize_chain#

langchain_cohere.chains.summarize.summarize_chain.load_summarize_chain(llm: BaseLanguageModel, chain_type: str = 'stuff', **kwargs: Any) β†’ RunnableSerializable[source]#

Beta

Makes use of Cohere’s grounded RAG summarization,

which may change in a later langchain-cohere version

Load summarizing chain.

Parameters:
  • llm (BaseLanguageModel) – Language Model to use in the chain.

  • chain_type (str) – Type of document combining chain to use. Currently, only β€œstuff” is supported in this implementation.

  • verbose – 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:

RunnableSerializable

Examples using load_summarize_chain