Download the PHP package schmosbyy/ai-companion without Composer

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

AI Companion for Laravel

Latest Version on Packagist Total Downloads

Overview

AI Companion is a Laravel package that enables natural language to SQL conversion, executes queries securely, and intelligently determines whether to display results as an HTML table or Chart.js visualization.

This package is designed for developers who want AI-powered data querying within their Laravel applications while ensuring security and ease of use.


Features

✅ Convert natural language into SQL queries using a local LLM (via Ollama)
✅ Validate SQL queries to prevent SQL injection
✅ Automatically select between HTML tables and Chart.js graphs for the best visualization
✅ Provides a user-friendly /ai-home endpoint for executing queries
✅ Supports configurable AI models, API endpoints, and execution timeout


Installation

Step 1: Install via Composer

Step 2: Configure (Optional)

The package works out of the box with default configurations, but if you want to modify them, publish the config file:

This will create the file:
📄 config/ai.php


Usage

1️⃣ Start the Local LLM Server

AI Companion requires Ollama running as an API server.
Run the following command to serve the LLM:

Ensure that the required model is downloaded and available.
To check available models, run:

If the model is missing, download it with:


2️⃣ Use the AI Companion

Visit:

Here, you can enter natural language queries, and the AI will:

  1. Convert it into SQL
  2. Validate the SQL for security
  3. Run the query safely
  4. Determine the best visualization (table or graph)

3️⃣ Customizing Configurations

By default, the package uses:

If you want to change the AI model or API URL, update your .env:


Security

🚨 SQL Injection Protection

⚠️ Additional Best Practices


License

This project is licensed under the Prosperity Public License 3.0.0.
🔹 Non-commercial use is allowed freely
🔹 Commercial use requires explicit permission

Read the full LICENSE file for details.


Credits & Attribution

This package is inspired by:

🚀 Happy Querying!


All versions of ai-companion with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version >=9.0
illuminate/http Version >=9.0
ext-json Version *
ext-pdo Version *
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 schmosbyy/ai-companion contains the following files

Loading the files please wait ....