alnutile/laravel-chatgpt
Larablocks Analysis
alnutile/laravel-chatgpt works with Laravel 9 and 10 (latest release 0.0.5, Apr 30, 2023), all past end of life (the last on Feb 4, 2025): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 9 and 10, past end of life since Feb 4, 2025
- No release in the last 12 months (last: Apr 30, 2023)
- 56 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Apr 30, 2023.
- No releases in the last 12 months.
- First released: Feb 3, 2023.
- Monthly downloads: 56.
- 1 open issue on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require alnutile/laravel-chatgpt |
|
| Latest Version: | 0.0.5 |
| PHP: | ^8.1 |
| Laravel: | 9 · 10 |
| License: | MIT |
| Last Updated: | Apr 30, 2023 |
| Links: | GitHub · Packagist |
Base client to talk to ChatBot amd Dall-e2 and Soon Other Services
Going to build some basic Driver like clients to talk to different AI service but like with Laravel Storage it will treat them all the same.
- ChatGPT for text
- Jasper when ChatGPT is down :(
- Dall-2
- OpenAI Moderator
- Midjourney - when it gets an api
Installation
You can install the package via composer:
composer require alnutile/laravel-chatgpt
You can then set your .env:
AI_CLIENT=sk-key
AI_MOCK=false
If you set AI_MOCK to true it will just return some fixture data so if you are working in your UI for example it will just show that data.
Usage
Here is an example of
- Call Moderation to see if the text is ok
- TextClientFacade to do a text search with adding a prefix to the request
- SearchResults Event to just let the system know and react to it like make a local copy of the data
- ModerationFailed Event so you can react to that
$moderationOk = ModerationClientFacade::checkOk(request()->search);
if ($moderationOk == false) {
ModerationFailed::dispatch(request());
} else {
$results = TextClientFacade::addPrefix('can you give me tl;dr terms of service for')->text($search);
SearchResults::dispatch($results);
}
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
Related Packages
Laravel chatgpt package, includes models listing and retrieving, completions pre...
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 0.0.5 | ^8.1 | ^9.0| | MIT | |
| 0.0.4 | ^8.1 | ^9.0| | MIT | |
| 0.0.3 | ^8.1 | ^9.0| | MIT | |
| 0.0.2 | ^8.1 | ^9.0 | MIT | |
| 0.0.1 | ^8.1 | ^9.0 | MIT |