Skip to content

Fix missing tail tokens in ChatSummary.summarize_real #3722

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

menezesandre
Copy link

The sized variable is sliced to the head messages (sized = sized[:split_index]), but then it is used to compute tail_tokens = sum(tokens for tokens, msg in sized[split_index:]). At this point, sized[split_index:] is an empty list, meaning that tail_tokens is always 0 and the tail messages are not considered for the token limit.

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

Successfully merging this pull request may close these issues.

2 participants