dashscope 1.19.1__py3-none-any.whl → 1.19.3__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,
@@ -67,6 +67,7 @@ class ApplicationDocReference(DictMixin):
67
67
  doc_url: str
68
68
  text: str
69
69
  biz_id: str
70
+ images: List[str]
70
71
 
71
72
  def __init__(self,
72
73
  index_id: str = None,
@@ -76,6 +77,7 @@ class ApplicationDocReference(DictMixin):
76
77
  doc_url: str = None,
77
78
  text: str = None,
78
79
  biz_id: str = None,
80
+ images: List[str] = None,
79
81
  **kwargs):
80
82
  """ Doc references for retrieval result.
81
83
 
@@ -87,6 +89,7 @@ class ApplicationDocReference(DictMixin):
87
89
  doc_url (str, optional): Url of original doc that retrieved.
88
90
  text (str, optional): Text in original doc that retrieved.
89
91
  biz_id (str, optional): Biz id that caller is able to associated for biz logic.
92
+ images (list, optional): List of referenced image URLs
90
93
  """
91
94
 
92
95
  super().__init__(index_id=index_id,
@@ -96,6 +99,7 @@ class ApplicationDocReference(DictMixin):
96
99
  doc_url=doc_url,
97
100
  text=text,
98
101
  biz_id=biz_id,
102
+ images=images,
99
103
  **kwargs)
100
104
 
101
105
 
dashscope/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.19.1'
1
+ __version__ = '1.19.3'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dashscope
3
- Version: 1.19.1
3
+ Version: 1.19.3
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=o0O8TUNeZCJQn0hikTg-d3E5wkaO7bDwzfCeRhs6R20,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
@@ -23,7 +23,7 @@ dashscope/api_entities/http_request.py,sha256=UeS8_rhApA_FnuPv56B2Ruu1l9O1Bd6NiB
23
23
  dashscope/api_entities/websocket_request.py,sha256=Xr6IJ9WqrIw5ouBQLpgoRSwL1C09jkb4u1EZdxhVQy0,15039
24
24
  dashscope/app/__init__.py,sha256=UiN_9i--z84Dw5wUehOh_Tkk_9Gq_td_Kbz1dobBEKg,62
25
25
  dashscope/app/application.py,sha256=AegGVsk3dDzYACoYRNNjo3eG-2wrDd0dlOjYHpF0r2Y,7949
26
- dashscope/app/application_response.py,sha256=AR_dEtfDsS7SqOyUqZmiosdgos1bDnXUvZn7XV_OzAs,6714
26
+ dashscope/app/application_response.py,sha256=U5I8Yb1IlXzj2L5a1OAl55i0MCB3kG9Qp4aY17_73pI,6886
27
27
  dashscope/assistants/__init__.py,sha256=i9N5OxHgY7edlOhTdPyC0N5Uc0uMCkB2vbMPDCD1zX0,383
28
28
  dashscope/assistants/assistant_types.py,sha256=1jNL30TOlrkiYhvCaB3E8jkPLG8CnQ6I3tHpYXZCsD0,4211
29
29
  dashscope/assistants/assistants.py,sha256=NYahIDqhtnOcQOmnhZsjc5F5jvBUQcce8-fbrJXHVnQ,10833
@@ -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.3.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
84
+ dashscope-1.19.3.dist-info/METADATA,sha256=OACOQOVBMq9bH8iwifFRofb3osjSKCLDXwKeiwcNKHc,6609
85
+ dashscope-1.19.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
86
+ dashscope-1.19.3.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
87
+ dashscope-1.19.3.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
88
+ dashscope-1.19.3.dist-info/RECORD,,