We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f63803d commit 4539d6bCopy full SHA for 4539d6b
lib/src/core/networking/client.dart
@@ -159,7 +159,10 @@ abstract class OpenAINetworkingClient {
159
]);
160
}
161
162
- clientForUse.send(request).then((streamedResponse) {
+ clientForUse
163
+ .send(request)
164
+ .timeout(OpenAIConfig.requestsTimeOut)
165
+ .then((streamedResponse) {
166
streamedResponse.stream.listen(
167
(value) {
168
final data = utf8.decode(value);
@@ -362,7 +365,8 @@ abstract class OpenAINetworkingClient {
362
365
363
366
364
367
OpenAILogger.logStartRequest(to);
- clientForUse.send(request).then(
368
+
369
+ clientForUse.send(request).timeout(OpenAIConfig.requestsTimeOut).then(
370
(respond) {
371
OpenAILogger.startReadStreamResponse();
372
0 commit comments