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

Fix message truncation when exceeding token budget #694

Closed
wants to merge 1 commit into from

Conversation

burke
Copy link
Contributor

@burke burke commented May 3, 2023

The code here attempts to drop earlier messages to reduce token count when the conversation gets too long, but it doesn't count right. This is much closer, at least... it agrees with OpenAI about one conversation being 4197 tokens and the truncation behaviour works correctly.

@vercel
Copy link

vercel bot commented May 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chatbot-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2023 10:00pm

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.

None yet

1 participant