dashscope 1.22.0__py3-none-any.whl → 1.22.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dashscope might be problematic. Click here for more details.

@@ -121,8 +121,10 @@ class MultiModalConversation(BaseApi):
121
121
  for message in messages:
122
122
  content = message['content']
123
123
  for elem in content:
124
- is_upload = preprocess_message_element(model, elem, api_key)
125
- if is_upload and not has_upload:
126
- has_upload = True
127
-
124
+ if not isinstance(elem,
125
+ (int, float, bool, str, bytes, bytearray)):
126
+ is_upload = preprocess_message_element(
127
+ model, elem, api_key)
128
+ if is_upload and not has_upload:
129
+ has_upload = True
128
130
  return has_upload
@@ -480,16 +480,25 @@ class VideoSynthesisOutput(DictMixin):
480
480
  class ImageSynthesisUsage(DictMixin):
481
481
  image_count: int
482
482
 
483
- def __init__(self, image_count: int, **kwargs):
483
+ def __init__(self, image_count: int = None, **kwargs):
484
484
  super().__init__(image_count=image_count, **kwargs)
485
485
 
486
486
 
487
487
  @dataclass(init=False)
488
488
  class VideoSynthesisUsage(DictMixin):
489
489
  video_count: int
490
+ video_duration: int
491
+ video_ratio: str
490
492
 
491
- def __init__(self, video_count: int = 1, **kwargs):
492
- super().__init__(video_count=video_count, **kwargs)
493
+ def __init__(self,
494
+ video_count: int = 1,
495
+ video_duration: int = 0,
496
+ video_ratio: str = '',
497
+ **kwargs):
498
+ super().__init__(video_count=video_count,
499
+ video_duration=video_duration,
500
+ video_ratio=video_ratio,
501
+ **kwargs)
493
502
 
494
503
 
495
504
  @dataclass(init=False)
