pandarose / ollama-stream
Stream a real-time response from a local Ollama model
dev-main
2025-05-28 18:33 UTC
Requires
- amphp/amp: ^3.1
- amphp/http-client: ^5.3
- revolt/event-loop: ^1.0
This package is not auto-updated.
Last update: 2026-04-16 21:07:05 UTC
README
A PHP client for the Ollama API, allowing for streaming responses from the API.
Features
- Supports streaming and non-streaming responses
- Calls a callback function for each word received from the API
Example Usage
See the example.php file for a basic usage example.
Requirements
- PHP 8.1+
- Amp HTTP Client library (
amp/http-client)