dashscope 1.20.12__py3-none-any.whl → 1.20.13__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,3 +1,5 @@
1
+ from urllib.parse import urlencode
2
+
1
3
  import dashscope
2
4
  from dashscope.api_entities.api_request_data import ApiRequestData
3
5
  from dashscope.api_entities.http_request import HttpRequest
@@ -26,9 +28,10 @@ def _get_protocol_params(kwargs):
26
28
  resources = kwargs.pop('resources', None)
27
29
  base_address = kwargs.pop('base_address', None)
28
30
  flattened_output = kwargs.pop('flattened_output', False)
31
+ extra_url_parameters = kwargs.pop('extra_url_parameters', None)
29
32
  return (api_protocol, ws_stream_mode, is_binary_input, http_method, stream,
30
33
  async_request, query, headers, request_timeout, form, resources,
31
- base_address, flattened_output)
34
+ base_address, flattened_output, extra_url_parameters)
32
35
 
33
36
 
34
37
  def _build_api_request(model: str,
@@ -41,7 +44,8 @@ def _build_api_request(model: str,
41
44
  **kwargs):
42
45
  (api_protocol, ws_stream_mode, is_binary_input, http_method, stream,
43
46
  async_request, query, headers, request_timeout, form, resources,
44
- base_address, flattened_output) = _get_protocol_params(kwargs)
47
+ base_address, flattened_output,
48
+ extra_url_parameters) = _get_protocol_params(kwargs)
45
49
  task_id = kwargs.pop('task_id', None)
46
50
  if api_protocol in [ApiProtocol.HTTP, ApiProtocol.HTTPS]:
47
51
  if base_address is None:
@@ -60,6 +64,9 @@ def _build_api_request(model: str,
60
64
  http_url += '%s/' % task
61
65
  if function:
62
66
  http_url += function
67
+ if extra_url_parameters is not None and extra_url_parameters:
68
+ http_url += '?' + urlencode(extra_url_parameters)
69
+
63
70
  request = HttpRequest(url=http_url,
64
71
  api_key=api_key,
65
72
  http_method=http_method,
dashscope/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.20.12'
1
+ __version__ = '1.20.13'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dashscope
3
- Version: 1.20.12
3
+ Version: 1.20.13
4
4
  Summary: dashscope client sdk library
5
5
  Home-page: https://dashscope.aliyun.com/
6
6
  Author: Alibaba Cloud
@@ -6,7 +6,7 @@ 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=uB1teRfVXUYl5Yy0XW6UC7CjR0jMRi-VsJVZlJGu290,24
9
+ dashscope/version.py,sha256=S_Jpp_0DyAr58XdPBnt8Vp3igXO6V6giLNnGEK_HJHQ,24
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
@@ -16,7 +16,7 @@ dashscope/aigc/multimodal_conversation.py,sha256=SlNnnsUPV19gdx8fYJAtsMFWPNGY6vh
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
18
18
  dashscope/api_entities/api_request_data.py,sha256=JUMcfpJjKXEZLCBSFIDpgoaeQYk5uK9-CwhM4OHIHFQ,5463
19
- dashscope/api_entities/api_request_factory.py,sha256=4p-qxMuvCA0CmUHdH19QaUCaHmlLHAM1X2Jd4YKt5c0,4661
19
+ dashscope/api_entities/api_request_factory.py,sha256=j4VOA1qKzvsK6-BOHGyA35oqsMkNoc4xZe9GHefV0fU,4947
20
20
  dashscope/api_entities/base_request.py,sha256=cXUL7xqSV8wBr5d-1kx65AO3IsRR9A_ps6Lok-v-MKM,926
21
21
  dashscope/api_entities/dashscope_response.py,sha256=Bp1T7HwVlkOvpMNg-AEjz-BScxhLUXMXlE8ApXTtfhQ,17872
22
22
  dashscope/api_entities/http_request.py,sha256=pYE8qRMu9CaQDiugPlXeYoaj_diBv-ZDExCD3WNhehI,13259
@@ -85,9 +85,9 @@ dashscope/tokenizers/tokenizer.py,sha256=y6P91qTCYo__pEx_0VHAcj9YECfbUdRqZU1fdGT
85
85
  dashscope/tokenizers/tokenizer_base.py,sha256=REDhzRyDT13iequ61-a6_KcTy0GFKlihQve5HkyoyRs,656
86
86
  dashscope/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
87
  dashscope/utils/oss_utils.py,sha256=7vZ2Lypxwiit8VcAqAvr3cCyhVfaLapDiNuF-H3ZCD4,7332
88
- dashscope-1.20.12.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
89
- dashscope-1.20.12.dist-info/METADATA,sha256=OKwphrQ3jfnoXFgBOcMvf4cYu3UcM7WTPNfDeUBuNcA,6642
90
- dashscope-1.20.12.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
91
- dashscope-1.20.12.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
92
- dashscope-1.20.12.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
93
- dashscope-1.20.12.dist-info/RECORD,,
88
+ dashscope-1.20.13.dist-info/LICENSE,sha256=Izp5L1DF1Mbza6qojkqNNWlE_mYLnr4rmzx2EBF8YFw,11413
89
+ dashscope-1.20.13.dist-info/METADATA,sha256=LdYg6imH5DQJpKnK2iRS77l5js8bPweeV2yO-M6AfcA,6642
90
+ dashscope-1.20.13.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
91
+ dashscope-1.20.13.dist-info/entry_points.txt,sha256=raEp5dOuj8whJ7yqZlDM8WQ5p2RfnGrGNo0QLQEnatY,50
92
+ dashscope-1.20.13.dist-info/top_level.txt,sha256=woqavFJK9zas5xTqynmALqOtlafghjsk63Xk86powTU,10
93
+ dashscope-1.20.13.dist-info/RECORD,,