ollama/php

A lightweight PHP client for the Ollama API.

Maintainers

Package info

github.com/chipslays/ollama-php

pkg:composer/ollama/php

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.5 2026-07-01 06:39 UTC

This package is auto-updated.

Last update: 2026-07-01 07:04:01 UTC


README

A lightweight PHP client for the Ollama API.

🦙 + 🐘 = ❤️

Installation

composer require ollama/php --prefer-dist

Quick Start

use Ollama\Ollama;

$ollama = new Ollama;

$response = $ollama->chat()->send([
    'model' => 'gemma4:12b',
    'messages' => [
        ['role' => 'user', 'content' => 'Hello world!'],
    ],
]);

echo $response->message->content;

Examples 👀

There are many, many examples for each endpoint in the examples folder, come and explore!

License

MIT