Skip to content
Discussion options

You must be logged in to vote

🤖

Hello,

In the LangChain Python framework, the token_max parameter is not mandatory for enabling recursive summarization in the load_summarize_chain function. If this parameter is not provided, the system uses a default value of 3000. This is evident from the definition of the _load_map_reduce_chain function, where token_max is set to 3000 by default:

def _load_map_reduce_chain(
    ...
    token_max: int = 3000,
    ...
) -> MapReduceDocumentsChain:
    ...
    reduce_documents_chain = ReduceDocumentsChain(
        ...
        token_max=token_max,
        ...
    )
    ...

In the load_summarize_chain function, **kwargs is passed to the loader function, which includes _load_map_reduce_chain

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dosubot
Comment options

Comment options

You must be logged in to vote
1 reply
@dosubot
Comment options

Answer selected by RERobbins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant