webboy / deepseek
PHP client for Deepseek AI API
1.0.3
2025-01-27 10:25 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ^7
- illuminate/collections: ^11
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.68
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
README
A PHP client for interacting with the Deepseek AI API, providing easy-to-use methods to communicate with Deepseek's services.
Installation
Install the package via Composer:
composer require webboy/deepseek
Requirements
PHP ^8.1
ext-json extension
ext-curl extension
Features
-
Easy integration with Deepseek AI API
-
Utilizes Guzzle for HTTP requests
-
Simple and fluent API for request handling
-
Laravel-friendly using illuminate/collections
Usage
Initialize the client
use Webboy\Deepseek\Deepseek; $deepseek = new Deepseek('your-api-key');
Get all models
$response = $client ->listModels() ->call();
Get user balance
$response = $client ->getBalance() ->call();
Start a chat session
$response = $client ->createChatCompletion() ->setResponseFormat('text') ->setSystemMessage('You are a professional LinkedIn influencer.', 'Agent Smith') ->setUserMessage('Write down a short announcement for the initial version for the Deepseek API Client composer package.') ->call();