Add _convert_model method
@@ -182,6 +182,12 @@ class WatsonService(object):
return dictionary[label_id]
return dictionary
+ @staticmethod
+ def _convert_model(val):
+ if hasattr(val, "_to_dict"):
+ return val._to_dict()
+ return val
+
@staticmethod
def _get_error_message(response):
"""
