Download the PHP package askerakbar/gpt-trix-editor without Composer
On this page you can find all versions of the php package askerakbar/gpt-trix-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download askerakbar/gpt-trix-editor
More information about askerakbar/gpt-trix-editor
Files in askerakbar/gpt-trix-editor
Package gpt-trix-editor
Short Description GPT Trix Editor package extends the default Trix editor features in the Filament PHP framework.
License MIT
Homepage https://github.com/askerakbar/gpt-trix-editor/
Informations about the package gpt-trix-editor
GPT Trix Editor 🪄
The GPT Trix Editor is a form field component for the Filament PHP framework that enhances the Trix editor with OpenAI GPT features.
Features:
New - Call ChatGPT API on selected/highlighted text 👇
Installation
You can install the package via composer:
Quick Start
-
Publish the configuration files by running the following commands:
- We're using https://github.com/openai-php/laravel laravel package to call the OpenAI APIs, so you need to set your OpenAI API key in the .env file or in the config/openapi.php file:
You can also set the GPT model in the .env
- Optionally, you can customize the configuration file at config/gpt-trix-editor.php. This includes adding more prompts to the menu dropdown, setting temperature and max_tokens.
-
Clear the configuration cache to make sure your changes take effect:
- Done!
Usage
Import the field component:
You can use the GPT Trix Editor field component like any other field component:
By default, the GPT Toolbar Button is enabled in the GP Trix Editor. However, if you want to disable it, you can do so like this:
To do
- ✅ Run the GPT actions on selected/highlighted text
Contribute / Report a bug / Security Vulnerabilities
If you would like to contriubte, please feel free to submit pull requests or open issues.
License
The MIT License (MIT). Please see License File for more information.
All versions of gpt-trix-editor with dependencies
filament/filament Version ^3.2
spatie/laravel-package-tools Version ^1.12
openai-php/laravel Version ^0.8.1
illuminate/contracts Version ^11.0