PHPackages                             vluzrmos/ollama - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vluzrmos/ollama

ActiveLibrary[API Development](/categories/api)

vluzrmos/ollama
===============

Cliente PHP para a API do Ollama/OpenAI

v1.0.4(1mo ago)019[1 issues](https://github.com/vluzrmos/ollama-php/issues)MITPHPPHP &gt;=5.6.0

Since Dec 26Pushed 1mo agoCompare

[ Source](https://github.com/vluzrmos/ollama-php)[ Packagist](https://packagist.org/packages/vluzrmos/ollama)[ RSS](/packages/vluzrmos-ollama/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (9)Used By (0)

Ollama PHP Client
=================

[](#ollama-php-client)

PHP client for the Ollama native API and OpenAI-compatible endpoints, with support for PHP 5.6+.

This library provides:

- Native Ollama API access
- OpenAI-compatible API access
- Reusable model configuration objects
- Typed message helpers for chat, tools, and multimodal inputs
- Streaming and async requests
- Tool calling and tool execution helpers
- High-level chat orchestration with automatic tool recursion
- Agent and agent-group abstractions
- Image helpers for vision models
- Embeddings, model management, and runtime utilities

Features
--------

[](#features)

- Compatible with PHP 5.6+
- Native Ollama client
- OpenAI-compatible client
- Sync and async APIs
- Streaming responses
- Chat completions and text completions
- Embeddings
- Vision and image message helpers
- Function calling and tool execution
- Built-in tool registry and result conversion
- High-level chat session wrapper
- Agent and agent group abstractions
- Model lifecycle operations for Ollama
- Response wrappers with array-style access
- Configurable HTTP client options and Bearer token support

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6.0
- ext-curl
- ext-json

Installation
------------

[](#installation)

```
composer require vluzrmos/ollama
```

Quick Start
-----------

[](#quick-start)

### Ollama Native API

[](#ollama-native-api)

```
