Download the PHP package lanos/laravel-open-ai-conversations without Composer

On this page you can find all versions of the php package lanos/laravel-open-ai-conversations. 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-open-ai-conversations

Laravel GPT Conversations

Intro

This package is built on top of the openai-php/laravel package to allow you to build conversation sessions where context is preserved using a database.

This package is just an extra layer on top of the amazing package developed by:

The openai-php/laravel is required and should be installed as part of this install.

Setup

Requires PHP 8.1+

Really simple. Install our package (if you don't have the openai-php/laravel installed, composer should try to install it)

Then you need to just run the migrations

If you haven't set up the OpenAI-PHP Laravel package you can publish their config like so:

Then add the environment variables as needed.

You can also override some of the default config variables in the .env for my plugin, such as setting the default model for a conversation.

Examples

Once you have fully configured both plugins you simply create a conversation using the eloquent interface.

The defaults are filled in for you, but you can override upon creation.

Once you have created the conversation you can ask questions. The plugin will automatically append all previous responses so that the model has consciousness of previous messages in the conversation. It also automatically ensures no token limits are hit by "forgetting" older messages as needed.

Forgotten messages

Due to token limits, when necessary the plugin will soft delete older messages, similar to how chat GPT does it. The difference is with this, it will do it less often, as the token limits are higher on the API depending on what model you use. Be wary that requests can become expensive.

You can use the withTrashed function on eloquent to get all the forgotten messages.

License

Please refer to the license.md in this repository.


All versions of laravel-open-ai-conversations with dependencies

PHP Build Version
Package Version
Requires openai-php/laravel Version ^v0.5.1
guzzlehttp/guzzle Version ^7.0.1
illuminate/console Version ^8.37|^9.0
illuminate/contracts Version ^8.37|^9.0
illuminate/database Version ^8.37|^9.0
laravel/framework Version ^8.37|^9.0
illuminate/http Version ^8.37|^9.0
illuminate/log Version ^8.37|^9.0
illuminate/notifications Version ^8.37|^9.0
illuminate/routing Version ^8.37|^9.0
illuminate/support Version ^8.37|^9.0
illuminate/view Version ^8.37|^9.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 lanos/laravel-open-ai-conversations contains the following files

Loading the files please wait ....