Laravel package for Ollama API integration
Top 71.3% on sourcepulse
This package provides a Laravel integration for the Ollama API, enabling developers to easily incorporate large language model capabilities into their web applications. It offers functionalities for model management, prompt engineering, and structured output, simplifying the process of leveraging LLMs within the Laravel ecosystem.
How It Works
The package acts as a fluent wrapper around the Ollama REST API, abstracting away direct HTTP requests. It utilizes Laravel's Facade pattern for convenient access and provides a chainable API for constructing prompts, specifying models, setting generation options (like temperature), and handling both standard responses and streaming outputs. Vision and tool-calling capabilities are also supported through dedicated methods.
Quick Start & Requirements
composer require cloudstudio/ollama-laravel
php artisan vendor:publish --tag="ollama-laravel-config"
).Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The package relies on an external Ollama service; therefore, its functionality is dependent on the availability and configuration of a local or remote Ollama instance. Specific version compatibility notes are provided for older Laravel versions.
1 week ago
1 week