delete method

Future<ThreadDeleteResponseModel?> delete(
  1. String threadId
)

DELETE THREADS

Implementation

Future<ThreadDeleteResponseModel?> delete(String threadId)async{
  Internet net = Internet();
  try{

    var res = await net.openAIAssitantDELETE("threads/$threadId", apiKey);

    if(res.statusCode == 200){
      var r = ThreadDeleteResponseModel.fromJson(jsonDecode(res.body));
      return r;
    }else{
      return null;
    }
  }catch(e){
    if (kDebugMode) {
      print(e.toString());
    }
    return null;
  }
}