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

Handling maxContextTokenLength #140

Open
margaretha opened this issue May 15, 2024 · 0 comments
Open

Handling maxContextTokenLength #140

margaretha opened this issue May 15, 2024 · 0 comments

Comments

@margaretha
Copy link
Contributor

The size of token context is not as precise as that of character context. It may happen that the token context size exceeds the character context size.

To prevent this, we may recheck the token context length of an actual search result with max character context size. If the token context is larger than max char context size, the context should be cut with lower number of tokens. For instance:

with maxContextTokenLength = 3 and maxContextCharLength=10

"This is a nice [example] for a snippet"

should be reduced to

"a nice [example] for a"

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

No branches or pull requests

1 participant