tencentcloud-sdk-python 3.0.1127__py2.py3-none-any.whl → 3.0.1128__py2.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 tencentcloud-sdk-python might be problematic. Click here for more details.
- tencentcloud/__init__.py +1 -1
- tencentcloud/aiart/v20221229/aiart_client.py +4 -11
- tencentcloud/aiart/v20221229/models.py +6 -5
- tencentcloud/antiddos/v20200309/models.py +13 -0
- tencentcloud/cdb/v20170320/cdb_client.py +46 -0
- tencentcloud/cdb/v20170320/errorcodes.py +3 -0
- tencentcloud/cdb/v20170320/models.py +360 -0
- tencentcloud/es/v20180416/models.py +12 -12
- tencentcloud/faceid/v20180301/faceid_client.py +1 -1
- tencentcloud/faceid/v20180301/models.py +12 -0
- tencentcloud/hunyuan/v20230901/hunyuan_client.py +8 -8
- tencentcloud/hunyuan/v20230901/models.py +121 -30
- tencentcloud/lke/__init__.py +0 -0
- tencentcloud/lke/v20231130/__init__.py +0 -0
- tencentcloud/lke/v20231130/errorcodes.py +30 -0
- tencentcloud/lke/v20231130/lke_client.py +1751 -0
- tencentcloud/lke/v20231130/models.py +13358 -0
- tencentcloud/mna/v20210119/errorcodes.py +12 -0
- tencentcloud/mna/v20210119/models.py +301 -5
- tencentcloud/redis/v20180412/models.py +1 -1
- tencentcloud/sms/v20210111/models.py +1 -0
- tencentcloud/tione/v20211111/models.py +48 -1
- tencentcloud/trtc/v20190722/models.py +72 -1
- tencentcloud/wedata/v20210820/models.py +345 -2088
- tencentcloud/wedata/v20210820/wedata_client.py +0 -253
- {tencentcloud_sdk_python-3.0.1127.dist-info → tencentcloud_sdk_python-3.0.1128.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1127.dist-info → tencentcloud_sdk_python-3.0.1128.dist-info}/RECORD +30 -25
- {tencentcloud_sdk_python-3.0.1127.dist-info → tencentcloud_sdk_python-3.0.1128.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1127.dist-info → tencentcloud_sdk_python-3.0.1128.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1127.dist-info → tencentcloud_sdk_python-3.0.1128.dist-info}/top_level.txt +0 -0
|
@@ -27,11 +27,11 @@ class HunyuanClient(AbstractClient):
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
def ChatPro(self, request):
|
|
30
|
-
"""
|
|
30
|
+
"""腾讯混元大模型高级版是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
|
31
31
|
|
|
32
|
-
1
|
|
33
|
-
2
|
|
34
|
-
3
|
|
32
|
+
1. 本接口暂不支持返回图片内容。
|
|
33
|
+
2. 默认单账号限制并发数为 5 路,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。
|
|
34
|
+
3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。
|
|
35
35
|
|
|
36
36
|
:param request: Request instance for ChatPro.
|
|
37
37
|
:type request: :class:`tencentcloud.hunyuan.v20230901.models.ChatProRequest`
|
|
@@ -49,11 +49,11 @@ class HunyuanClient(AbstractClient):
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
def ChatStd(self, request):
|
|
52
|
-
"""
|
|
52
|
+
"""腾讯混元大模型标准版是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
|
53
53
|
|
|
54
|
-
1
|
|
55
|
-
2
|
|
56
|
-
3
|
|
54
|
+
1. 本接口暂不支持返回图片内容。
|
|
55
|
+
2. 默认单账号限制并发数为 5 路,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。
|
|
56
|
+
3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。
|
|
57
57
|
|
|
58
58
|
:param request: Request instance for ChatStd.
|
|
59
59
|
:type request: :class:`tencentcloud.hunyuan.v20230901.models.ChatStdRequest`
|
|
@@ -27,24 +27,43 @@ class ChatProRequest(AbstractModel):
|
|
|
27
27
|
r"""
|
|
28
28
|
:param _Messages: 聊天上下文信息。
|
|
29
29
|
说明:
|
|
30
|
-
1
|
|
31
|
-
2.Message的Role当前可选值:system、user、assistant
|
|
32
|
-
3.Messages中Content总长度不超过16000
|
|
30
|
+
1. 长度最多为 40,按对话时间从旧到新在数组中排列。
|
|
31
|
+
2. Message 的 Role 当前可选值:system、user、assistant。其中,system 角色是可选的,如果存在,必须位于列表的最开始。此外,user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。
|
|
32
|
+
3. Messages 中 Content 总长度不超过 16000 Token,超过则会截断最前面的内容,只保留尾部内容。建议不超过 4000 Token。
|
|
33
33
|
:type Messages: list of Message
|
|
34
34
|
:param _TopP: 说明:
|
|
35
|
-
1
|
|
36
|
-
2
|
|
37
|
-
3
|
|
35
|
+
1. 影响输出文本的多样性,取值越大,生成文本的多样性越强。
|
|
36
|
+
2. 默认 1.0,取值区间为 [0.0, 1.0]。
|
|
37
|
+
3. 非必要不建议使用,不合理的取值会影响效果。
|
|
38
38
|
:type TopP: float
|
|
39
39
|
:param _Temperature: 说明:
|
|
40
|
-
1
|
|
41
|
-
2
|
|
42
|
-
3
|
|
40
|
+
1. 较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定。
|
|
41
|
+
2. 默认 1.0,取值区间为 [0.0,2.0]。
|
|
42
|
+
3. 非必要不建议使用,不合理的取值会影响效果。
|
|
43
43
|
:type Temperature: float
|
|
44
|
+
:param _Stream: 流式调用开关。
|
|
45
|
+
说明:
|
|
46
|
+
1. 未传值时默认为流式调用。
|
|
47
|
+
2. 流式调用时以 SSE 协议增量返回结果。
|
|
48
|
+
3. 非流式调用时接口响应耗时较长,非必要不建议使用。
|
|
49
|
+
4. 非流式调用时只返回一次最终结果,调用方式与普通 HTTP 请求无异。
|
|
50
|
+
:type Stream: bool
|
|
51
|
+
:param _StreamModeration: 流式输出审核开关。
|
|
52
|
+
说明:
|
|
53
|
+
1. 当 Stream 字段值为 true 时,该字段有效。
|
|
54
|
+
2. 未传值时默认不使用流式输出审核。
|
|
55
|
+
3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 finish_reason 值为 sensitive。
|
|
56
|
+
4. 如果值为 false,则需要审核完所有输出内容后再返回结果。
|
|
57
|
+
|
|
58
|
+
注意:
|
|
59
|
+
当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 finish_reason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
|
|
60
|
+
:type StreamModeration: bool
|
|
44
61
|
"""
|
|
45
62
|
self._Messages = None
|
|
46
63
|
self._TopP = None
|
|
47
64
|
self._Temperature = None
|
|
65
|
+
self._Stream = None
|
|
66
|
+
self._StreamModeration = None
|
|
48
67
|
|
|
49
68
|
@property
|
|
50
69
|
def Messages(self):
|
|
@@ -70,6 +89,22 @@ class ChatProRequest(AbstractModel):
|
|
|
70
89
|
def Temperature(self, Temperature):
|
|
71
90
|
self._Temperature = Temperature
|
|
72
91
|
|
|
92
|
+
@property
|
|
93
|
+
def Stream(self):
|
|
94
|
+
return self._Stream
|
|
95
|
+
|
|
96
|
+
@Stream.setter
|
|
97
|
+
def Stream(self, Stream):
|
|
98
|
+
self._Stream = Stream
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def StreamModeration(self):
|
|
102
|
+
return self._StreamModeration
|
|
103
|
+
|
|
104
|
+
@StreamModeration.setter
|
|
105
|
+
def StreamModeration(self, StreamModeration):
|
|
106
|
+
self._StreamModeration = StreamModeration
|
|
107
|
+
|
|
73
108
|
|
|
74
109
|
def _deserialize(self, params):
|
|
75
110
|
if params.get("Messages") is not None:
|
|
@@ -80,6 +115,8 @@ class ChatProRequest(AbstractModel):
|
|
|
80
115
|
self._Messages.append(obj)
|
|
81
116
|
self._TopP = params.get("TopP")
|
|
82
117
|
self._Temperature = params.get("Temperature")
|
|
118
|
+
self._Stream = params.get("Stream")
|
|
119
|
+
self._StreamModeration = params.get("StreamModeration")
|
|
83
120
|
memeber_set = set(params.keys())
|
|
84
121
|
for name, value in vars(self).items():
|
|
85
122
|
property_name = name[1:]
|
|
@@ -97,14 +134,14 @@ class ChatProResponse(AbstractModel):
|
|
|
97
134
|
|
|
98
135
|
def __init__(self):
|
|
99
136
|
r"""
|
|
100
|
-
:param _Created:
|
|
137
|
+
:param _Created: Unix 时间戳,单位为秒。
|
|
101
138
|
:type Created: int
|
|
102
|
-
:param _Usage:
|
|
103
|
-
按照总
|
|
139
|
+
:param _Usage: Token 统计信息。
|
|
140
|
+
按照总 Token 数量计费。
|
|
104
141
|
:type Usage: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
|
|
105
142
|
:param _Note: 免责声明。
|
|
106
143
|
:type Note: str
|
|
107
|
-
:param _Id: 本轮对话的
|
|
144
|
+
:param _Id: 本轮对话的 ID。
|
|
108
145
|
:type Id: str
|
|
109
146
|
:param _Choices: 回复内容。
|
|
110
147
|
:type Choices: list of Choice
|
|
@@ -208,24 +245,44 @@ class ChatStdRequest(AbstractModel):
|
|
|
208
245
|
r"""
|
|
209
246
|
:param _Messages: 聊天上下文信息。
|
|
210
247
|
说明:
|
|
211
|
-
1
|
|
212
|
-
2.Message的Role当前可选值:user、assistant
|
|
213
|
-
3.Messages中Content总长度不超过16000
|
|
248
|
+
1. 长度最多为 40,按对话时间从旧到新在数组中排列。
|
|
249
|
+
2. Message 的 Role 当前可选值:user、assistant。其中,user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[user assistant user assistant user ...]。
|
|
250
|
+
3. Messages 中 Content 总长度不超过 16000 Token,超过则会截断最前面的内容,只保留尾部内容。建议不超过 4000 Token。
|
|
251
|
+
|
|
214
252
|
:type Messages: list of Message
|
|
215
253
|
:param _TopP: 说明:
|
|
216
|
-
1
|
|
217
|
-
2
|
|
218
|
-
3
|
|
254
|
+
1. 影响输出文本的多样性,取值越大,生成文本的多样性越强。
|
|
255
|
+
2. 默认 1.0,取值区间为 [0.0, 1.0]。
|
|
256
|
+
3. 非必要不建议使用,不合理的取值会影响效果。
|
|
219
257
|
:type TopP: float
|
|
220
258
|
:param _Temperature: 说明:
|
|
221
|
-
1
|
|
222
|
-
2
|
|
223
|
-
3
|
|
259
|
+
1. 较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定。
|
|
260
|
+
2. 默认 1.0,取值区间为 [0.0,2.0]。
|
|
261
|
+
3. 非必要不建议使用,不合理的取值会影响效果。
|
|
224
262
|
:type Temperature: float
|
|
263
|
+
:param _Stream: 流式调用开关。
|
|
264
|
+
说明:
|
|
265
|
+
1. 未传值时默认为流式调用。
|
|
266
|
+
2. 流式调用时以 SSE 协议增量返回结果。
|
|
267
|
+
3. 非流式调用时接口响应耗时较长,非必要不建议使用。
|
|
268
|
+
4. 非流式调用时只返回一次最终结果,调用方式与普通 HTTP 请求无异。
|
|
269
|
+
:type Stream: bool
|
|
270
|
+
:param _StreamModeration: 流式输出审核开关。
|
|
271
|
+
说明:
|
|
272
|
+
1. 当 Stream 字段值为 true 时,该字段有效。
|
|
273
|
+
2. 未传值时默认不使用流式输出审核。
|
|
274
|
+
3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 finish_reason 值为 sensitive。
|
|
275
|
+
4. 如果值为 false,则需要审核完所有输出内容后再返回结果。
|
|
276
|
+
|
|
277
|
+
注意:
|
|
278
|
+
当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 finish_reason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
|
|
279
|
+
:type StreamModeration: bool
|
|
225
280
|
"""
|
|
226
281
|
self._Messages = None
|
|
227
282
|
self._TopP = None
|
|
228
283
|
self._Temperature = None
|
|
284
|
+
self._Stream = None
|
|
285
|
+
self._StreamModeration = None
|
|
229
286
|
|
|
230
287
|
@property
|
|
231
288
|
def Messages(self):
|
|
@@ -251,6 +308,22 @@ class ChatStdRequest(AbstractModel):
|
|
|
251
308
|
def Temperature(self, Temperature):
|
|
252
309
|
self._Temperature = Temperature
|
|
253
310
|
|
|
311
|
+
@property
|
|
312
|
+
def Stream(self):
|
|
313
|
+
return self._Stream
|
|
314
|
+
|
|
315
|
+
@Stream.setter
|
|
316
|
+
def Stream(self, Stream):
|
|
317
|
+
self._Stream = Stream
|
|
318
|
+
|
|
319
|
+
@property
|
|
320
|
+
def StreamModeration(self):
|
|
321
|
+
return self._StreamModeration
|
|
322
|
+
|
|
323
|
+
@StreamModeration.setter
|
|
324
|
+
def StreamModeration(self, StreamModeration):
|
|
325
|
+
self._StreamModeration = StreamModeration
|
|
326
|
+
|
|
254
327
|
|
|
255
328
|
def _deserialize(self, params):
|
|
256
329
|
if params.get("Messages") is not None:
|
|
@@ -261,6 +334,8 @@ class ChatStdRequest(AbstractModel):
|
|
|
261
334
|
self._Messages.append(obj)
|
|
262
335
|
self._TopP = params.get("TopP")
|
|
263
336
|
self._Temperature = params.get("Temperature")
|
|
337
|
+
self._Stream = params.get("Stream")
|
|
338
|
+
self._StreamModeration = params.get("StreamModeration")
|
|
264
339
|
memeber_set = set(params.keys())
|
|
265
340
|
for name, value in vars(self).items():
|
|
266
341
|
property_name = name[1:]
|
|
@@ -278,14 +353,14 @@ class ChatStdResponse(AbstractModel):
|
|
|
278
353
|
|
|
279
354
|
def __init__(self):
|
|
280
355
|
r"""
|
|
281
|
-
:param _Created:
|
|
356
|
+
:param _Created: Unix 时间戳,单位为秒。
|
|
282
357
|
:type Created: int
|
|
283
|
-
:param _Usage:
|
|
284
|
-
按照总
|
|
358
|
+
:param _Usage: Token 统计信息。
|
|
359
|
+
按照总 Token 数量计费。
|
|
285
360
|
:type Usage: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
|
|
286
361
|
:param _Note: 免责声明。
|
|
287
362
|
:type Note: str
|
|
288
|
-
:param _Id: 本轮对话的
|
|
363
|
+
:param _Id: 本轮对话的 ID。
|
|
289
364
|
:type Id: str
|
|
290
365
|
:param _Choices: 回复内容。
|
|
291
366
|
:type Choices: list of Choice
|
|
@@ -387,13 +462,18 @@ class Choice(AbstractModel):
|
|
|
387
462
|
|
|
388
463
|
def __init__(self):
|
|
389
464
|
r"""
|
|
390
|
-
:param _FinishReason:
|
|
465
|
+
:param _FinishReason: 结束标志位,为 stop 则表示尾包。
|
|
391
466
|
:type FinishReason: str
|
|
392
|
-
:param _Delta:
|
|
467
|
+
:param _Delta: 增量返回值,流式调用时使用该字段。
|
|
468
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
393
469
|
:type Delta: :class:`tencentcloud.hunyuan.v20230901.models.Delta`
|
|
470
|
+
:param _Message: 返回值,非流式调用时使用该字段。
|
|
471
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
472
|
+
:type Message: :class:`tencentcloud.hunyuan.v20230901.models.Message`
|
|
394
473
|
"""
|
|
395
474
|
self._FinishReason = None
|
|
396
475
|
self._Delta = None
|
|
476
|
+
self._Message = None
|
|
397
477
|
|
|
398
478
|
@property
|
|
399
479
|
def FinishReason(self):
|
|
@@ -411,12 +491,23 @@ class Choice(AbstractModel):
|
|
|
411
491
|
def Delta(self, Delta):
|
|
412
492
|
self._Delta = Delta
|
|
413
493
|
|
|
494
|
+
@property
|
|
495
|
+
def Message(self):
|
|
496
|
+
return self._Message
|
|
497
|
+
|
|
498
|
+
@Message.setter
|
|
499
|
+
def Message(self, Message):
|
|
500
|
+
self._Message = Message
|
|
501
|
+
|
|
414
502
|
|
|
415
503
|
def _deserialize(self, params):
|
|
416
504
|
self._FinishReason = params.get("FinishReason")
|
|
417
505
|
if params.get("Delta") is not None:
|
|
418
506
|
self._Delta = Delta()
|
|
419
507
|
self._Delta._deserialize(params.get("Delta"))
|
|
508
|
+
if params.get("Message") is not None:
|
|
509
|
+
self._Message = Message()
|
|
510
|
+
self._Message._deserialize(params.get("Message"))
|
|
420
511
|
memeber_set = set(params.keys())
|
|
421
512
|
for name, value in vars(self).items():
|
|
422
513
|
property_name = name[1:]
|
|
@@ -809,7 +900,7 @@ class GetTokenCountResponse(AbstractModel):
|
|
|
809
900
|
|
|
810
901
|
|
|
811
902
|
class Message(AbstractModel):
|
|
812
|
-
"""
|
|
903
|
+
"""单条消息
|
|
813
904
|
|
|
814
905
|
"""
|
|
815
906
|
|
|
@@ -817,7 +908,7 @@ class Message(AbstractModel):
|
|
|
817
908
|
r"""
|
|
818
909
|
:param _Role: 角色
|
|
819
910
|
:type Role: str
|
|
820
|
-
:param _Content:
|
|
911
|
+
:param _Content: 消息内容
|
|
821
912
|
:type Content: str
|
|
822
913
|
"""
|
|
823
914
|
self._Role = None
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# -*- coding: utf8 -*-
|
|
2
|
+
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# 操作失败。
|
|
18
|
+
FAILEDOPERATION = 'FailedOperation'
|
|
19
|
+
|
|
20
|
+
# 内部错误。
|
|
21
|
+
INTERNALERROR = 'InternalError'
|
|
22
|
+
|
|
23
|
+
# 参数错误。
|
|
24
|
+
INVALIDPARAMETER = 'InvalidParameter'
|
|
25
|
+
|
|
26
|
+
# 超过配额限制。
|
|
27
|
+
LIMITEXCEEDED = 'LimitExceeded'
|
|
28
|
+
|
|
29
|
+
# 请求的次数超过了频率限制。
|
|
30
|
+
REQUESTLIMITEXCEEDED = 'RequestLimitExceeded'
|