Closed randompixel closed 3 weeks ago
Rebased branch based on latest chore(deps)
updates on main
@mrsteele; would you accept this PR in to a bugfix release?
Looks great! Thanks for the fix!
:tada: This PR is included in version 2.3.6 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
When using a
gpt-4o
as a model, the current release is failing when trying to get an encoder (all the unit tests use3.5-turbo
as a model)If we look at js-tiktoken,
gpt-4o
useso200k_Base
as an encoder which isn't listed in the model list ofencoder.js
.This Pull Request adds the new
o200k_Base
in to the encoder list. I added a simple test to make sure a variety of models return an encoder. Ideally I would have liked to have looped theconst models
frommodels.js
but that isn't exported and I wasn't confident in changing that to be exported.I also bumped the dependency to
.14
as this is the minimumjs-tiktoken
release that supports4o
models. I think that's better than just relying on the^
?