Skip to content

papi-ai/mistral

Repository files navigation

PapiAI Mistral Provider

CI Latest Version Total Downloads PHP Version License

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

Installation

composer require papi-ai/mistral

Usage

use PapiAI\Core\Agent;
use PapiAI\Mistral\MistralProvider;

$provider = new MistralProvider(
    apiKey: $_ENV['MISTRAL_API_KEY'],
);

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

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

Available Models

MistralProvider::MODEL_MISTRAL_LARGE  // 'mistral-large-latest' (default)
MistralProvider::MODEL_MISTRAL_EMBED  // 'mistral-embed' (embeddings)

Features

  • Tool/function calling
  • Streaming support
  • Embeddings support

License

MIT

About

Mistral provider for PapiAI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors