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

feat: add support for gpt4o #1

Merged
merged 6 commits into from
May 18, 2024
Merged

feat: add support for gpt4o #1

merged 6 commits into from
May 18, 2024

Conversation

matthiasthomas
Copy link
Contributor

πŸ“œ Lore

Adding support to gpt4o which came out yesterday May, 13th 2024.

πŸ—οΈ Key Changes

πŸ›‘οΈ Main Quests

[x] Add support for gpt4o

@matthiasthomas
Copy link
Contributor Author

@hupe1980 - Would you mind approving this one πŸ™ It would unblock me

@hupe1980 hupe1980 self-requested a review May 16, 2024 18:12
tiktoken.go Outdated
@@ -20,6 +20,7 @@ const (
var ModelPrefixToEncoding = map[string]string{
// chat
"gpt-4-": CL100kBase, // e.g., gpt-4-0314, etc., plus gpt-4-32k
"gpt-4o-": CL100kBase, // e.g., gpt-4o-2024-05-13, etc.
Copy link
Owner

Choose a reason for hiding this comment

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

Shouldn't it actually be o200k?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally @hupe1980 , sorry about that, didn't realize they changed the tokenizer. It's fixed, I've updated according to the latest from https://github.com/openai/tiktoken/tree/main

tiktoken.go Outdated
@@ -28,6 +29,7 @@ var ModelPrefixToEncoding = map[string]string{
var ModelToEncoding = map[string]string{
// chat
"gpt-4": CL100kBase,
"gpt-4o": CL100kBase,
Copy link
Owner

Choose a reason for hiding this comment

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

Same here. o200k?

@matthiasthomas matthiasthomas requested a review from hupe1980 May 17, 2024 19:29
Copy link
Owner

@hupe1980 hupe1980 left a comment

Choose a reason for hiding this comment

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

LGTM! Thx

@hupe1980 hupe1980 merged commit 275e4ff into hupe1980:main May 18, 2024
1 check passed
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.

2 participants