Skip to content

priv4cy/php-openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP OpenAI

Implements OpenAI in PHP in a simple way.

Deployment

To deploy this project run

  git clone https://github.com/priv4cy/php-openai.git

You need to use OpenAI Key!

Usage/Examples

$openAI = new OpenAI();
$openAI->connect('API_KEY');

// Generate text
$text = $openAI->generateText('Hola, ¿cómo estás hoy?', 'text-davinci-003');
echo $text[0];

// Answer Question
$answer = $openAI->answerQuestion('¿Cuál es el color del cielo?', 'davinci');
echo $answer;

License

MIT

About

Implements OpenAI in PHP Class in a simple way.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages