Download the PHP package dskripchenko/laravel-llm without Composer
On this page you can find all versions of the php package dskripchenko/laravel-llm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dskripchenko/laravel-llm
More information about dskripchenko/laravel-llm
Files in dskripchenko/laravel-llm
Package laravel-llm
Short Description Local LLMs for Laravel through OpenAI-compatible APIs (Ollama, vLLM, LM Studio, llama.cpp): providers and purpose routes in the database with fallback, versioned prompt templates, structured output validated against a JSON schema, a call log with pruning, token quotas, a process-engine effect and a test fake.
License MIT
Homepage https://github.com/dskripchenko/laravel-llm
Informations about the package laravel-llm
dskripchenko/laravel-llm
π English Β· δΈζ
Local LLMs for Laravel through the OpenAI-compatible API that Ollama, vLLM,
LM Studio and llama.cpp server all speak β no SDK, only Laravel's Http
client. Callers ask for a purpose (summarize, classifyβ¦), never a
model: providers and routes live in the database, with a fallback route when
a provider is down. Prompts are presets in code that tenants may override
with versions; structured answers are validated against a JSON schema and
retried with the errors fed back; user text is always marked as data. Every
call is logged with tokens and duration, bodies are pruned after 30 days,
and daily token quotas are checked before a model is called. A
process-engine effect runs calls inside long-running processes, and
Llm::fake() makes all of it testable.
Install
PHP 8.2β8.5, Laravel 11, 12 or 13. The tables (llm_providers, llm_routes,
llm_prompt_templates, llm_calls) live on the default connection β with a
schema per tenant, set LLM_RUN_MIGRATIONS=false, publish the migration
(php artisan vendor:publish --tag=llm-migrations) into the tenant path and
run it per tenant.
Configure a provider and routes
A timeout, a connection error, a 5xx or a 429 moves on to the fallback; a
4xx does not. A cloud provider (is_cloud) is never used until an
administrator sets cloud_enabled β prompts carry tenant data.
Call a model
Test it
Documentation
- Providers and routes
- Prompts, schemas and user data
- Call log and quotas
- The
llm.runprocess-engine effect - Testing
Testing
License
MIT. See LICENSE.
All versions of laravel-llm with dependencies
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0