Klient PHP OpenAI to doładowany klient PHP API, który pozwala na interakcję z API OpenAI.
🎉 After weeks of development, @gehrisandro and I are proud to announce the release of OpenAI PHP Client v0.1. 🚀
— nuno maduro 🤌🏻 (@enunomaduro) October 20, 2022
It's a supercharged PHP API client that allows you to interact with @OpenAI API. Enjoy! ⚡️ https://t.co/7Gw0fewlSx
$client = OpenAI::client('YOUR_API_KEY');
$result = $client->completions()->create([
'model' => 'davinci',
'prompt' => 'PHP is',
]);
echo $result['choices'][0]['text'];
// an open-source, widely-used, server-side scripting language.