PHP code example of webboy / deepseek

1. Go to this page and download the library: Download webboy/deepseek library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webboy / deepseek example snippets


use Webboy\Deepseek\Deepseek;

$deepseek = new Deepseek('your-api-key');

$response = $client
    ->listModels()
    ->call();

$response = $client
    ->getBalance()
    ->call();

$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();