chore: Integrate OpenAI API for completions on Ignition error page.

- Add OpenAI API to composer dev requirements.
- Add OpenAI API key to environment variables in .env.example.
This commit is contained in:
Jonny Barnes 2023-06-18 08:53:28 +01:00
parent 8e2535206e
commit a06d00210b
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
7 changed files with 248 additions and 17 deletions

228
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bc6e8ed12c7878c4ae9c94f2c143d97e",
"content-hash": "ebd4c00143a4dfb090f4d12d808d4782",
"packages": [
{
"name": "aws/aws-crt-php",
@ -9642,6 +9642,98 @@
],
"time": "2023-06-15T10:51:08+00:00"
},
{
"name": "openai-php/client",
"version": "v0.6.1",
"source": {
"type": "git",
"url": "https://github.com/openai-php/client.git",
"reference": "67937756931af848c03112e52706aa6ad175aa7a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/openai-php/client/zipball/67937756931af848c03112e52706aa6ad175aa7a",
"reference": "67937756931af848c03112e52706aa6ad175aa7a",
"shasum": ""
},
"require": {
"php": "^8.1.0",
"php-http/discovery": "^1.18.1",
"php-http/multipart-stream-builder": "^1.3.0",
"psr/http-client": "^1.0.2",
"psr/http-client-implementation": "^1.0.1",
"psr/http-factory-implementation": "*",
"psr/http-message": "^1.1.0|^2.0.0"
},
"require-dev": {
"guzzlehttp/guzzle": "^7.7.0",
"guzzlehttp/psr7": "^2.5.0",
"laravel/pint": "^1.10.2",
"nunomaduro/collision": "^7.5.2",
"pestphp/pest": "dev-develop as 2.6.2",
"pestphp/pest-plugin-arch": "^2.2.0",
"pestphp/pest-plugin-mock": "^2.0.0",
"pestphp/pest-plugin-type-coverage": "^2.0.0",
"phpstan/phpstan": "^1.10.15",
"rector/rector": "^0.16.0",
"symfony/var-dumper": "^6.3.0"
},
"type": "library",
"autoload": {
"files": [
"src/OpenAI.php"
],
"psr-4": {
"OpenAI\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
},
{
"name": "Sandro Gehri"
}
],
"description": "OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API",
"keywords": [
"GPT-3",
"api",
"client",
"codex",
"dall-e",
"language",
"natural",
"openai",
"php",
"processing",
"sdk"
],
"support": {
"issues": "https://github.com/openai-php/client/issues",
"source": "https://github.com/openai-php/client/tree/v0.6.1"
},
"funding": [
{
"url": "https://www.paypal.com/paypalme/enunomaduro",
"type": "custom"
},
{
"url": "https://github.com/gehrisandro",
"type": "github"
},
{
"url": "https://github.com/nunomaduro",
"type": "github"
}
],
"time": "2023-06-15T04:11:23+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.3",
@ -9753,6 +9845,140 @@
},
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "php-http/discovery",
"version": "1.18.1",
"source": {
"type": "git",
"url": "https://github.com/php-http/discovery.git",
"reference": "f258b3a1d16acb7b21f3b42d7a2494a733365237"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/discovery/zipball/f258b3a1d16acb7b21f3b42d7a2494a733365237",
"reference": "f258b3a1d16acb7b21f3b42d7a2494a733365237",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0|^2.0",
"php": "^7.1 || ^8.0"
},
"conflict": {
"nyholm/psr7": "<1.0",
"zendframework/zend-diactoros": "*"
},
"provide": {
"php-http/async-client-implementation": "*",
"php-http/client-implementation": "*",
"psr/http-client-implementation": "*",
"psr/http-factory-implementation": "*",
"psr/http-message-implementation": "*"
},
"require-dev": {
"composer/composer": "^1.0.2|^2.0",
"graham-campbell/phpspec-skip-example-extension": "^5.0",
"php-http/httplug": "^1.0 || ^2.0",
"php-http/message-factory": "^1.0",
"phpspec/phpspec": "^5.1 || ^6.1 || ^7.3",
"symfony/phpunit-bridge": "^6.2"
},
"type": "composer-plugin",
"extra": {
"class": "Http\\Discovery\\Composer\\Plugin",
"plugin-optional": true
},
"autoload": {
"psr-4": {
"Http\\Discovery\\": "src/"
},
"exclude-from-classmap": [
"src/Composer/Plugin.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations",
"homepage": "http://php-http.org",
"keywords": [
"adapter",
"client",
"discovery",
"factory",
"http",
"message",
"psr17",
"psr7"
],
"support": {
"issues": "https://github.com/php-http/discovery/issues",
"source": "https://github.com/php-http/discovery/tree/1.18.1"
},
"time": "2023-05-17T08:53:10+00:00"
},
{
"name": "php-http/multipart-stream-builder",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/php-http/multipart-stream-builder.git",
"reference": "f5938fd135d9fa442cc297dc98481805acfe2b6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/f5938fd135d9fa442cc297dc98481805acfe2b6a",
"reference": "f5938fd135d9fa442cc297dc98481805acfe2b6a",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0",
"php-http/discovery": "^1.15",
"psr/http-factory-implementation": "^1.0"
},
"require-dev": {
"nyholm/psr7": "^1.0",
"php-http/message": "^1.5",
"php-http/message-factory": "^1.0.2",
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Http\\Message\\MultipartStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com"
}
],
"description": "A builder class that help you create a multipart stream",
"homepage": "http://php-http.org",
"keywords": [
"factory",
"http",
"message",
"multipart stream",
"stream"
],
"support": {
"issues": "https://github.com/php-http/multipart-stream-builder/issues",
"source": "https://github.com/php-http/multipart-stream-builder/tree/1.3.0"
},
"time": "2023-04-28T14:10:22+00:00"
},
{
"name": "php-webdriver/webdriver",
"version": "1.14.0",