PHP code example of deepseek-php / deepseek-php-client
1. Go to this page and download the library: Download deepseek-php/deepseek-php-client 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/ */
deepseek-php / deepseek-php-client example snippets
use DeepSeek\DeepSeekClient;
$response = DeepSeekClient::build('your-api-key')
->query('Explain quantum computing in simple terms')
->run();
echo $response;
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;
bash
composer