Download the PHP package dragnsurvey/openai without Composer
On this page you can find all versions of the php package dragnsurvey/openai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dragnsurvey/openai
More information about dragnsurvey/openai
Files in dragnsurvey/openai
Package openai
Short Description Laravel Package to interract with OpenAI API
License MIT
Informations about the package openai
Laravel OpenAI Package
Description
Laravel OpenAI Package is a Laravel wrapper for the OpenAI API, providing easy integration and usage of OpenAI's capabilities such as GPT-3, DALL-E, and more within Laravel applications. This package simplifies the process of connecting to OpenAI's API and performing various AI-driven tasks.
Features
- Easy integration with Laravel projects.
- Supports various OpenAI API functionalities like Chat, Image Generation, etc.
- Customizable to fit specific use cases.
Requirements
- PHP >= 7.4
- Laravel >= 8.0
- Guzzle HTTP Client
Installation
Install the package via Composer:
After installing, publish the configuration file (if needed):
Configuration
To configure the package, add your OpenAI API key to your .env
file:
Set other configuration options in config/openai.php
(if the
configuration file was published).
Usage
Using Chat API
To use the Chat API:
Using Image Generation API
To use the Image Generation API:
Advanced Usage
For advanced usage, refer to OpenAI's official documentation.
Testing
Run the tests with:
Contributing
Contributions are welcome, and any help is greatly appreciated.
License
This package is open-sourced software licensed under the MIT license.
Credits
- Roman STEC (https://www.dragnsurvey.com)