PHP Classes

Laravel ChatGPT: Integrate ChatGPT in a Laravel Nova panel

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (25)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-08-27 (6 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 47 All time: 10,669 This week: 92Up
Version License PHP version Categories
chatgpt 1.0.0MIT/X Consortium ...7Web services, Artificial intelligence, P...
Description 

Author

This package can integrate ChatGPT in a Laravel Nova panel.

It uses ChatGPT API to provide a Web interface to ChatGPT features in a site that uses the Laravel Nova administration panel.

Currently, it uses ChatGPT API to allow users to:

- Ask questions

- Store questions in a database

- Copy answers so users can paste them into another page or application

- Display the total number of API tokens used for each request

- Track the usage of API token

- Access a history page to see past API usage

- View a question page

- Delete a question

- Clear the usage history

Innovation Award
PHP Programming Innovation award nominee
August 2023
Number 2
ChatGPT is a popular artificial intelligence service that allows users to ask questions using natural language.

Laravel Nova is a package that allows developers to implement modular administration panels in sites implemented using the Laravel framework.

This package implements an integration between the ChatGPT service and a panel that lets users ask questions to the ChatGPT service using its API from a Laravel application.

This possibility allows users of a Laravel application to quickly ask questions and get answers in the same place as a site where the users perform site administration tasks.

Manuel Lemos
Picture of Naif Alshaye
  Performance   Level  
Innovation award
Innovation award
Nominee: 9x

 

Documentation

Laravel Nova 4 ChatGPT Integration Tool

A Laravel Nova 4 ChatGPT Integration Tool combines Laravel Nova 4 with the ChatGPT API.

Features

  • Ask ChatGPT
  • Store questions to database
  • Copy answer
  • Display total Tokens used for each request
  • Tracks token usage
  • History Page for easy reference
  • View question page
  • Delete question
  • Clear history

Requirements

  • PHP 8.0 or higher
  • Nova 4
  • OpenAI API Key
  • ## Installation

You can install the package into a Laravel app that uses Nova via composer:

composer require naif/chatgpt

Publish Model, Migration and Config files

php artisan vendor:publish --provider="Naif\Chatgpt\ToolServiceProvider" 

Run Migrate

php artisan migrate

Add the below to .env file:

CHATGPT_NOVA4_API_KEY=###############
CHATGPT_NOVA4_MAX_TOKENS=1000

You can increase the tokens to get more text from ChatGPT response.

Usage

Add the tool to NovaServiceProvider.php

  public function tools()
    {
        return [
            new Chatgpt()
        ];
    }

Screenshots

<img src="screenshots/dark-home.png" width="800">

<img src="screenshots/light-home.png" width="800">

<img src="screenshots/history.png" width="800">

<img src="screenshots/view.png" width="800">

Support:

naif@naif.io

https://naif.io

Bug Tracker:

https://github.com/naifalshaye/chatgpt-nova4/issues

License

The MIT License (MIT). Please see License File for more information.


Screenshots  
  • screenshots/dark-home.png
  • screenshots/history.png
  • screenshots/light-home.png
  • screenshots/question.png
  • screenshots/view.png
  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagedatabase (1 directory)
Files folder imagedist (1 file, 2 directories)
Files folder imageresources (2 directories)
Files folder imageroutes (2 files)
Files folder imagesrc (2 files, 2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file nova.mix.js Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file postcss.config.js Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:47
This week:0
All time:10,669
This week:92Up