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

Add support for gpt-4o, gpt-4o-mini, text-embedding-3-small and text-embedding-3-large #112

Merged
merged 13 commits into from
Aug 15, 2024

Conversation

mbarretol
Copy link

@mbarretol mbarretol commented Jul 18, 2024

This pull request adds support for the new gpt-4o-mini model and closes the issue #111, #114 and #115.

Copy link

@Pederzh Pederzh left a comment

Choose a reason for hiding this comment

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

Thanks for adding the new gpt-4o-mini model, since for each model is also handled the "versioned" name, I've added it.

js/src/core.ts Outdated Show resolved Hide resolved
tiktoken/model_to_encoding.json Outdated Show resolved Hide resolved
wasm/src/lib.rs Outdated Show resolved Hide resolved
wasm/src/lib.rs Outdated Show resolved Hide resolved
@danrasmuson
Copy link

Excited for this to merged!

mbarretol and others added 4 commits July 22, 2024 13:15
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
@theoremonemehdi
Copy link

What is the ETA for this PR to be merged?
Thanks!

@Arit143
Copy link

Arit143 commented Jul 23, 2024

+1 for merging this soon

@Arit143
Copy link

Arit143 commented Jul 23, 2024

hey @dqbd , can this be reviewed, merged and released please? We are quite eager to try out the new gpt4o mini mostly because of the cost efficiency and we are dependant on this library to safely calculate the tokens utilized in case of streams for chat completions.

@rynti
Copy link

rynti commented Jul 23, 2024

FYI for anyone eager to just try it out ASAP - as you can see in the implementation of this PR, the underlying token counter seems to be the same as with gpt-4o. Therefore you can probably just pass gpt-4o as the model name instead of gpt-4o-mini.

@theoremonemehdi
Copy link

theoremonemehdi commented Jul 23, 2024

@rynti that's exactly why merging this PR is no brainer. I think everybody is already doing something like model.startsWith('gpt-4o') ? 'gpt-4o' : model

@alsotang
Copy link

alsotang commented Jul 23, 2024

@rynti that's exactly why merging this PR is no brainer. I think everybody is already doing something like model.startsWith('gpt-4o') ? 'gpt-4o' : model

This method may work currently, but it is not guaranteed. Just like the notorious if condition for determining Windows 9x: if(version.StartsWith("Windows 9"))

@huytool157
Copy link

@dqbd could you please take a look and cut a new release if the PR is good?

@breesetposh
Copy link

bump, can we get this in here? we're going to have to start forking to move this along, but would love to stay on the main release branch

Copy link

@huytool157 huytool157 left a comment

Choose a reason for hiding this comment

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

Since package author has been unresponsive, I think we should include gpt-4o-2024-08-06 as well so that we can just release all at once

js/src/core.ts Outdated Show resolved Hide resolved
tiktoken/model_to_encoding.json Outdated Show resolved Hide resolved
wasm/src/lib.rs Show resolved Hide resolved
wasm/src/lib.rs Show resolved Hide resolved
mbarretol and others added 4 commits August 10, 2024 11:32
Co-authored-by: huytool157 <97813378+huytool157@users.noreply.github.com>
Co-authored-by: huytool157 <97813378+huytool157@users.noreply.github.com>
Co-authored-by: huytool157 <97813378+huytool157@users.noreply.github.com>
Co-authored-by: huytool157 <97813378+huytool157@users.noreply.github.com>
@dqbd
Copy link
Owner

dqbd commented Aug 13, 2024

Hello! Sorry about the long delay! Will take a look as soon as possible!

@dqbd dqbd changed the title Add support for gpt-4o-mini model Add support for gpt-4o, gpt-4o-mini, text-embedding-3-small and text-embedding-3-large Aug 15, 2024
@dqbd dqbd merged commit e77e339 into dqbd:main Aug 15, 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.