I upgraded my package chat_gpt_sdk to 2.0.4 and the flutter sdk to the latest version but now i get this error The argument type ‘int’ can’t be assigned to the parameter type ‘Duration’. I need to be on this version to have access to the chatgpt turbo model. can anyone help me with this
return 'Count: $count';
}).take(10);
openAI = OpenAI.instance.build(
token: "$Apikey",
baseOption: HttpSetup(
receiveTimeout: 30000,
connectTimeout: 5000,
sendTimeout: 5000,
),
isLogger: true,
);
}
2
Answers
You need to provide
receiveTimeout
,connectTimeout
andsendTimeout
inDuration
Those timeout parameters take Duration objects