omarelnaghy/laravel-ai-copilot

Plug-and-play Laravel AI Copilot: unified AI API (OpenAI, Anthropic, Ollama)

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/omarelnaghy/laravel-ai-copilot

v0.1.4 2025-09-29 13:53 UTC

This package is auto-updated.

Last update: 2025-11-30 07:51:10 UTC


README

Plug-and-play unified AI API for Laravel 11. Swap providers (OpenAI, Anthropic, Ollama) with config and call one Facade: AI::.

Installation

composer require omarelnaghy/laravel-ai-copilot
php artisan vendor:publish --tag=ai-config

Set environment variables:

OPENAI_KEY=sk-...
AI_DRIVER=openai

Usage

use Omarelnaghy\LaravelAICopilot\Facades\AI;

$summary = AI::summarize($article->body);
$reply   = AI::chat('Explain Laravel in 3 sentences');
$seo     = AI::generate("Meta description for: {$product->name}");

Config

See config/ai.php for providers and defaults.

Testing

composer install
composer test

Roadmap

  • Anthropic and Ollama drivers
  • Embeddings + Vector search (pgvector, Pinecone, Qdrant)
  • Retries, circuit breaker, middleware
  • File summarization, image generation, OCR
  • Memory, dashboards

License: MIT