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: Truncate largest message if max tokens are exceeded #2009

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

dustinbyrne
Copy link
Contributor

@dustinbyrne dustinbyrne commented Sep 20, 2024

Upon exceeding the max token limit, the completion will be retried, where the largest user message will be truncated by 15% of the total content length.

Resolves #2007

@dustinbyrne dustinbyrne force-pushed the feat/truncate-token-input branch 2 times, most recently from ed7b0d4 to a71bf3b Compare September 20, 2024 20:55
Copy link
Contributor

@kgilpin kgilpin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dustinbyrne can you add a Navie review, just looking for potential problems with the error handing and retry logic? Will the @review command do this?

@kgilpin
Copy link
Contributor

kgilpin commented Sep 21, 2024

@dustinbyrne please verify whether this Error is being reported -- https://github.com/getappmap/navie-benchmark/actions/runs/10974016842/job/30472143812#step:7:789

I did try and incorporate your fix into this branch -- https://github.com/getappmap/navie-benchmark/pull/62/commits/bdb33b06fa2a4111ed230f3657dc3a6b7a6fce9c

Upon exceeding the max token limit, the completion will be retried,
where the largest message is truncated by 15% of the total content
length.
@dustinbyrne dustinbyrne merged commit e5ced70 into main Sep 23, 2024
23 checks passed
@dustinbyrne dustinbyrne deleted the feat/truncate-token-input branch September 23, 2024 17:43
@appland-release
Copy link
Contributor

🎉 This PR is included in version @appland/navie-v1.30.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Truncate messages to avoid overflow
3 participants