vigstudio/laravel-ai is a Laravel package for a laravel plugin to interact with ai providers.
It currently has 1 GitHub stars and 995 downloads on Packagist (latest version 0.0.4).
Install it with composer require vigstudio/laravel-ai.
Discover more Laravel packages by vigstudio
or browse all Laravel packages to compare alternatives.
Last updated
WARNING: This package is currently under heavy development and is not yet suitable for production use.
The Laravel AI package provides an interface for connecting your Laravel application with AI services, particularly with OpenAI. With this package, you can easily:
You can install the package via composer:
composer require vigstudio/laravel-ai
After installation, publish the configuration file:
php artisan vendor:publish --provider="VigStudio\LaravelAI\ServiceProvider"
In the .env file, set your OpenAI API key:
AI_OPENAI_API_KEY=YOUR_API_KEY
This package offers a variety of command line tools that simplify interaction with AI services. Each tool prompts you to specify a provider and a model.
The tools include:
php artisan ai:chat
This command enables you to initiate a chat with an AI. Once the command is executed, you can begin your conversation.
php artisan ai:complete
This command allows you to request the AI to complete your text. Once the command is executed, you can provide your prompt and the AI will generate a response.
php artisan ai:image:generate
This command allows you to request the AI to generate an image. Once the command is executed, you can provide your prompt and the AI will generate an image.