Skip to content

⚡️ A robust and developer-friendly, and community-driven PHP Client that provides a clean, extensible interface for integrating with the DeepSeek AI API.

License

Notifications You must be signed in to change notification settings

deepseek-php/deepseek-php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gpdf

Deepseek PHP Client

Table of Contents


Overview

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

Key Features

  • Easy Integration: Simplifies interaction with the Deepseek API using a PHP client.
  • Method Chaining: Supports fluent method chaining for building requests.
  • Customizable: Allows setting different models, query roles, and streaming options.
  • PSR-18 Compliance: Utilizes PSR-18 HTTP client for making API requests.

Installation

You can install the package via Composer:

composer require deepseek-php/deepseek-php-client

Ensure your project meets the following requirements:

  • PHP 8.1 or later

3. Quick Start Guide

Basic Usage

use DeepseekPhp\DeepseekClient;

$apiKey = 'your-api-key';

$response = DeepseekClient::build($apiKey)
    ->query('Hello Deepseek, how are you today?')
    ->run();

echo 'API Response:'.$response;

Note: in easy mode it will take defaults for all configs Check Default Values

Advanced Usage

use DeepseekPhp\DeepseekClient;
use DeepseekPhp\Enums\Queries\QueryRoles;
use DeepseekPhp\Enums\Models;

$apiKey = 'your-api-key';

$response = DeepseekClient::build($apiKey, 'https://api.deepseek.com/v2', 500)
    ->query('System setup query', 'system')
    ->query('User input message', 'user')
    ->withModel(Models::CODER->value)
    ->run();

echo 'API Response:'.$response;

7. Testing

tests will come soon .

Changelog

See CHANGELOG for recent changes.

Contributors ✨

Thanks to these wonderful people for contributing to this project! 💖

Omar Al Alwi
Omar AlAlwi

🏆 Creator

Want to contribute? Check out the contributing guidelines and submit a pull request! 🚀

Security

If you discover any security-related issues, please email creator : omaralwi2010@gmail.com.

License

The MIT License (MIT). See LICENSE for more information.