Download the PHP package ogrre/laravel-chatgpt without Composer

On this page you can find all versions of the php package ogrre/laravel-chatgpt. 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 laravel-chatgpt

🐈 Laravel Chat for ChatGPT

Packagist Version GitHub License Packagist Downloads

Documentation

This libray need openai php client, so don't forget to add in your .env this variables:

Installation:

To install the Laravel Chat for ChatGPT library, run the following command:

After the installation, publish the vendor files by executing the command:

By default, the service provider will be automatically registered in the app.php file. However, if needed, you can manually add the service provider in the config/app.php file:

Finally, run the migration command to create the necessary database tables:

Usage instructions

To associate a chat with a model, the model must use the hasChat trait. For example, in the User model:

Once the model is set up with the hasChat trait, you can create a new chat using the following command:

After creating a new chat or retrieving an existing one, you have two options to interact with it:

Using the chat object directly:

Using the model directly (in this example, the User model):

The Chat model is a standard Laravel Model, so you can use all the usual functions, including delete and others.

Additionally, the library provides a ChatResource for displaying chats in an API, allowing for easy integration with API endpoints.

Contributing

Contributions are welcome and will be fully credited. I accept contributions via Pull Requests on Github.

Support me

Buy Me A Coffee


All versions of laravel-chatgpt with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^7.0|^8.0|^9.0|^10.0
openai-php/client Version ^0.6.2
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 ogrre/laravel-chatgpt contains the following files

Loading the files please wait ....