Skip to content

Repository files navigation

PapiAI Groq Provider

CI Latest Version Total Downloads PHP Version License

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

Installation

composer require papi-ai/groq

Usage

use PapiAI\Core\Agent;
use PapiAI\Groq\GroqProvider;

$provider = new GroqProvider(
    apiKey: $_ENV['GROQ_API_KEY'],
);

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

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

Available Models

GroqProvider::MODEL_GPT_OSS_120B  // 'openai/gpt-oss-120b' (default)
GroqProvider::MODEL_GPT_OSS_20B   // 'openai/gpt-oss-20b' (fast)

The Llama and Mixtral constants are still shipped but deprecated. Mixtral was decommissioned on 20 March 2025, and both Llama models are decommissioned on 16 August 2026.

Features

  • Ultra-fast inference via Groq LPU
  • Tool/function calling
  • Streaming support

License

MIT

About

Groq provider for PapiAI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages