laravel-deepseek-r1 maintained by zakriat
Description
Laravel-first Deepseek R1 AI integration with Guzzle
Author
Last update
2025/01/27 15:00
(dev-main)
License
Downloads
11
Tags
Laravel Deepseek R1 Integration
Professional Laravel integration for Deepseek R1 API with Guzzle HTTP client.
Features
- Laravel Service Provider & Facade
- Configurable timeouts and retries
- Full exception handling
- Ready for horizontal scaling
- PSR-4 compliant structure
- Comprehensive test suite
Installation
composer require zakriat/laravel-deepseek-r1
# Publish config file
php artisan vendor:publish --provider="Zakriat\DeepseekR1\DeepseekServiceProvider"
Usage
use Zakriat\DeepseekR1\Facades\DeepseekR1;
// In your controller or service
$response = DeepseekR1::chatCompletion([
'model' => 'deepseek-r1',
'messages' => [
['role' => 'user', 'content' => 'Explain quantum computing in simple terms']
]
]);
// Access response content
echo $response['choices'][0]['message']['content'];
Configuration
Add to your .env:
DEEPSEEK_API_KEY=your_api_key_here
DEEPSEEK_BASE_URI=https://api.deepseek.com/v1/
DEEPSEEK_TIMEOUT=30 # seconds
DEEPSEEK_RETRIES=3 # retry attempts