dqbd / tiktoken

JS port and JS/WASM bindings for openai/tiktoken
MIT License
648 stars 49 forks source link

Add new models #86

Closed risu729 closed 5 months ago

risu729 commented 5 months ago

Adds new models released on January 25th, 2024.

The encodings are based on the definitions in model.py.

The following models are also added, but this PR does not include them. The encodings are still unknown since openai/tiktoken is not updated yet.

OpenAI blog post: New embedding models and API updates OpenAI API: Models

mystist commented 5 months ago

@dqbd Please merge ASAP as we are blocking as this moment🙏

nem035 commented 5 months ago

Should this PR also add gpt-4-turbo-preview, which was part of the recent release too?

risu729 commented 5 months ago

The PR includes it.

The list in the comment is the models not included in this PR. I apologize for the confusion.

mystist commented 5 months ago

A forked version with @risu729 's code just in case you need it right away: https://github.com/mystist/tiktoken

npm install tiktoken-mystist

risu729 commented 5 months ago

Thank you so much for the npm package! It's really helpful to me.

mystist commented 5 months ago

Thank you so much for the npm package! It's really helpful to me.

Thanks to yourself, actually your pr saved my life 😂

dqbd commented 5 months ago

Hey @risu729, thanks for the PR! LGTM