Code Monkey home page Code Monkey logo

filament-chatgpt-bot's Introduction

ChatGPT Intergration

Filament ChatGPT Bot is a filament plugin that allow you to use ChatGPT out of the box within Filament Application.

Latest Version on Packagist Total Downloads

Preview: Full Screen: Light Mode:

Feature

  • Integrate with ChatGPT
  • Easy to Setup
  • Shortcut allows control of panel in more convenient way
  • Support for dark mode

Installation

First, you can install the package via composer:

composer require icetalker/filament-chatgpt-bot

For Filament V2, Please lock the the version to v0.1.*:

composer require icetaker/filament-chatgpt-bot:"v0.1.3"

Publish Config Files

Next, you can publish the config files with:

php artisan vendor:publish --tag="filament-chatgpt-bot-config"

This will create a config/filament-chatgpt-bot.php configuration file in your project, which you can modify to your needs using environment variables:

OPENAI_API_KEY=sk-...

Go to admin panel, you will see a small icon in gray color on the bottom-right corner of every page. Click the icon, you will then see a chat panel. And now you can talk to OpenAI ChatGPT with the chat panel. Click the small icon again, the chat panel will become hidden again.

By optionally adding the OPENAI_PROXY to .env file, you could use http proxy to connect ChatGPT. Example as below:

OPENAI_PROXY=127.0.0.1:8080

Views

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-chatgpt-bot-views"

More

  1. By defult, there is a small chatgpt icon on bottom-right corner of admin panel after the package installed. You could hide the icon by setting enable to false in config/filament-chatgpt-bot.php files:
    'enable' => false,

This may require you publish config files.

  1. You could also render it in Panel Configuration like this:
public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->renderHook(
            'panels::body.end',
            fn (): string => auth()->check() ? Blade::render('@livewire(\'livewire-ui-modal\')') : '',
        );
}

Set enable in config/filament-chatgpt-bot.php files, if you like to render it in Panel Configuration.

  1. Alternatively, you can add it to any blade file within livewire page if you like to do it manually:
<body>

    ...

    @livewire('filament-chatgpt-bot')
</body>

This is work for all livewire page in any Laravel Project, not just Filament. Please also make sure Tailwind CSS and Livewire were imported properly while use in other Laravel Project.

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

Support

Any Problem please email: [email protected].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.