mvitlov / tiktoken

tiktoken is a BPE tokeniser for use with OpenAI's models
Other
23 stars 7 forks source link

`encodingForModel` method is missing? #1

Closed jooy2 closed 1 year ago

jooy2 commented 1 year ago

Hello. Thank you for porting tiktoken to dart.

I am currently using version 1.0.0.

Maybe this is my mistake, but when I try to use encodingForModel, I can't seem to find that method.

final encoding = encodingForModel("gpt-3.5-turbo");

image

Is this not implemented yet, or am I using it incorrectly?

Regards,

mvitlov commented 1 year ago

@jooy2 Good catch 👍. The method was there, but wasn't exposed.

I've just published the new version 1.0.1 that fixes this.

jooy2 commented 1 year ago

Wow, thank you for the quick response and update! I upgraded to 1.0.1 and found that encodingForModel works fine.

Regards,