PHP code example of zakriat / laravel-deepseek-r1
1. Go to this page and download the library: Download zakriat/laravel-deepseek-r1 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/ */
zakriat / laravel-deepseek-r1 example snippets
use Zakriat\DeepseekR1\Facades\DeepseekR1;
// In your controller or service
$response = DeepseekR1::chatCompletion([
'model' => 'deepseek-r1',
'messages' => [
['role' => 'user', 'content' => 'Explain quantum computing in simple terms']
]
]);
// Access response content
echo $response['choices'][0]['message']['content'];