├── src
│ ├── OpenAPI
│ │ ├── Client.php
│ │
│ ├── Exception
│ │ ├── OpenAIException.php
├── tests
│ ├── ClientTest.php
├── vendor
│ └──
├── composer.json
└──
composer require guzzlehttp/guzzle:^7.0 league/oauth2-client:^2.6 phpunit/phpunit:^9.0
composer require cockycat/php-gpt
Add an entry for the facade class in the aliases array in config/app.php, for example:
'aliases' => [
// ...
'OpenAIClient' => App\\Facades\\OpenAIFacade::class,
],
use OpenAIClient;
$data = OpenAIClient::chat('/test', ['param1' => 'value1']);