Skip to content

Commit f9dd3b3

Browse files
Update Chat.php
增加参数timeout,不传入参数的情况下默认600s
1 parent 1f3c133 commit f9dd3b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function completions(array $data, array $options)
7070
} else if ($path[strlen($path) - 1] === '/') {
7171
$url = $this->api . 'chat/completions';
7272
}
73-
$http = new Client(['timeout' => 600]);
73+
$http = new Client(['timeout' => $options['timeout'] ?? 600]);
7474
$http->request($url, $requestOptions);
7575
}
7676

0 commit comments

Comments
 (0)