Comment Comment by zurawiki In case others find this useful. Just updated for GPT-4, tiktoken-rs is a Rust crate you can use to tokenize text sent to and from OpenAI's LLM models parent zurawiki 3 years ago