modify method
MODIFY THREADS
Implementation
Future<ThreadModificationResponseModel?> modify(ThreadModifyDataModel threadsData)async{
Internet net = Internet();
try{
var data = {
"metadata" : threadsData.metadata
};
var res = await net.openAIAssitant(data, "threads/${threadsData.threadId}", apiKey);
if(res.statusCode == 200){
var r = ThreadModificationResponseModel.fromJson(jsonDecode(res.body));
return r;
}else{
return null;
}
}catch(e){
if (kDebugMode) {
print(e.toString());
}
return null;
}
}