Download the PHP package aitoolkit/laravel-ai-toolkit without Composer

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

Laravel AI Toolkit

A professional, production-ready Laravel package for integrating multiple AI providers with advanced features like async processing, real-time streaming, intelligent caching, and error handling.

Laravel PHP

โœจ Features

๐Ÿค– Multi-Provider AI Support

โšก Performance & Reliability

๐Ÿ”„ Real-Time Features

๐Ÿ”ง Developer Experience

๐Ÿ“ฆ Installation

Requirements

Install via Composer

Publish Configuration

This creates config/ai-toolkit.php where you can configure your providers.

Environment Variables

Add your API keys to .env:

๐Ÿš€ Quick Start

Basic Usage

Using Facades

Async Jobs

Streaming Responses

CLI Usage

โš™๏ธ Configuration

Provider Settings

Cache Settings

Queue Settings

Broadcasting Settings

๐Ÿ—๏ธ Architecture

Provider Pattern

All AI providers implement AIProviderContract:

Service Architecture

Caching Strategy

Retry Logic

๐Ÿงช Testing

Run the test suite:

Run with coverage:

The package includes:

๐Ÿ“š API Reference

AIProviderContract

chat(string $prompt, array $options = []): array

Send a chat message to the AI provider.

Parameters:

Returns:

stream(string $prompt, array $options = []): StreamedResponse

Stream a chat response in real-time.

embed(string $text): array

Generate text embeddings (OpenAI only).

AiCacheService

remember(string $operation, string $provider, string $input, callable $callback, array $options = []): mixed

Cache AI responses with automatic TTL.

generateKey(string $operation, string $provider, string $input, array $options = []): string

Generate consistent cache keys.

invalidatePattern(string $pattern): int

Invalidate cache by pattern.

RetryService

execute(callable $callback, array $options = []): mixed

Execute operations with retry logic.

Options:

๐Ÿ”’ Security

๐Ÿš€ Performance Tips

1. Enable Caching

2. Use Async Jobs for Long Operations

3. Monitor Cache Hit Rates

4. Use Circuit Breakers

๐Ÿ“– Advanced Usage

Custom Providers

Create a custom provider by implementing the contract:

Register in your service provider:

Event Listeners

Custom Caching

๐Ÿ› Troubleshooting

Common Issues

1. "Invalid AI provider" Error

2. API Key Not Found

3. Streaming Not Working

4. Queue Jobs Not Running

Debug Mode

Enable detailed logging:

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

Development Setup

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

๐Ÿ†˜ Support

๐Ÿ™ Acknowledgments


๐ŸŽ›๏ธ Filament Admin Panel Integration

The Laravel AI Toolkit includes optional Filament Admin Panel integration for a beautiful web interface to manage AI providers, monitor usage, and test AI operations.

Quick Setup

Features

Database-Driven Architecture

The Filament integration uses a database-first approach:

  1. Providers stored in database (not config files)
  2. Encrypted API keys for security
  3. Dynamic configuration via admin UI
  4. Seeder creates initial providers from .env values

Documentation

๐Ÿ“– Full documentation available in: docs/FILAMENT_INTEGRATION.md

Includes detailed setup, configuration, troubleshooting, and advanced usage examples.


Made with โค๏ธ for the Laravel community


All versions of laravel-ai-toolkit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^11.0|^12.0
openai-php/client Version v0.17.0
anthropic-ai/sdk Version v0.3.0
filament/filament Version ^4.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 aitoolkit/laravel-ai-toolkit contains the following files

Loading the files please wait ...