OpenAI PHP Shopper is a supercharged PHP API shopper that lets you work together with the OpenAI API.
🎉 After weeks of growth, @gehrisandro and I are proud to announce the discharge of OpenAI PHP Shopper v0.1. 🚀
It is a supercharged PHP API shopper that lets you work together with @OpenAI API. Take pleasure in! ⚡️ https://t.co/7Gw0fewlSx
— nuno maduro 🤌🏻 (@enunomaduro) October 20, 2022
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.