Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add params to reduce K dynamically to reduce it below token limit #739

Merged
merged 10 commits into from
Jan 27, 2023

Conversation

Who828
Copy link
Contributor

@Who828 Who828 commented Jan 25, 2023

Referring to #687, I implemented the functionality to reduce K if it exceeds the token limit.

Edit: I should have ran make lint locally. Also, this only applies to StuffDocumentChain

@Who828
Copy link
Contributor Author

Who828 commented Jan 26, 2023

Made changes as per the comment.

@hwchase17 hwchase17 merged commit 28efbb0 into langchain-ai:master Jan 27, 2023
@Who828 Who828 deleted the reduce-token-below-limit-feature branch January 27, 2023 04:13
@creatorrr
Copy link
Contributor

This would be super useful in general

@creatorrr
Copy link
Contributor

For all chains/agents which pick top k from multiple results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants