|
@@ -23,7 +23,7 @@ class DeepSeekService
|
|
|
public function __construct() {
|
|
|
$this->url = 'https://api.deepseek.com/chat/completions';
|
|
|
$this->api_key = env('DEEPSEEK_API_KEY');
|
|
|
- $this->client = new Client();
|
|
|
+ $this->client = new Client(['timeout' => 1200, 'verify' => false]);
|
|
|
|
|
|
$this->headers = [
|
|
|
'Authorization' => 'Bearer '.$this->api_key,
|
|
@@ -33,8 +33,6 @@ class DeepSeekService
|
|
|
|
|
|
// 与推理模型对话
|
|
|
public function chatWithReasoner($data) {
|
|
|
- set_time_limit(0);
|
|
|
- ini_set('max_execution_time', 0);
|
|
|
$content = getProp($data, 'content');
|
|
|
$model = getProp($data, 'model', 'r1');
|
|
|
$model = $model == 'r1' ? 'deepseek-reasoner' : 'deepseek-chat';
|