yethee/tiktoken
PHP port of OpenAI tiktoken for fast tokenization. Get encoders by model or encoding name, encode text to token IDs, with default vocab caching and configurable cache dir. Optional experimental FFI lib mode (tiktoken-rs) for better performance on larger texts.
The first stable release. There are no changes in the public API since version 0.12.0.
The lib mode is still in an experimental state. And method Encoder::encodeInChunks() is not supported.
How can I help you explore Laravel packages today?