siteorigin / openai-api
This package is abandoned and no longer maintained.
No replacement package was suggested.
A PHP wrapper for the OpenAI API
1.1.2
2022-03-09 09:26 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.7
- larapack/dd: ^1.1
- phpunit/phpunit: ^9.5
- psy/psysh: @stable
- spatie/ray: ^1.27
- vimeo/psalm: ^4.22
- vlucas/phpdotenv: ^5.3
This package is auto-updated.
Last update: 2023-12-22 05:16:22 UTC
README
This repository for the OpenAI PHP Wrapper, developed by SiteOrigin, is now archived. For updated and ongoing PHP integration with OpenAI's API, please refer to the OpenAI PHP Client instead.
Original Repository Details:
- Repository: OpenAI PHP Wrapper by SiteOrigin
- Packagist: siteorigin/openai-api
- Functionality: Facilitated integration with the OpenAI API, offering a PHP-based approach for incorporating GPT-3 into applications.
Features:
- Provided a comprehensive interface for the OpenAI API in PHP.
- Simplified syntax for common tasks like generating completions.
- Supported full API functionality without constraints.
Example Code Snippet:
use SiteOrigin\OpenAI\Client; $client = new Client($_ENV['OPENAI_API_KEY']); // Example usage for generating completions $completions = $client->completions('davinci')->complete("Sample prompt", [/* parameters */]); foreach($completions as $c) { echo $c->text . "\n"; }
Further Information:
For those who previously utilized or are interested in this PHP wrapper, it's recommended to transition to the new OpenAI PHP Client for the latest updates and continued support.