Question: Does anybody know a good token count package for PHP?
inpresif opened this issue · comments
Describe the feature or improvement you're requesting
At thispoint we just divide the number of words by .75 to get the estimate, but a "real" script like tiktoken e.g. would be helpful. I did not come across one anywhere, does one exist?
If there is one, we're looking forward to using it and perhaps it will help your package as well?
Additional context
It would help give an estimate of tokens to our end users so they know what's about to get charged by OpenAI.
I can only bind the api references to the package