File: //usr/local/lib/python3.10/dist-packages/langchain/chains/__pycache__/mapreduce.cpython-310.pyc
o
���g � @ s� d Z ddlmZ ddlmZmZmZmZmZ ddl m
Z
ddlmZm
Z
ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddl m!Z! ddl"m#Z# e
dddd�G dd� de��Z$dS )z�Map-reduce chain.
Splits up a document, sends the smaller parts to the LLM with one prompt,
then combines the results with another one.
� )�annotations)�Any�Dict�List�Mapping�Optional)�
deprecated)�CallbackManagerForChainRun� Callbacks��Document)�BaseLanguageModel)�BasePromptTemplate)�TextSplitter)�
ConfigDict)�ReduceDocumentsChain)�Chain)�BaseCombineDocumentsChain)�MapReduceDocumentsChain)�StuffDocumentsChain)�LLMChainz0.2.13z1.0a Refer to migration guide here for a recommended implementation using LangGraph: https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain/. See also LangGraph guides for map-reduce: https://langchain-ai.github.io/langgraph/how-tos/map-reduce/.)�since�removal�messagec @ s� e Zd ZU dZded<