Open AI api wrapper for the Laravel Framework.
This version supports PHP 8.0. You can install the package via composer:
composer require adrianmejias/laravel-open-ai
To create the config/open-ai.php
configuration file:
php artisan vendor:publish --tag=open-ai
<?php
use AdrianMejias\OpenAi\Facades\OpenAiFacade;
$engines = OpenAiFacade::engines();
Expected Output:
$engines = [
'object' => 'list',
'data' => [
[
'object' => 'engine',
'id' => 'ada',
'ready' => 1,
'owner' => 'openai',
'created' => '',
'permissions' => '',
'replicas' => '',
'ready_replicas' => '',
'max_replicas' => '',
],
// ...
],
];
completions(array $options, string $engine = 'davinci')
- Get a list of completions.search(array $options, string $engine = 'davinci')
- Get a list of search results.answers(array $options)
- Get a list of answers.classifications(array $options)
- Get a list of classifications.files(string $file, string $purpose = 'classifications')
- Publish a training file (jsonl).engines()
- Get a list of engines.engine(string $engine)
- Get information for a specific engine.
composer test
- Add to packagist repo
- Add unit tests
- Add documentation for open source contributations
- Add GitHub Action for unit tests
- Add more unit test coverages
- Add more documentation to README.md
- Add API listing to README.md
Thank you for considering contributing to Laravel Open Ai! You can read the contribution guide here.
In order to ensure that the community is welcoming to all, please review and abide by the Code of Conduct.
Please see the security file for more information.
The MIT License (MIT). Please see the license file for more information.