PHP code example of adari / adariai-api
1. Go to this page and download the library: Download adari/adariai-api 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/ */
adari / adariai-api example snippets
use AdariaiApi\Wrapper;
//use environment variables for this, see examples
$api_key = "[YOUR OPENAI API KEY]";
$response = $openapi->getChat("gpt-3.5-turbo", "What's the capital of Peru?");
print_r($response);