retrieve method

Future<RunResponse?> retrieve(
  1. dynamic threadID,
  2. dynamic runID
)

RETRIEVE A RUN BY ID

Implementation

Future<RunResponse?> retrieve(threadID, runID)async{
  Internet net = Internet();
  try{
    var res = await net.openAIAssitantGET("threads/$threadID/runs/$runID", 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;
  }
}