Download the PHP package iserter/laravel-uniformed-ai without Composer

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

Laravel Uniformed AI

A Laravel package that exposes a single, uniform API over multiple AI providers (OpenAI, OpenRouter, Google AI Studio, Replicate.com, KIE.AI, PIAPI.AI, Tavily, ElevenLabs, etc.).

Features

Installation

Publish the config (optional to customize):

Set environment variables for any providers you will use:

Quick Usage

Extending

Provide a driver implementing the relevant Contract and map config / responses to the DTOs.

Testing

Uses Pest + Orchestra Testbench. Fakes HTTP calls via Http::fake() for provider payload shape + SSE streaming assertions (including mid-stream error events for OpenRouter).

Replicate chat support (prediction-based) is experimental: messages are flattened into a single prompt. Streaming & tool calls for Replicate not yet implemented.

Roadmap

AI Operation Usage Logging (Observability)

This package now includes an optional, privacy‑aware logging layer that records each AI operation (chat send/stream, image create/modify/upscale, audio speak, music compose, search query).

Enable

Enabled by default. Disable globally via:

Publish migration & config first (if not already):

What Gets Logged

One row per operation with: provider, service_type, service_operation, model, status (success/error), latency_ms, started/finished timestamps, sanitized request/response JSON, optional stream chunks, exception metadata on errors, and user_id (if authenticated).

Secrets (API keys, tokens) are automatically redacted using pattern and heuristic detection. Large payload fields are truncated with a ...(truncated) suffix.

Key Config (excerpt)

Pruning

Old rows can be pruned via scheduled command:

Add to app/Console/Kernel.php schedule:

Async Persistence

Set SERVICE_USAGE_LOG_QUEUE=true and configure your queue worker to offload insert work.

Querying

Use the Iserter\UniformedAI\Models\ServiceUsageLog model:

Future enhancements (tokens, cost, sampling, external sinks) will build on this foundation.

Catalog / Introspection

You can programmatically enumerate supported providers and curated model identifiers per service without hard‑coding them in your app. This is useful for building dynamic admin panels or select dropdowns.

The list is a curated static set (Phase 1). Future versions may allow config overrides or dynamic discovery.

License

MIT


All versions of laravel-uniformed-ai with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
illuminate/support Version ^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.7
openai-php/client Version ^0.16.1
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 iserter/laravel-uniformed-ai contains the following files

Loading the files please wait ...