An unofficial Ruby wrapper for Tiktoken, a BPE tokenizer used by OpenAI, for counting tokens in text before sending to OpenAI APIs.
gem install tiktoken_rubyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Count tokens for a string using GPT-4 encoding
Check for updates or use official OpenAI gem if available
No dependency data recorded yet.