list method

RETRIEVE ASSISTANT LIST

Implementation

Future<AssistantList?> list()async{
  Internet net = Internet();
  try{
    var res = await net.openAIAssitantGET("assistants?order=desc&limit=40", apiKey);
    if(res.statusCode == 200){
      var r = AssistantList.fromJson(jsonDecode(res.body));
      return r;
    }else{
      return null;
    }
  }catch(e){
    if (kDebugMode) {
      print(e.toString());
    }
    return null;
  }
}