PHP Classes

PHP OpenAI Library: Search engine for text using OpenAI API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 84 This week: 1All time: 10,019 This week: 560Up
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: 46 packages by
Country: United Kingdom
Age: 33
All time rank: 37916 in United Kingdom
Week rank: 22 Up1 in United Kingdom Up
Innovation award
Innovation award
Nominee: 17x

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  
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  /  .github  
File Role Description
Files folder imageworkflows (1 file)

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

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

  Files folder image Files  /  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  /  tests  
File Role Description
Files folder imageApi (2 files)

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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:84
This week:1
All time:10,019
This week:560Up