Download the PHP package paparascaldev/sidekick without Composer

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

Sidekick for Laravel

Say hello to Sidekick! A Laravel plugin that provides a common syntax for using Claude, Mistral, Cohere and OpenAi APIs.
Laravel Plugin    Status     Latest Version    Stability     Status

Description

This project provides a unified wrapper around the OpenAI, Claude, Cohere and Mistral APIs for Laravel. The goal is to simplify switching between different AI models and APIs, making it as seamless as possible.

https://github.com/user-attachments/assets/4a3afa1a-0130-4c6c-bf1e-54dbe51117e4

Installation Guide

The easiest way to install the package in your laravel app is to run the following command from within your projects directory:

Other Methods

If you would like to install a specific version you can manually update your composer.json file under require section like so:

You can also use @dev tag.

After you have updated the file run:

Configuring the .env

Once Sidekick is installed you need to update your .env file with your access tokens.

You only need to specify the token for the provider(s) you will use.

Where can I get an API key?

If you are not yet signed up with any of the AI providers, here are some links to help:

Running Migrations

Run your migrations using the command below:

The Sidekick Playground

After the .env is updated you can start testing the plugin. I have added some routes with example calls for you to try out or learn from.

You can also publish these to your routes and views directory to directly modify with the following commands:

To access the playground head to:

Documentation

For the documentation we will be using the OpenAi model as it supports all endpoints, where Claude and Mistral are supported you can just hot-swap OpenAi when initialising the Sidekick/SidekickConversation class.

Sidekick Conversations

This allows you to create a chatbot that remembers previos interactions.

To start a new conversation:

This will create a new conversation in the Database and make the call to the AI for a response.

An example of the formatted response can be found below:

Once you have this response, to continue the conversation you can write the following in your controller making sure to pass the conversation_id in the request:

An example of the formatted response can be found below:

Managing Sidekick Conversations

There is very basic functionality to list, show and delete conversations. This will be updated in the near future. However, currently you do this by calling an instance of SidekickChatManager. Examples of each are below:

Completion

Embedding

Image (Image From Text)

Audio (Text To Speech)

Transcription (Speech To Text)

Example Response

Moderation

This is a service where you feed it text from a comment for example and it will return with an array of boolean values for certain moderation points.

Example Response

[!NOTE]
Quick note on error handling. Currently, if there is an error it is printed as the AI responds. I will be updating this over the next few days to be uniformed so that all errors are presented in tha same way regardless of AI driver/model

Ways to Contribute

I want this composer package for Laravel to be as useful as possible, so with that in mind here are the ways you can contribute:

Testing Information

I have tested the package using the following models:

Open Ai

Mistral AI

Claude AI

Cohere AI


All versions of sidekick with dependencies

PHP Build Version
Package Version
No informations.
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 paparascaldev/sidekick contains the following files

Loading the files please wait ....