go-openai
go-openai copied to clipboard
Ability to count tokens before sending
Reading the Open AI docs on Chat completion they specifically call out counting tokens on input (as you are billed on these as well as the amount of tokens on output). They use their TikToken python library, it would be awesome if there was something in this lib to do the same