Skip to content

Conversation

@abhinavansh18
Copy link

BUG FIX #421

Description

This PR corrects a minor inconsistency in the error message for custom token ID validation within the _add_custom_tokens method.

The validation logic correctly checks if an ID is within the range [0, 98], but the ValueError message incorrectly stated the valid range was [1, 98]. This change updates the error message to match the actual validation logic, preventing potential confusion for developers.

This is a static text change in an error message. I have manually reviewed the code to ensure the new message ...is not in [0, 98]. accurately reflects the validation logic if i < 0 or i > 98:.

image

@google-cla
Copy link

google-cla bot commented Sep 22, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

Bug: Inconsistent error message in tokenizer validation

1 participant