cancel method
CANCEL A RUN
Implementation
Future<RunResponse?> cancel(threadID, runID)async{
Internet net = Internet();
try{
var res = await net.openAIAssitant({}, "threads/$threadID/runs/$runID/cancel", apiKey);
if(res.statusCode == 200){
var r = RunResponse.fromJson(jsonDecode(res.body));
return r;
}else{
return null;
}
}catch(e){
if (kDebugMode) {
print(e.toString());
}
return null;
}
}