retrieve method
RETRIEVE A MESSAGE BY ID
Implementation
Future<ThreadMessageModel?> retrieve(threadID, messageID)async{
Internet net = Internet();
try{
var res = await net.openAIAssitantGET("threads/$threadID/messages/$messageID", apiKey);
if(res.statusCode == 200){
var r = ThreadMessageModel.fromJson(jsonDecode(res.body));
return r;
}else{
return null;
}
}catch(e){
if (kDebugMode) {
print(e.toString());
}
return null;
}
}