fromJson method

Implementation

@override
fromJson(Object json) {
  if (json is Map<String,dynamic>) {
    if(json['type'] == "logs") {
      return GptCodeInterpreterLogOutput.fromJson(json);
    }
    else if ('type' == "image") {
      return GptCodeInterpreterImageOutput.fromJson(json);
    }
  }

  throw UnimplementedError();
}