/gpt3-php

A simple PHP wrapper for the OpenAI GPT-3 API.

Primary LanguagePHPMIT LicenseMIT

Easy OpenAI GPT-3 API Library for PHP

License

A simple and easy to use PHP wrapper for the OpenAI GPT-3 API.

Example usage:

<?php

require_once '../includes/Openai.php';

$openai = New Openai();

//Engine, prompt and max tokens
$openai->request("ada", "This is a test", 5);

?>

Requirements

All the examples require your OpenAI api token

$secret_key = 'Bearer ******YOUR-KEY-HERE********';

License

OpenAI GPT-3 API Library is released under the MIT License.