Skip to content

Commit 8c5be65

Browse files
authored
Merge pull request #7 from lengqiuqiuqiu/patch-1
Update Chat.增加参数timeout
2 parents 1f3c133 + f9dd3b3 commit 8c5be65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)