Download the PHP package likeabas/filament-chatgpt-agent without Composer

On this page you can find all versions of the php package likeabas/filament-chatgpt-agent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-chatgpt-agent

ChatGPT Agent for Laravel Filament

Filament ChatGPT Agent is a Filament plugin that allows you to easily integrate ChatGPT into your Filament project, enabling ChatGPT to access context information from your project by creating GPT functions.

Latest Version on Packagist Total Downloads

Preview:

Dark Mode: Select a text to quickly insert it: Light Mode: ChatGPT can read the page content for extra context:

Features

I asked ChatGPT to generate a full list of the plugin features:

Screenshots

Installation

You need to have Laravel GPT from Malkuhr installed to use this package. If you haven't done so, follow the installation instructions:

You can install the package via composer:

Next you need to configure your OpenAI API Key and Organization ID. You can find both in the OpenAI Dashboard.

Now install this package:

Views

Optionally, you can publish the views:

Translations

Optionally, you can publish translations:

Usage

1. Adding the Plugin to Filament Panel

Modify your Filament Panel Configuration to include the plugin:

2. You can customize the plugin using the available options:

Also see all available options below.

Other language strings can be altered in the translations file. Just publish the translations.

See the full list of available options

3. Blade Component Usage

You can embed the ChatGPT agent in any Blade file:

This works for all Livewire pages in any Laravel project, not just Filament. Ensure Tailwind CSS, Filament, and Livewire are properly imported.

Available Options

Option Type Default Description
enabled() bool,Closure auth()->check() Enables or disables the ChatGPT agent.
botName() string,Closure 'ChatGPT Agent' Sets the displayed name of the bot.
buttonText() string,Closure 'Ask ChatGPT' Customizes the button text.
buttonIcon() string,Closure 'heroicon-m-sparkles' Defines the button icon.
sendingText() string,Closure 'Sending...' Text displayed while sending a message.
model() string,Closure 'gpt-4o-mini' Defines the ChatGPT model used.
temperature() float,Closure 0.7 Controls response randomness. Lower is more deterministic. 0-2.
maxTokens() int,Closure null Limits the token count per response. null is no limit.
systemMessage() string,Closure '' Provides system instructions for the bot.
functions() array,Closure [] Defines callable GPT functions. See Using Laravel GPT Functions
defaultPanelWidth() string,Closure '350px' Sets the chat panel width.
pageWatcherEnabled() bool,Closure false See the Page wachter option.
pageWatcherSelector() string,Closure '.fi-page' Sets the CSS selector for the page watcher.
pageWatcherMessage() string,Closure,null null Message displayed when the page changes.
startMessage() string,bool,Closure false Default message on panel open. Set to false to disable.

Using Laravel GPT Functions

Laravel GPT allows you to define custom GPTFunctions that ChatGPT can call to execute tasks within your application. This is useful for integrating dynamic data retrieval, calculations, or external API calls into the ChatGPT responses.

Refer to the Laravel GPT documentation for more details.

Page Watcher

The Page Watcher feature allows the ChatGPT agent to receive additional context about the current page by including the .innerText of a specified page element (default: .fi-page, the Filament page container) along with the page URL in each message sent to ChatGPT. This helps provide better contextual responses based on the page content.

Privacy Considerations

Use this feature with caution. Since the entire page content (or the selected element's content) is sent to ChatGPT, users should be informed of this behavior. The pageWatcherEnabled option supports a closure, allowing you to provide an opt-in mechanism for users.

Enabling Page Watcher

To enable the Page Watcher feature, set the pageWatcherEnabled option to true and define a selector for the element to monitor:

Alternatively, you can use a closure to enable the feature conditionally, such as requiring users to opt-in:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits


All versions of filament-chatgpt-agent with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version ^9.0|^10.0|^11.0
livewire/livewire Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package likeabas/filament-chatgpt-agent contains the following files

Loading the files please wait ....