Add support for GPT-5 models - #75
Merged
Merged
Conversation
Adds "gpt-5-" prefix mapping to o200k_base encoding to support upcoming GPT-5 models, following the upstream tiktoken Python library implementation.
Author
|
@IAPark @gjtorikian Could you please review this PR? It adds GPT-5 support by following the upstream tiktoken Python library implementation. Thanks! |
Collaborator
|
Just ack’ing this—the models in this gem have gone out of date a bit because I’ve been waiting for another dependency to be updated. It’s my priority this week to figure out how to work around that, and after I do I’ll be able to merge this and cut a new release. Sorry for the delay! |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds "gpt-5-" prefix mapping to o200k_base encoding to support upcoming GPT-5 models, following the upstream tiktoken Python library implementation.
This change allows the library to properly tokenize text for any GPT-5 model variants (e.g., gpt-5-turbo, gpt-5-preview, etc.) by mapping them to the o200k_base encoding, consistent with the upstream Python tiktoken library.