Download the PHP package katema/laravel-genai without Composer
On this page you can find all versions of the php package katema/laravel-genai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-genai
Laravel GenAI
Drop-in Generative AI for Laravel applications - opinionated, extensible, and production-ready.
Features
- 🎯 Simple API - Clean, Laravel-native syntax
- 🔌 Provider Agnostic - OpenAI, Claude, Gemini, Ollama, or custom
- 📝 Prompt Management - Version control your prompts
- 💾 Context Management - Maintain conversation context
- 🎨 Model Integration - Add AI to Eloquent models with traits
- 📊 Cost Tracking - Monitor tokens and costs
- 🔒 Production Ready - Rate limiting, validation, error handling
- 🚀 Queue Support - Async AI operations
Installation
Set your API key in .env:
Quick Start
Basic Text Generation
Chat Conversations
Structured JSON Output
With Context
Prompt Management
Create reusable prompts in resources/prompts/:
prompts/marketing/product_description.md:
Use it in your code:
Model Integration
Add AI capabilities to your Eloquent models:
Then use it:
Multiple Providers
Switch between providers easily:
Configure providers in config/genai.php:
Advanced Usage
System Prompts
Custom Options
Fresh Context
Cost Tracking
All responses include cost and token information:
Configuration
Publish the config file:
Key configuration options:
Artisan Commands
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
Security
If you discover any security issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
Credits
- Aaron Katema
- All Contributors
Built with ❤️ for the Laravel community
All versions of laravel-genai with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/contracts Version ^9.0|^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0