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

Context limit work unproperly #9

Open
agrogov opened this issue Apr 7, 2023 · 0 comments
Open

Context limit work unproperly #9

agrogov opened this issue Apr 7, 2023 · 0 comments

Comments

@agrogov
Copy link

agrogov commented Apr 7, 2023

if messages.contentCount > (4000 * 4) {

This count elements of messages array, but not words or even tokens, so it would be much better to implement tokenizer and refactor this code to use it for count exact tokens in context(messages) and compare with total_tokens from response to trim historyList.

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

No branches or pull requests

1 participant