Download the PHP package f4php/ollaminator without Composer

On this page you can find all versions of the php package f4php/ollaminator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ollaminator

Ollaminator

Ollaminator is an Ollama client for F4, a lightweight PHP/PostgreSQL-based web development framework.

It provides a small, typed wrapper around the Ollama HTTP API for chat, single-prompt generation, embeddings, and model listing — returning readonly response objects instead of raw arrays.

Requirements

Installation

Configuration

Ollaminator reads two F4-wide config constants for its defaults:

Both are used as fall-through defaults, so in most applications you configure them once and never pass a host or model again.

Model is resolved per call in this order:

  1. A model: argument passed to the individual call (chat/generate/embed).
  2. The model: argument passed to the Client constructor.
  3. F4\Config::OLLAMINATOR_MODEL.

Host comes from F4\Config::OLLAMINATOR_URL and is the default baseUrl of ApiClient. Construct an ApiClient with an explicit baseUrl: to override it for a given client.

You can still override the model per-client or per-call, and the host per-client, whenever you need to.

Quick start

By default the client talks to Ollama on Config::OLLAMINATOR_URL (e.g. http://localhost:11434). Make sure the model you want is pulled first (e.g. ollama pull llama3.2).

Chat

Generate (single prompt)

Embeddings

List local models

Connecting to a non-default host

To reach a host other than Config::OLLAMINATOR_URL, pass a configured ApiClient to the Client constructor. Use named arguments, since $model is the first constructor parameter:

JSON / structured output

Ask the model to return valid JSON, optionally constrained by a JSON schema:

Pass format: 'json' for unstructured JSON mode.

Error handling

All errors extend F4\Ollaminator\Exception\OllamaException:

Documentation

License

MIT © Dennis Kreminsky


All versions of ollaminator with dependencies

PHP Build Version
Package Version
Requires f4php/framework Version ^0.2
psr/http-message Version *
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package f4php/ollaminator contains the following files

Loading the files please wait ...