1. Go to this page and download the library: Download iankibet/sdp-ai 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/ */
use SdpAi\Facades\SDPAI;
// Send a message using the default provider
$response = SDPAI::ask('Hello, how are you?');
// Switch provider dynamically
$response = SDPAI::setProvider('claude')->ask('Tell me a joke.');
use SdpAi\SdpAiManager;
class MyController
{
public function handle(SdpAiManager $sdpAi)
{
$response = $sdpAi->setProvider('deepseek')->ask('Explain Quantum Physics.');
}
}