token_limit_retriever limit token number retrieved from retriever #22941
humblemat810
announced in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Given that language models usually limit the number of token in and out altogether, also because models charge by number of token, users will want to limit number of tokens that will goes into the chatmodel/llm.
Motivation
Given that language models usually limit the number of token in and out altogether, also because models charge by number of token, users will want to limit number of tokens that will goes into the chatmodel/llm.
Proposal (If applicable)
I have already implemented a token limit retriever that limit the token number when retrieving data. And would like to add into community contribution.
it is already working in my personal project
Will add more documentation and examples with test if this idea is welcomed
========= in token_limit_retriever.py==========
================ in test_token_limit_retriever.py===========
the tests are not yet written in favour of any testing framework yet.
Beta Was this translation helpful? Give feedback.
All reactions