|
|
@@ -256,8 +256,8 @@ class AIImageGenerationService
|
|
|
|
|
|
// 创建专用客户端,优化配置
|
|
|
$gptClient = new Client([
|
|
|
- 'timeout' => 1800, // 2分钟超时
|
|
|
- 'connect_timeout' => 10, // 连接超时10秒
|
|
|
+ 'timeout' => 600, // 10分钟超时
|
|
|
+ 'connect_timeout' => 30, // 连接超时10秒
|
|
|
'http_errors' => false, // 不自动抛出HTTP错误
|
|
|
'verify' => false, // 禁用SSL验证(如果有证书问题)
|
|
|
'allow_redirects' => true,
|
|
|
@@ -315,7 +315,7 @@ class AIImageGenerationService
|
|
|
'Accept: application/json',
|
|
|
'Expect:', // 移除 Expect: 100-continue,避免等待
|
|
|
],
|
|
|
- CURLOPT_TIMEOUT => 1800, // 不设超时,等待完成
|
|
|
+ CURLOPT_TIMEOUT => 600,
|
|
|
CURLOPT_CONNECTTIMEOUT => 30,
|
|
|
CURLOPT_SSL_VERIFYPEER => false,
|
|
|
CURLOPT_SSL_VERIFYHOST => false,
|