PHP code example of innovination / chatgpt
1. Go to this page and download the library: Download innovination/chatgpt 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/ */
innovination / chatgpt example snippets
use Innovination\Chatgpt;
GPT_API_KEY='your-api-key'
GPT_MODEL_NAME='your-preferred model (ex. gpt-3.5-turbo-0125)'
$obj = new Chatgpt();
$audio_path = 'link to audio';
$transcription = $obj->audioToText($audio_path);