diff --git a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/computer_vision_client.py b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/computer_vision_client.py index f163cb2d4020..fd2f9fce7750 100644 --- a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/computer_vision_client.py +++ b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/computer_vision_client.py @@ -384,7 +384,7 @@ def recognize_printed_text( recognize_printed_text.metadata = {'url': '/ocr'} def describe_image( - self, url, max_candidates="1", language="en", custom_headers=None, raw=False, **operation_config): + self, url, max_candidates=1, language="en", custom_headers=None, raw=False, **operation_config): """This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. @@ -399,7 +399,7 @@ def describe_image( :type url: str :param max_candidates: Maximum number of candidate descriptions to be returned. The default is 1. - :type max_candidates: str + :type max_candidates: int :param language: The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - @@ -430,7 +430,7 @@ def describe_image( # Construct parameters query_parameters = {} if max_candidates is not None: - query_parameters['maxCandidates'] = self._serialize.query("max_candidates", max_candidates, 'str') + query_parameters['maxCandidates'] = self._serialize.query("max_candidates", max_candidates, 'int') if language is not None: query_parameters['language'] = self._serialize.query("language", language, 'str') @@ -756,8 +756,9 @@ def analyze_image_in_stream( :param details: A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include:Celebrities - identifies celebrities if detected - in the image. Possible values include: 'Celebrities', 'Landmarks' - :type details: str + in the image. + :type details: list[str or + ~azure.cognitiveservices.vision.computervision.models.Details] :param language: The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - @@ -793,7 +794,7 @@ def analyze_image_in_stream( if visual_features is not None: query_parameters['visualFeatures'] = self._serialize.query("visual_features", visual_features, '[VisualFeatureTypes]', div=',') if details is not None: - query_parameters['details'] = self._serialize.query("details", details, 'str') + query_parameters['details'] = self._serialize.query("details", details, '[Details]', div=',') if language is not None: query_parameters['language'] = self._serialize.query("language", language, 'str') @@ -989,7 +990,7 @@ def recognize_printed_text_in_stream( recognize_printed_text_in_stream.metadata = {'url': '/ocr'} def describe_image_in_stream( - self, image, max_candidates="1", language="en", custom_headers=None, raw=False, callback=None, **operation_config): + self, image, max_candidates=1, language="en", custom_headers=None, raw=False, callback=None, **operation_config): """This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. @@ -1004,7 +1005,7 @@ def describe_image_in_stream( :type image: Generator :param max_candidates: Maximum number of candidate descriptions to be returned. The default is 1. - :type max_candidates: str + :type max_candidates: int :param language: The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - @@ -1038,7 +1039,7 @@ def describe_image_in_stream( # Construct parameters query_parameters = {} if max_candidates is not None: - query_parameters['maxCandidates'] = self._serialize.query("max_candidates", max_candidates, 'str') + query_parameters['maxCandidates'] = self._serialize.query("max_candidates", max_candidates, 'int') if language is not None: query_parameters['language'] = self._serialize.query("language", language, 'str') diff --git a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type.py b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type.py index 2c475662850c..0ddb88e7ba12 100644 --- a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type.py +++ b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type.py @@ -16,15 +16,15 @@ class ImageType(Model): """An object providing possible image types and matching confidence levels. :param clip_art_type: Confidence level that the image is a clip art. - :type clip_art_type: float + :type clip_art_type: int :param line_drawing_type: Confidence level that the image is a line drawing. - :type line_drawing_type: float + :type line_drawing_type: int """ _attribute_map = { - 'clip_art_type': {'key': 'clipArtType', 'type': 'float'}, - 'line_drawing_type': {'key': 'lineDrawingType', 'type': 'float'}, + 'clip_art_type': {'key': 'clipArtType', 'type': 'int'}, + 'line_drawing_type': {'key': 'lineDrawingType', 'type': 'int'}, } def __init__(self, **kwargs): diff --git a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type_py3.py b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type_py3.py index ecfd8b6af808..ef7b200ea0af 100644 --- a/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type_py3.py +++ b/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_type_py3.py @@ -16,18 +16,18 @@ class ImageType(Model): """An object providing possible image types and matching confidence levels. :param clip_art_type: Confidence level that the image is a clip art. - :type clip_art_type: float + :type clip_art_type: int :param line_drawing_type: Confidence level that the image is a line drawing. - :type line_drawing_type: float + :type line_drawing_type: int """ _attribute_map = { - 'clip_art_type': {'key': 'clipArtType', 'type': 'float'}, - 'line_drawing_type': {'key': 'lineDrawingType', 'type': 'float'}, + 'clip_art_type': {'key': 'clipArtType', 'type': 'int'}, + 'line_drawing_type': {'key': 'lineDrawingType', 'type': 'int'}, } - def __init__(self, *, clip_art_type: float=None, line_drawing_type: float=None, **kwargs) -> None: + def __init__(self, *, clip_art_type: int=None, line_drawing_type: int=None, **kwargs) -> None: super(ImageType, self).__init__(**kwargs) self.clip_art_type = clip_art_type self.line_drawing_type = line_drawing_type