PHP Classes

PHP OpenAI Library: Search engine for text using OpenAI API

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 89 All time: 9,966 This week: 61Up
Version License PHP version Categories
openai-library 1.0.0GNU General Publi...5PHP 5, Searching, Web services, Artif...
Description 

Author

This package can search engine for text using OpenAI API.

It can send HTTP requests to the OpenAI API Web servers to perform several types of requests.

Currently, it can:

- Perform searches for a given text keywords

- Query classifications using given text keywords

- Get answers for questions

Picture of Pierre-Henry Soria
  Performance   Level  
Name: Pierre-Henry Soria <contact>
Classes: 49 packages by
Country: United Kingdom
Innovation award
Innovation award
Nominee: 18x

Winner: 3x

Documentation

PHP SDK for OpenAI and GPT-3

:eyes: Contents

:hammer: Requirements

:thought_balloon: Examples

<?php
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: hi@ph7.me ?

[![pH-7][github-image]](https://github.com/pH-7)

Pierre-Henry Soria

Me building this library ?

[![Watch the video][video-thumbnail]](https://www.youtube.com/watch?v=Fv4J79eQjrc)

? 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]: https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white [video-thumbnail]: https://i1.ytimg.com/vi/Fv4J79eQjrc/sddefault.jpg

<!-- Was generated by README Generator CLI on 2022-02-20 https://github.com/pH-7/github-readme-generator-cli -->


  Files folder image Files (12)  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (1 file, 1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files (12)  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files (12)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file test.yml Data Auxiliary data

  Files folder image Files (12)  /  src  
File Role Description
Files folder imageApi (4 files)
  Plain text file Client.php Class Class source

  Files folder image Files (12)  /  src  /  Api  
File Role Description
  Plain text file OpenAi.php Class Class source
  Accessible without login Plain text file OpenAiApi.php Aux. Auxiliary script
  Plain text file Pluggable.php Class Class source
  Plain text file PrivateKey.php Class Class source

  Files folder image Files (12)  /  tests  
File Role Description
Files folder imageApi (2 files)

  Files folder image Files (12)  /  tests  /  Api  
File Role Description
  Plain text file OpenAiTest.php Class Class source
  Plain text file PrivateKeyTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:89
This week:0
All time:9,966
This week:61Up