delete method

Future<DeleteAssistantResponse?> delete(
  1. dynamic assistantID
)

RETRIEVE ASSISTANT

Implementation

Future<DeleteAssistantResponse?> delete(assistantID)async{
  Internet net = Internet();
  try{
    var res = await net.openAIAssitantGET("assistants/$assistantID", apiKey);

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