papi-ai / deepseek
DeepSeek provider for PapiAI
v0.15.2
2026-07-31 18:03 UTC
Requires
- php: ^8.2
- ext-curl: *
- papi-ai/papi-core: ^0.15
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^3.0
- vimeo/psalm: ^6.0
README
DeepSeek provider for PapiAI - A simple but powerful PHP library for building AI agents.
Installation
composer require papi-ai/deepseek
Usage
use PapiAI\Core\Agent; use PapiAI\DeepSeek\DeepSeekProvider; $provider = new DeepSeekProvider( apiKey: $_ENV['DEEPSEEK_API_KEY'], ); $agent = new Agent( provider: $provider, instructions: 'You are a helpful assistant.', ); $response = $agent->run('Hello!'); echo $response->text;
Available Models
DeepSeekProvider::MODEL_DEEPSEEK_V4_FLASH // 'deepseek-v4-flash' (default) DeepSeekProvider::MODEL_DEEPSEEK_V4_PRO // 'deepseek-v4-pro'
The MODEL_DEEPSEEK_CHAT and MODEL_DEEPSEEK_REASONER constants are still shipped but deprecated: both were discontinued on 24 July 2026 and requests using them fail. The V4 family replaces the old chat and reasoner split, with the neutral effort option controlling how hard the model thinks.
Features
- Tool/function calling
- Structured output (JSON mode)
- Streaming support
License
MIT