laoqianjunzi / deepseek
deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.
Requires
- php: >=7.1
- php-http/discovery: ^1.20.0
- php-http/multipart-stream-builder: ^1.4.2
- psr/http-client: ^1.0.3
- psr/http-client-implementation: ^1.0.1
- psr/http-factory-implementation: *
- psr/http-message: ^1.1.0|^2.0.0
This package is not auto-updated.
Last update: 2025-02-05 19:32:54 UTC
README
DeepSeek PHP Client
๐ Community-Driven PHP SDK for DeepSeek AI API Integration
Table of Contents
- โจ Features
- ๐ฆ Installation
- ๐ Quick Start
- ๐ Migration Guide
- ๐ Changelog
- ๐งช Testing
- ๐ Security
- ๐ค Contributors
- ๐ License
โจ Features
- Seamless API Integration: PHP-first interface for DeepSeek's AI capabilities
- Fluent Builder Pattern: Chainable methods for intuitive request building
- Enterprise Ready: PSR-18 compliant HTTP client integration
- Model Flexibility: Support for multiple DeepSeek models (Coder, Chat, etc.)
- Streaming Ready: Built-in support for real-time response handling
- Framework Friendly: Laravel & Symfony packages available
๐ฆ Installation
Require the package via Composer:
composer require laoqianjunzi/deepseek
Requirements:
- PHP 7.1+
๐ Quick Start
Basic Usage
Get started with just two lines of code:
use DeepSeek\DeepSeekClient;
$response = DeepSeekClient::build('your-api-key')
->query('Explain quantum computing in simple terms')
->run();
echo $response;
๐ Defaults used:
- Model:
deepseek-chat
- Temperature: 0.8
Advanced Configuration
use DeepSeek\DeepSeekClient;
use DeepSeek\Enums\Models;
$response = DeepSeekClient::build('your-api-key')
->withBaseUrl('https://api.deepseek.com/v2')
->withModel(Models::CODER)
->withTemperature(1.2)
->run();
echo 'API Response:'.$response;
๐ Framework Integration
Deepseek Package
๐ง Migration Guide
Upgrading from v1.x? Check our comprehensive Migration Guide for breaking changes and upgrade instructions.
๐ Changelog
Detailed release notes available in CHANGELOG.md
๐งช Testing
composer test
OR
./vendor/bin/pest
Test coverage coming in v2.1.
๐ Security
Report Vulnerabilities: to laoqianjunzi@qq.com
๐ค Contributors
A huge thank you to these amazing people who have contributed to this project! ๐๐
Want to contribute? Check out the contributing guidelines and submit a pull request! ๐
๐ License
This package is open-source software licensed under the MIT License.