#Tokenizer

10 messages · Page 1 of 1 (latest)

frail shore
obtuse osprey
#

They link a nodejs package you can use for that at the bottom of the page. If you are using python you will want to look for a library called tiktoken

frail shore
#

oh tnx

obtuse osprey
# frail shore

The length of that array should be the amount of tokens in the text

cyan ember
#

I'll be interested to find out if you get the same figures as are returned from the API. In my experience, the OpenAI tokenizer page and the API use slightly different algorithms. This is especially evident when you have Unicode characters in your prompt.

frail shore