@@ -104,7 +104,8 @@ class MultiModalEmbedding(BaseApi):
104
104
  """
105
105
  has_upload = False
106
106
  for elem in input:
107
- is_upload = preprocess_message_element(model, elem, api_key)
108
- if is_upload and not has_upload:
109
- has_upload = True
107
+ if not isinstance(elem, (int, float, bool, str, bytes, bytearray)):
108
+ is_upload = preprocess_message_element(model, elem, api_key)
109
+ if is_upload and not has_upload:
110
+ has_upload = True
110
111
  return has_upload
dashscope/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.22.0'
1
+ __version__ = '1.22.2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dashscope
3
- Version: 1.22.0
3
+ Version: 1.22.2
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -76,7 +76,7 @@ else:
76
76
 
77
77
  ## API Key Authentication
78
78
 
79
- The SDK uses API key for authentication. Please refer to [official documentation](https://dashscope.aliyun.com) regarding how to obtain your api-key.
79
+ The SDK uses API key for authentication. Please refer to [official documentation for alibabacloud china](https://www.alibabacloud.com/help/en/model-studio/) and [official documentation for alibabacloud international](https://www.alibabacloud.com/help/en/model-studio/) regarding how to obtain your api-key.
80
80
 
81
81
  ### Using the API Key
82
82
 
@@ -6,20 +6,20 @@ dashscope/files.py,sha256=QgJjwhtn9F548nCA8jD8OvE6aQEj-20hZqJgYXsUdQU,3930
6
6
  dashscope/finetune.py,sha256=_tflDUvu0KagSoCzLaf0hofpG_P8NU6PylL8CPjVhrA,6243
7
7
  dashscope/model.py,sha256=UPOn1qMYFhX-ovXi3BMxZEBk8qOK7WLJOYHMbPZwYBo,1440
8
8
  dashscope/models.py,sha256=1-bc-Ue68zurgu_y6RhfFr9uzeQMF5AZq-C32lJGMGU,1224
9
- dashscope/version.py,sha256=SDK5izPcJa4KNexMqsTGqKMhzuz-w_ifY4M7gq-3Eno,23
9
+ dashscope/version.py,sha256=VzBJug2jhAHnqtcPEyOBjewkNpFsBuxDvTGCG_kKqzk,23
10
10
  dashscope/aigc/__init__.py,sha256=xmdalVw7wS0cLIuU8Q0qk0q8XGw-iGk8NnQwAQZ3jAc,391
11
11
  dashscope/aigc/code_generation.py,sha256=KAJVrGp6tiNFBBg64Ovs9RfcP5SrIhrbW3wdA89NKso,10885
12
12
  dashscope/aigc/conversation.py,sha256=xRoJlCR-IXHjSdkDrK74a9ut1FJg0FZhTNXZAJC18MA,14231
13
13
  dashscope/aigc/generation.py,sha256=53oMCmN5ZbqeqAsKxmdunXlRh-XP8ZtnA7hB2id4Koo,17897
14
14
  dashscope/aigc/image_synthesis.py,sha256=UWHW-nvf7_aDZKr4uZDusVHjqWr9TSZjCsZI8YSWaek,11052
15
- dashscope/aigc/multimodal_conversation.py,sha256=SlNnnsUPV19gdx8fYJAtsMFWPNGY6vhk5IGHZ5ZczpI,5369
15
+ dashscope/aigc/multimodal_conversation.py,sha256=NPg4gjG24zKdu7lQ4wH2v2m9n_rfZERTLf5tjy5fQyg,5523
16
16
  dashscope/aigc/video_synthesis.py,sha256=gbp5XG_DMVN0JnBOgxftdwsCIyrV7nM2gVnlyO8X-ek,10400
17
17
  dashscope/api_entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  dashscope/api_entities/aiohttp_request.py,sha256=ZFbdpJh7SwHnBzbYLhqr_FdcDVRgLVMLhLUS_vXbUGs,10228
19
19
  dashscope/api_entities/api_request_data.py,sha256=QHGgIShcQ1jANO1szfsqUGtYix1nD2RN4LyC_fNciCM,5462
20
20
  dashscope/api_entities/api_request_factory.py,sha256=iLjOqZkbuQkn9JVduI39XPrhm1UefekAekaNqxFpNLM,5061
21
21
  dashscope/api_entities/base_request.py,sha256=cXUL7xqSV8wBr5d-1kx65AO3IsRR9A_ps6Lok-v-MKM,926
22
- dashscope/api_entities/dashscope_response.py,sha256=4a8Iya8RBUnVdzGmzoj6NvaaEeEnodGAD7evBrqEXfU,19832
22
+ dashscope/api_entities/dashscope_response.py,sha256=3e-W0UnfPGTsrd_DiZaD_xeq2I5CnrXFMEMRoHHDga8,20131
23
23
  dashscope/api_entities/http_request.py,sha256=Pr6mr01uXELK9LwIPXrJAhNtGMkWH3gQYORXShRiQRo,13258
24
24
  dashscope/api_entities/websocket_request.py,sha256=h3RcvgvXpyzF8xvC4hqNUkev6HGN_YgO5emvqYaXw78,16094
25
25
  dashscope/app/__init__.py,sha256=UiN_9i--z84Dw5wUehOh_Tkk_9Gq_td_Kbz1dobBEKg,62
@@ -60,7 +60,7 @@ dashscope/customize/finetunes.py,sha256=iFnEUMGY6FGogVClIJMEeFhUwfYi7gD05Iq1-eMP
60
60
  dashscope/embeddings/__init__.py,sha256=-dxHaoxZZVuP-wAGUIa3sNNh8CQwaeWj2UlqsDy1sV4,240
61
61
  dashscope/embeddings/batch_text_embedding.py,sha256=P32LFO9v7ehdJsl0c32In94hUET6K6AaGJ_pDRtFqco,8791
62
62
  dashscope/embeddings/batch_text_embedding_response.py,sha256=hf17wfhJKvX3ggnigOiTqD4O1lFhx_NG_O1ioKCx0gk,1999
63
- dashscope/embeddings/multimodal_embedding.py,sha256=yojtGNoT2N54g0jcAYUwNIiwzueun1ouqS0S0tvnyQc,3966
63
+ dashscope/embeddings/multimodal_embedding.py,sha256=EvXoVRExkenpeRE8Nqfas0Vrl5wzCZCJIxfgbOI7Qv0,4058
64
64
  dashscope/embeddings/text_embedding.py,sha256=I3zRvuT2HWcaZYH-zrtGcAQmzuLQxFswIHJMiQXfaJQ,2009
65
65
  dashscope/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
66
  dashscope/io/input_output.py,sha256=iZ1X1x1btdoZK2VeC9JsKkag2eaXwqfNT3Q6SrmRi2w,3941
@@ -87,9 +87,9 @@ dashscope/tokenizers/tokenizer.py,sha256=y6P91qTCYo__pEx_0VHAcj9YECfbUdRqZU1fdGT
87
87
  dashscope/tokenizers/tokenizer_base.py,sha256=REDhzRyDT13iequ61-a6_KcTy0GFKlihQve5HkyoyRs,656
88
88
  dashscope/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
89
  dashscope/utils/oss_utils.py,sha256=TlqaMAmVRtBJIm5aIaXsrRZGKc_7cwWQ7liMB2f9Css,7331
90
- dashscope-1.22.0.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
91
- dashscope-1.22.0.dist-info/METADATA,sha256=ZmeEprSXjdVtgfudY4kN8L0XSN8EughpPz7y3OyCwkM,6641
92
- dashscope-1.22.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
93
- dashscope-1.22.0.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
94
- dashscope-1.22.0.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
95
- dashscope-1.22.0.dist-info/RECORD,,
90
+ dashscope-1.22.2.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
91
+ dashscope-1.22.2.dist-info/METADATA,sha256=Cf_GT_W-HPppanGcy9RBKHS40yWSfL93_IXwc0SxAzc,6798
92
+ dashscope-1.22.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
93
+ dashscope-1.22.2.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
94
+ dashscope-1.22.2.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
95
+ dashscope-1.22.2.dist-info/RECORD,,