claraleigh/gpt-helper-for-laravel
Composer 安装命令:
composer require claraleigh/gpt-helper-for-laravel
包简介
A Laravel package that generates templates using ChatGPT
关键字:
README 文档
README
Please Note: This is a very early concept project. At this stage it is very limited.
Project Goal
The goal of this project is to create open source versions of AI tools for use in PHP applications. At this stage it can predict files that you either give it, or when using the make:xxx command namespace.
Installation
You can install the package via composer:
composer require ClaraLeigh/gpt-helper-for-laravel
The package will automatically register itself.
Configuration
You can publish the config file with:
php artisan vendor:publish --provider="GptHelperForLaravel\GptServiceProvider" --tag="config"
This will create a gpt-helper.php config file in your config directory. You can set your ChatGPT API key, model, GPT settings, and Domain-Driven Design starting directory in the configuration file.
Publish Language Files
You can publish the language files with:
php artisan vendor:publish --provider="GptHelperForLaravel\GptServiceProvider" --tag="lang"
This will create a resources/lang/vendor/gpt-helper directory, where you can store your language files.
Usage
Try to predict the contents of a file, with context and a prompt
php artisan gpt:predict
{source : The file we wish to predict}
{--prompt= : Add additonal text to give GPT context}
{--files= : A comma separated list of classnames/files to use as context}
{--summarizedFiles= : Same as files, but use a summary of instead to reduce the query}
Auto generate files during creation
For example, in your custom command:
php artisan make:model Books --prompt="This is a books model, with authors, genre's, publication dates and a relevant library"
This will create a Books model in your app directory, and the contents of the file will be modified using ChatGPT.
Available Templates
The following templates are available:
- Model
- Controller
- ... more coming soon
Available Settings
The following GPT settings are available:
- model
- max_tokens
- temperature
- n
- stop
Testing
composer test
License
I am considering changing this license, open a issue if you have any suggestions.
The MIT License (MIT). Please see License File for more information.
Credits
claraleigh/gpt-helper-for-laravel 适用场景与选型建议
claraleigh/gpt-helper-for-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.13k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2023 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「templates」 「laravel」 「gpt」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 claraleigh/gpt-helper-for-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 claraleigh/gpt-helper-for-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 claraleigh/gpt-helper-for-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Shoot aims to make providing data to your templates more manageable
CakePHP 4.x AdminLTE Theme.
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
PHP 8.0+ OpenAI API client with fully typed/documented requests+responses models, guzzle and symfony/http-client support and async/parallel requests.
CakePHP 3.x Gentelella Theme.
AI-powered helper for PHP errors, warnings and exceptions: practical, context-aware explanations and suggestions via local or API LLMs.
统计信息
- 总下载量: 2.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-21