fromJson method
Implementation
@override
AGptRunToolCall fromJson(Object json) {
if (json is Map<String,dynamic>) {
if(json['type'] == "code_interpreter") {
return GptRunCodeInterpreterToolCall.fromJson(json);
}
else if ('type' == "retrieval") {
return GptRunRetrievalToolCall.fromJson(json);
}
else if ('type' == "function") {
return GptRunFunctionToolCall.fromJson(json);
}
}
throw UnimplementedError();
}