Sunday, March 19, 2023
HomePHPOpenAI PHP Shopper | Laravel Information

OpenAI PHP Shopper | Laravel Information


OpenAI PHP Shopper is a supercharged PHP API shopper that lets you work together with the OpenAI API.

Here is a quick instance from the package deal’s readme of utilizing the OpenAI PHP shopper:

1$shopper = OpenAI::shopper('YOUR_API_KEY');

2 

3$consequence = $shopper->completions()->create([

4 'model' => 'davinci',

5 'prompt' => 'PHP is',

6]);

7 

8echo $consequence['choices'][0]['text'];

9// an open-source, widely-used, server-side scripting language.

On the launch of this submit, the OpenAI PHP shopper helps the next sources:

OpenAI has a broad vary of makes use of associated to pure language processing (NLP), producing code from pure language, and extra. To begin utilizing the OpenAI package deal, you may must familiarize your self with the OpenAI platform. I might advocate beginning with the API docs and OpenAI API examples.

To begin utilizing OpenAI along with your PHP purposes, try this package deal on GitHub at openai-php/shopper.



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments