dashscope 1.19.1__py3-none-any.whl → 1.19.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.

@@ -1,4 +1,4 @@
1
- from typing import Any, List, Union
1
+ from typing import Any, Dict, List, Union
2
2
 
3
3
  from dashscope.api_entities.dashscope_response import (DashScopeAPIResponse,
4
4
  ImageSynthesisResponse)
@@ -26,6 +26,7 @@ class ImageSynthesis(BaseAsyncApi):
26
26
  sketch_image_url: str = None,
27
27
  ref_img: str = None,
28
28
  workspace: str = None,
29
+ extra_input: Dict = None,
29
30
  **kwargs) -> ImageSynthesisResponse:
30
31
  """Call image(s) synthesis service and get result.
31
32
 
@@ -39,6 +40,7 @@ class ImageSynthesis(BaseAsyncApi):
39
40
  sketch_image_url (str, optional): Only for wanx-sketch-to-image-v1.
40
41
  Defaults to None.
41
42
  workspace (str): The dashscope workspace id.
43
+ extra_input (Dict): The extra input parameters.
42
44
  **kwargs:
43
45
  n(int, `optional`): Number of images to synthesis.
44
46
  size(str, `optional`): The output image(s) size(width*height).
@@ -64,6 +66,7 @@ class ImageSynthesis(BaseAsyncApi):
64
66
  sketch_image_url=sketch_image_url,
65
67
  ref_img=ref_img,
66
68
  workspace=workspace,
69
+ extra_input=extra_input,
67
70
  **kwargs)
68
71
 
69
72
  @classmethod
@@ -76,6 +79,7 @@ class ImageSynthesis(BaseAsyncApi):
76
79
  sketch_image_url: str = None,
77
80
  ref_img: str = None,
78
81
  workspace: str = None,
82
+ extra_input: Dict = None,
79
83
  **kwargs) -> ImageSynthesisResponse:
80
84
  """Create a image(s) synthesis task, and return task information.
81
85
 
@@ -88,6 +92,7 @@ class ImageSynthesis(BaseAsyncApi):
88
92
  sketch_image_url (str, optional): Only for wanx-sketch-to-image-v1.
89
93
  Defaults to None.
90
94
  workspace (str): The dashscope workspace id.
95
+ extra_input (Dict): The extra input parameters.
91
96
  **kwargs(wanx-v1):
92
97
  n(int, `optional`): Number of images to synthesis.
93
98
  size: The output image(s) size, Default 1024*1024
@@ -118,6 +123,9 @@ class ImageSynthesis(BaseAsyncApi):
118
123
  input['sketch_image_url'] = sketch_image_url
119
124
  if ref_img is not None and ref_img:
120
125
  input['ref_img'] == ref_img
126
+ if extra_input is not None and extra_input:
127
+ input = {**input, **extra_input}
128
+
121
129
  response = super().async_call(model=model,
122
130
  task_group=task_group,
123
131
  task=ImageSynthesis.task,
dashscope/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.19.1'
1
+ __version__ = '1.19.2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dashscope
3
- Version: 1.19.1
3
+ Version: 1.19.2
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -6,12 +6,12 @@ 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=_HUAUi-u8hG8FcFLMpMxSECPn6Si10Hn8M1DGJyxUkQ,23
9
+ dashscope/version.py,sha256=2JwwiX3GuUOPmJeHorFZjfJ5acPHupYm7sHvV4dsiME,23
10
10
  dashscope/aigc/__init__.py,sha256=s-MCA87KYiVumYtKtJi5IMN7xelSF6TqEU3s3_7RF-Y,327
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
- dashscope/aigc/image_synthesis.py,sha256=7A5txSkKBkg5pN5F7IP5C90277Yk8fkKAWu30YhskdM,9994
14
+ dashscope/aigc/image_synthesis.py,sha256=39exBCmJcQpKll7wAgcbLzxEMSSkGq7s5f9TWB6q1Vo,10355
15
15
  dashscope/aigc/multimodal_conversation.py,sha256=SlNnnsUPV19gdx8fYJAtsMFWPNGY6vhk5IGHZ5ZczpI,5369
16
16
  dashscope/api_entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  dashscope/api_entities/aiohttp_request.py,sha256=aE3AeWba8Ig_xHMYjrAdkq0N61l_L2VFTG6HYh912X0,10229
@@ -80,9 +80,9 @@ dashscope/tokenizers/tokenizer.py,sha256=y6P91qTCYo__pEx_0VHAcj9YECfbUdRqZU1fdGT
80
80
  dashscope/tokenizers/tokenizer_base.py,sha256=REDhzRyDT13iequ61-a6_KcTy0GFKlihQve5HkyoyRs,656
81
81
  dashscope/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
82
  dashscope/utils/oss_utils.py,sha256=fi8-PPsN-iR-iv5k2NS5Z8nlWkpgUhr56FRWm4BDh4A,6984
83
- dashscope-1.19.1.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
84
- dashscope-1.19.1.dist-info/METADATA,sha256=pURfnZ-PzopFwsIK_l3RiK_ST0qSBNCmHZK2JsEZYic,6609
85
- dashscope-1.19.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
86
- dashscope-1.19.1.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
87
- dashscope-1.19.1.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
88
- dashscope-1.19.1.dist-info/RECORD,,
83
+ dashscope-1.19.2.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
84
+ dashscope-1.19.2.dist-info/METADATA,sha256=bgAu-4DjX5McZl-IWlDbHtbtvlk8JlJALIzjIu4ZDZ8,6609
85
+ dashscope-1.19.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
86
+ dashscope-1.19.2.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
87
+ dashscope-1.19.2.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
88
+ dashscope-1.19.2.dist-info/RECORD,,