retrieve method

Future<AssistantModel?> retrieve(
  1. dynamic assistantID
)

RETRIEVE ASSISTANT

Implementation

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

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