Skip to content

papi-ai/ollama

Repository files navigation

PapiAI Ollama Provider

CI Latest Version Total Downloads PHP Version License

Ollama provider for PapiAI - A simple but powerful PHP library for building AI agents.

Installation

composer require papi-ai/ollama

Usage

use PapiAI\Core\Agent;
use PapiAI\Ollama\OllamaProvider;

$provider = new OllamaProvider();

$agent = new Agent(
    provider: $provider,
    instructions: 'You are a helpful assistant.',
);

$response = $agent->run('Hello!');
echo $response->text;

Available Models

The following models are supported (as referenced in OllamaProvider):

Model Type
llama3.1 (default) General purpose
codellama Code generation
mistral General purpose
mixtral Mixture of experts
qwen2.5-coder Code generation
nomic-embed-text Embeddings (default)

Features

  • Tool/function calling
  • Streaming support
  • Embeddings support
  • Vision support
  • Structured output / JSON mode
  • Runs locally via Ollama (no API key required)

License

MIT

About

Ollama (local) provider for PapiAI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors