create method
CREATE ASSISTANT
Implementation
Future<AssistantModel?> create(NewAssistantModel assistantDetails)async{
Internet net = Internet();
try{
var res = await net.openAIAssitant(assistantDetails.toJson(), "assistants", 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;
}
}