Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
yewenjie
· 3y ago · 0 comments
NOTE: this is only valid for the old models (GPT-3 and Codex). IIRC, there is no simple way to know the token usage for the new models (gpt3.5-turbo and beyond).
Comments
[–]
tedsanders
3y ago
This guide explains how to count tokens for 3.5-turbo and beyond:
https://github.com/openai/openai-cookbook/blob/main/examples...
[–]
iamjackg
3y ago
You can use
https://github.com/openai/tiktoken
[–]
NameError
3y ago
The API does tell you how many prompt and completion tokens each request used, if you're okay knowing after-the-fact
[–]
sebzim4500
3y ago
Assuming the API docs are honest, all the publicly available GPTs use the same tokens.
[–]
tedsanders
3y ago
Different GPTs use different tokens:
https://github.com/openai/openai-cookbook/blob/main/examples...