|
@@ -1183,6 +1183,9 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
* @return \Generator 返回生成器,用于流式输出
|
|
* @return \Generator 返回生成器,用于流式输出
|
|
|
*/
|
|
*/
|
|
|
private function deepSeekStreamResponse($post_data) {
|
|
private function deepSeekStreamResponse($post_data) {
|
|
|
|
|
+ // 设置最大输出tokens
|
|
|
|
|
+ $post_data['max_tokens'] = 300000;
|
|
|
|
|
+
|
|
|
$client = new Client(['timeout' => 1200, 'verify' => false]);
|
|
$client = new Client(['timeout' => 1200, 'verify' => false]);
|
|
|
$response = $client->post($this->url, [
|
|
$response = $client->post($this->url, [
|
|
|
'json' => $post_data,
|
|
'json' => $post_data,
|
|
@@ -1312,8 +1315,9 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
if (isset($post_data['reasoning_effort'])) {
|
|
if (isset($post_data['reasoning_effort'])) {
|
|
|
unset($post_data['reasoning_effort']);
|
|
unset($post_data['reasoning_effort']);
|
|
|
}
|
|
}
|
|
|
|
|
+ $post_data['max_completion_tokens'] = 100000;
|
|
|
|
|
|
|
|
- $response = $client->post('https://token.ithinkai.cn/v1/chat/completions', [
|
|
|
|
|
|
|
+ $response = $client->post('https://api.nonelinear.com/v1/chat/completions', [
|
|
|
'json' => $post_data,
|
|
'json' => $post_data,
|
|
|
'headers' => $headers
|
|
'headers' => $headers
|
|
|
]);
|
|
]);
|
|
@@ -9892,6 +9896,7 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
|
|
|
|
|
// 仅调用deepseek对话接口
|
|
// 仅调用deepseek对话接口
|
|
|
private function chatOnly($post_data) {
|
|
private function chatOnly($post_data) {
|
|
|
|
|
+ $post_data['max_tokens'] = 300000;
|
|
|
$client = new Client(['timeout' => 1200, 'verify' => false]);
|
|
$client = new Client(['timeout' => 1200, 'verify' => false]);
|
|
|
$result = $client->post($this->url, ['json' => $post_data, 'headers' => $this->headers]);
|
|
$result = $client->post($this->url, ['json' => $post_data, 'headers' => $this->headers]);
|
|
|
$response = $result->getBody()->getContents();
|
|
$response = $result->getBody()->getContents();
|
|
@@ -9933,11 +9938,12 @@ Q版卡通风格,头大身小,造型圆润可爱,线条简单,色彩明
|
|
|
if (isset($post_data['reasoning_effort'])) {
|
|
if (isset($post_data['reasoning_effort'])) {
|
|
|
unset($post_data['reasoning_effort']);
|
|
unset($post_data['reasoning_effort']);
|
|
|
}
|
|
}
|
|
|
|
|
+ $post_data['max_completion_tokens'] = 100000;
|
|
|
|
|
|
|
|
// 确保 stream 为 false
|
|
// 确保 stream 为 false
|
|
|
$post_data['stream'] = false;
|
|
$post_data['stream'] = false;
|
|
|
|
|
|
|
|
- $result = $client->post('https://token.ithinkai.cn/v1/chat/completions', [
|
|
|
|
|
|
|
+ $result = $client->post('https://api.nonelinear.com/v1/chat/completions', [
|
|
|
'json' => $post_data,
|
|
'json' => $post_data,
|
|
|
'headers' => $headers
|
|
'headers' => $headers
|
|
|
]);
|
|
]);
|