mehrab-wj/tiktoken-php
A PHP port of OpenAI's tiktoken tokenizer for fast, accurate BPE token counting. Supports GPT-4, GPT-3.5, and other model encodings, so you can count tokens and estimate API costs directly in Laravel or plain PHP without extra services.
a clone of python tiktoken but for PHP! fast BPE tokeniser for use with OpenAI's models.
How can I help you explore Laravel packages today?