[ Remove ] reverted back the impl for stream timeout appliance
This commit is contained in:
@ -161,7 +161,7 @@ abstract class OpenAINetworkingClient {
|
||||
|
||||
clientForUse
|
||||
.send(request)
|
||||
.timeout(OpenAIConfig.requestsTimeOut)
|
||||
// .timeout(OpenAIConfig.requestsTimeOut)
|
||||
.then((streamedResponse) {
|
||||
streamedResponse.stream.listen(
|
||||
(value) {
|
||||
@ -366,7 +366,15 @@ abstract class OpenAINetworkingClient {
|
||||
|
||||
OpenAILogger.logStartRequest(to);
|
||||
|
||||
clientForUse.send(request).timeout(OpenAIConfig.requestsTimeOut).then(
|
||||
clientForUse
|
||||
.send(request)
|
||||
// .timeout(
|
||||
// OpenAIConfig.requestsTimeOut,
|
||||
// onTimeout: () {
|
||||
// throw TimeoutException("Request timed out");
|
||||
// },
|
||||
// )
|
||||
.then(
|
||||
(respond) {
|
||||
OpenAILogger.startReadStreamResponse();
|
||||
|
||||
|
@ -185,7 +185,7 @@ interface class OpenAIChat implements OpenAIChatBase {
|
||||
"messages": messages.map((message) => message.toMap()).toList(),
|
||||
if (tools != null)
|
||||
"tools": tools.map((tool) => tool.toMap()).toList(growable: false),
|
||||
if (toolChoice != null) "tool_choice": toolChoice.value,
|
||||
if (toolChoice != null) "tool_choice": toolChoice,
|
||||
if (temperature != null) "temperature": temperature,
|
||||
if (topP != null) "top_p": topP,
|
||||
if (n != null) "n": n,
|
||||
|
Reference in New Issue
Block a user