PHP Classes


Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP OpenAI Library   Download  
Role: Documentation
Content type: text/markdown
Description: Read me
Class: PHP OpenAI Library
Search engine for text using OpenAI API
Author: By
Last change:
Date: 1 year ago
Size: 2,242 bytes


Class file image Download

PHP SDK for OpenAI and GPT-3

:eyes: Contents

:hammer: Requirements

:thought_balloon: Examples

require_once __DIR__ . '/vendor/autoload.php'; // Include Composer's autoload

use PH7\OpenAi\Client as OpenAiClient;
use PH7\OpenAi\Api\OpenAi;
use PH7\OpenAi\Api\PrivateKey as OpenAiKey;

$apiKey = new OpenAiKey('YOUR_OPENAI_KEY');
$openAi = new OpenAiClient(new OpenAi($apiKey));
$openAi->search('Some keywords'); // To search
$openAi->classifications('Some keywords'); // For OpenAI classifications

:tada: 3rd party libraries

:cook: Author

I'm Pierre-Henry Soria. A passionate, zen &amp; dedicated software engineer ?

You can keep in touch with me at: ?


Pierre-Henry Soria

Me building this library ?

[![Watch the video][video-thumbnail]](

? Click here to watch on YouTube

:page_with_curl: License

PHP OpenAI SDK is distributed under MIT license ? Enjoy! ??

Note: This is not an official library published by OpenAI. I just want to help the community by providing a great library layer to be used with OpenAI.

<!-- GitHub's Markdown reference links --> [github-image]: [video-thumbnail]:

<!-- Was generated by README Generator CLI on 2022-02-20 -->