PHP code example of semji / gpt-3-tokenizer-php
1. Go to this page and download the library: Download semji/gpt-3-tokenizer-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
semji / gpt-3-tokenizer-php example snippets
use Semji\GPT3Tokenizer\Encoder;
$prompt = "Many words map";
$encoder = new Encoder();
$encoder->encode($prompt);