tencentcloud-sdk-python 3.0.1375__py2.py3-none-any.whl → 3.0.1377__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.
- tencentcloud/__init__.py +1 -1
- tencentcloud/apm/v20210622/models.py +30 -0
- tencentcloud/asr/v20190614/models.py +15 -0
- tencentcloud/bh/v20230418/models.py +317 -2
- tencentcloud/cat/v20180409/cat_client.py +23 -0
- tencentcloud/cat/v20180409/models.py +161 -0
- tencentcloud/cdb/v20170320/cdb_client.py +0 -25
- tencentcloud/cdb/v20170320/models.py +0 -113
- tencentcloud/cfs/v20190719/models.py +19 -0
- tencentcloud/cfw/v20190904/models.py +17 -2
- tencentcloud/dsgc/v20190723/models.py +15 -0
- tencentcloud/ess/v20201111/ess_client.py +28 -1
- tencentcloud/ess/v20201111/models.py +186 -4
- tencentcloud/essbasic/v20210526/essbasic_client.py +27 -0
- tencentcloud/essbasic/v20210526/models.py +220 -4
- tencentcloud/gaap/v20180529/errorcodes.py +0 -33
- tencentcloud/gaap/v20180529/gaap_client.py +0 -75
- tencentcloud/gaap/v20180529/models.py +0 -653
- tencentcloud/hunyuan/v20230901/hunyuan_client.py +25 -0
- tencentcloud/hunyuan/v20230901/models.py +330 -8
- tencentcloud/iai/v20180301/models.py +44 -34
- tencentcloud/keewidb/v20220308/models.py +4 -0
- tencentcloud/lighthouse/v20200324/models.py +4 -4
- tencentcloud/mongodb/v20190725/models.py +4 -0
- tencentcloud/partners/v20180321/models.py +266 -0
- tencentcloud/partners/v20180321/partners_client.py +23 -0
- tencentcloud/postgres/v20170312/models.py +2 -8
- tencentcloud/redis/v20180412/models.py +48 -0
- tencentcloud/tcbr/v20220217/models.py +162 -0
- tencentcloud/tdmq/v20200217/models.py +6 -6
- tencentcloud/teo/v20220901/errorcodes.py +12 -0
- tencentcloud/teo/v20220901/models.py +4 -4
- tencentcloud/thpc/v20230321/errorcodes.py +6 -0
- tencentcloud/thpc/v20230321/models.py +4 -4
- tencentcloud/vpc/v20170312/models.py +36 -38
- tencentcloud/vpc/v20170312/vpc_client.py +1 -1
- tencentcloud/waf/v20180125/errorcodes.py +12 -0
- tencentcloud/waf/v20180125/models.py +291 -29
- tencentcloud/wedata/v20210820/models.py +2717 -0
- tencentcloud/wedata/v20210820/wedata_client.py +184 -0
- {tencentcloud_sdk_python-3.0.1375.dist-info → tencentcloud_sdk_python-3.0.1377.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python-3.0.1375.dist-info → tencentcloud_sdk_python-3.0.1377.dist-info}/RECORD +45 -45
- {tencentcloud_sdk_python-3.0.1375.dist-info → tencentcloud_sdk_python-3.0.1377.dist-info}/LICENSE +0 -0
- {tencentcloud_sdk_python-3.0.1375.dist-info → tencentcloud_sdk_python-3.0.1377.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python-3.0.1375.dist-info → tencentcloud_sdk_python-3.0.1377.dist-info}/top_level.txt +0 -0
@@ -315,6 +315,31 @@ class HunyuanClient(AbstractClient):
|
|
315
315
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
316
316
|
|
317
317
|
|
318
|
+
def ImageQuestion(self, request):
|
319
|
+
"""如需使用OpenAI兼容接口, 请参考文档:[OpenAI 兼容接口](https://cloud.tencent.com/document/product/1729/111007)
|
320
|
+
|
321
|
+
腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
322
|
+
|
323
|
+
1. 本接口暂不支持返回图片内容。
|
324
|
+
2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。
|
325
|
+
3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。
|
326
|
+
4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。
|
327
|
+
|
328
|
+
:param request: Request instance for ImageQuestion.
|
329
|
+
:type request: :class:`tencentcloud.hunyuan.v20230901.models.ImageQuestionRequest`
|
330
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.ImageQuestionResponse`
|
331
|
+
|
332
|
+
"""
|
333
|
+
try:
|
334
|
+
params = request._serialize()
|
335
|
+
return self._call_and_deserialize("ImageQuestion", params, models.ImageQuestionResponse, headers=request.headers)
|
336
|
+
except Exception as e:
|
337
|
+
if isinstance(e, TencentCloudSDKException):
|
338
|
+
raise
|
339
|
+
else:
|
340
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
341
|
+
|
342
|
+
|
318
343
|
def QueryHunyuanImageChatJob(self, request):
|
319
344
|
"""混元生图(多轮对话)接口基于混元大模型,将根据输入的文本描述生成图像,支持通过多轮对话的方式不断调整图像内容。分为提交任务和查询任务2个接口。
|
320
345
|
提交任务:输入文本和前置对话 ID 等,提交一个混元生图多轮对话异步任务,获得任务 ID。
|
@@ -1391,10 +1391,13 @@ class Delta(AbstractModel):
|
|
1391
1391
|
|
1392
1392
|
注意:此字段可能返回 null,表示取不到有效值。
|
1393
1393
|
:type ToolCalls: list of ToolCall
|
1394
|
+
:param _ReasoningContent: 思维链内容。用于展示模型思考过程,仅 Hunyuan-T1 系列模型可用。注意:在进行多轮对话时,请不要将此字段拼接到 messages 中。请求 messages 的请求参数中包含 reasoning_content,接口将报错。
|
1395
|
+
:type ReasoningContent: str
|
1394
1396
|
"""
|
1395
1397
|
self._Role = None
|
1396
1398
|
self._Content = None
|
1397
1399
|
self._ToolCalls = None
|
1400
|
+
self._ReasoningContent = None
|
1398
1401
|
|
1399
1402
|
@property
|
1400
1403
|
def Role(self):
|
@@ -1433,6 +1436,17 @@ class Delta(AbstractModel):
|
|
1433
1436
|
def ToolCalls(self, ToolCalls):
|
1434
1437
|
self._ToolCalls = ToolCalls
|
1435
1438
|
|
1439
|
+
@property
|
1440
|
+
def ReasoningContent(self):
|
1441
|
+
"""思维链内容。用于展示模型思考过程,仅 Hunyuan-T1 系列模型可用。注意:在进行多轮对话时,请不要将此字段拼接到 messages 中。请求 messages 的请求参数中包含 reasoning_content,接口将报错。
|
1442
|
+
:rtype: str
|
1443
|
+
"""
|
1444
|
+
return self._ReasoningContent
|
1445
|
+
|
1446
|
+
@ReasoningContent.setter
|
1447
|
+
def ReasoningContent(self, ReasoningContent):
|
1448
|
+
self._ReasoningContent = ReasoningContent
|
1449
|
+
|
1436
1450
|
|
1437
1451
|
def _deserialize(self, params):
|
1438
1452
|
self._Role = params.get("Role")
|
@@ -1443,6 +1457,7 @@ class Delta(AbstractModel):
|
|
1443
1457
|
obj = ToolCall()
|
1444
1458
|
obj._deserialize(item)
|
1445
1459
|
self._ToolCalls.append(obj)
|
1460
|
+
self._ReasoningContent = params.get("ReasoningContent")
|
1446
1461
|
memeber_set = set(params.keys())
|
1447
1462
|
for name, value in vars(self).items():
|
1448
1463
|
property_name = name[1:]
|
@@ -1642,7 +1657,7 @@ class File3D(AbstractModel):
|
|
1642
1657
|
r"""
|
1643
1658
|
:param _Type: 3D文件的格式。取值范围:GIF, OBJ
|
1644
1659
|
:type Type: str
|
1645
|
-
:param _Url: 文件的Url
|
1660
|
+
:param _Url: 文件的Url(有效期24小时)
|
1646
1661
|
:type Url: str
|
1647
1662
|
"""
|
1648
1663
|
self._Type = None
|
@@ -1661,7 +1676,7 @@ class File3D(AbstractModel):
|
|
1661
1676
|
|
1662
1677
|
@property
|
1663
1678
|
def Url(self):
|
1664
|
-
"""文件的Url
|
1679
|
+
"""文件的Url(有效期24小时)
|
1665
1680
|
:rtype: str
|
1666
1681
|
"""
|
1667
1682
|
return self._Url
|
@@ -3726,6 +3741,301 @@ class Image(AbstractModel):
|
|
3726
3741
|
|
3727
3742
|
|
3728
3743
|
|
3744
|
+
class ImageMessage(AbstractModel):
|
3745
|
+
"""拍照解题内容
|
3746
|
+
|
3747
|
+
"""
|
3748
|
+
|
3749
|
+
def __init__(self):
|
3750
|
+
r"""
|
3751
|
+
:param _Role: 角色,可选值包括 system、user、assistant。
|
3752
|
+
:type Role: str
|
3753
|
+
:param _Content: 文本内容
|
3754
|
+
:type Content: str
|
3755
|
+
:param _Contents: 多种类型内容(目前支持图片和文本),仅 hunyuan-vision 和 hunyuan-turbo-vision 模型支持
|
3756
|
+
:type Contents: list of Content
|
3757
|
+
"""
|
3758
|
+
self._Role = None
|
3759
|
+
self._Content = None
|
3760
|
+
self._Contents = None
|
3761
|
+
|
3762
|
+
@property
|
3763
|
+
def Role(self):
|
3764
|
+
"""角色,可选值包括 system、user、assistant。
|
3765
|
+
:rtype: str
|
3766
|
+
"""
|
3767
|
+
return self._Role
|
3768
|
+
|
3769
|
+
@Role.setter
|
3770
|
+
def Role(self, Role):
|
3771
|
+
self._Role = Role
|
3772
|
+
|
3773
|
+
@property
|
3774
|
+
def Content(self):
|
3775
|
+
"""文本内容
|
3776
|
+
:rtype: str
|
3777
|
+
"""
|
3778
|
+
return self._Content
|
3779
|
+
|
3780
|
+
@Content.setter
|
3781
|
+
def Content(self, Content):
|
3782
|
+
self._Content = Content
|
3783
|
+
|
3784
|
+
@property
|
3785
|
+
def Contents(self):
|
3786
|
+
"""多种类型内容(目前支持图片和文本),仅 hunyuan-vision 和 hunyuan-turbo-vision 模型支持
|
3787
|
+
:rtype: list of Content
|
3788
|
+
"""
|
3789
|
+
return self._Contents
|
3790
|
+
|
3791
|
+
@Contents.setter
|
3792
|
+
def Contents(self, Contents):
|
3793
|
+
self._Contents = Contents
|
3794
|
+
|
3795
|
+
|
3796
|
+
def _deserialize(self, params):
|
3797
|
+
self._Role = params.get("Role")
|
3798
|
+
self._Content = params.get("Content")
|
3799
|
+
if params.get("Contents") is not None:
|
3800
|
+
self._Contents = []
|
3801
|
+
for item in params.get("Contents"):
|
3802
|
+
obj = Content()
|
3803
|
+
obj._deserialize(item)
|
3804
|
+
self._Contents.append(obj)
|
3805
|
+
memeber_set = set(params.keys())
|
3806
|
+
for name, value in vars(self).items():
|
3807
|
+
property_name = name[1:]
|
3808
|
+
if property_name in memeber_set:
|
3809
|
+
memeber_set.remove(property_name)
|
3810
|
+
if len(memeber_set) > 0:
|
3811
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
3812
|
+
|
3813
|
+
|
3814
|
+
|
3815
|
+
class ImageQuestionRequest(AbstractModel):
|
3816
|
+
"""ImageQuestion请求参数结构体
|
3817
|
+
|
3818
|
+
"""
|
3819
|
+
|
3820
|
+
def __init__(self):
|
3821
|
+
r"""
|
3822
|
+
:param _Model: 模型名称,可选值包括 hunyuan-vision-image-question。各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。注意:不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
3823
|
+
:type Model: str
|
3824
|
+
:param _Messages: 聊天上下文信息。说明:1. 长度最多为 40,按对话时间从旧到新在数组中排列。2. Message.Role 可选值:system、user、assistant。其中,system 角色可选,如存在则必须位于列表的最开始。user 和 assistant 需交替出现(一问一答),以 user 提问开始,user提问结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。3. Messages 中 Content 总长度不能超过模型输入长度上限(可参考 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 文档),超过则会截断最前面的内容,只保留尾部内容。
|
3825
|
+
:type Messages: list of ImageMessage
|
3826
|
+
:param _Stream: 流式调用开关。
|
3827
|
+
说明:
|
3828
|
+
1. 未传值时默认为非流式调用(false)。
|
3829
|
+
2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。
|
3830
|
+
3. 非流式调用时:
|
3831
|
+
调用方式与普通 HTTP 请求无异。
|
3832
|
+
接口响应耗时较长,**如需更低时延建议设置为 true**。
|
3833
|
+
只返回一次最终结果(返回值取 Choices[n].Message 中的值)。
|
3834
|
+
|
3835
|
+
注意:
|
3836
|
+
通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
|
3837
|
+
:type Stream: bool
|
3838
|
+
"""
|
3839
|
+
self._Model = None
|
3840
|
+
self._Messages = None
|
3841
|
+
self._Stream = None
|
3842
|
+
|
3843
|
+
@property
|
3844
|
+
def Model(self):
|
3845
|
+
"""模型名称,可选值包括 hunyuan-vision-image-question。各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。注意:不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
3846
|
+
:rtype: str
|
3847
|
+
"""
|
3848
|
+
return self._Model
|
3849
|
+
|
3850
|
+
@Model.setter
|
3851
|
+
def Model(self, Model):
|
3852
|
+
self._Model = Model
|
3853
|
+
|
3854
|
+
@property
|
3855
|
+
def Messages(self):
|
3856
|
+
"""聊天上下文信息。说明:1. 长度最多为 40,按对话时间从旧到新在数组中排列。2. Message.Role 可选值:system、user、assistant。其中,system 角色可选,如存在则必须位于列表的最开始。user 和 assistant 需交替出现(一问一答),以 user 提问开始,user提问结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。3. Messages 中 Content 总长度不能超过模型输入长度上限(可参考 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 文档),超过则会截断最前面的内容,只保留尾部内容。
|
3857
|
+
:rtype: list of ImageMessage
|
3858
|
+
"""
|
3859
|
+
return self._Messages
|
3860
|
+
|
3861
|
+
@Messages.setter
|
3862
|
+
def Messages(self, Messages):
|
3863
|
+
self._Messages = Messages
|
3864
|
+
|
3865
|
+
@property
|
3866
|
+
def Stream(self):
|
3867
|
+
"""流式调用开关。
|
3868
|
+
说明:
|
3869
|
+
1. 未传值时默认为非流式调用(false)。
|
3870
|
+
2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。
|
3871
|
+
3. 非流式调用时:
|
3872
|
+
调用方式与普通 HTTP 请求无异。
|
3873
|
+
接口响应耗时较长,**如需更低时延建议设置为 true**。
|
3874
|
+
只返回一次最终结果(返回值取 Choices[n].Message 中的值)。
|
3875
|
+
|
3876
|
+
注意:
|
3877
|
+
通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
|
3878
|
+
:rtype: bool
|
3879
|
+
"""
|
3880
|
+
return self._Stream
|
3881
|
+
|
3882
|
+
@Stream.setter
|
3883
|
+
def Stream(self, Stream):
|
3884
|
+
self._Stream = Stream
|
3885
|
+
|
3886
|
+
|
3887
|
+
def _deserialize(self, params):
|
3888
|
+
self._Model = params.get("Model")
|
3889
|
+
if params.get("Messages") is not None:
|
3890
|
+
self._Messages = []
|
3891
|
+
for item in params.get("Messages"):
|
3892
|
+
obj = ImageMessage()
|
3893
|
+
obj._deserialize(item)
|
3894
|
+
self._Messages.append(obj)
|
3895
|
+
self._Stream = params.get("Stream")
|
3896
|
+
memeber_set = set(params.keys())
|
3897
|
+
for name, value in vars(self).items():
|
3898
|
+
property_name = name[1:]
|
3899
|
+
if property_name in memeber_set:
|
3900
|
+
memeber_set.remove(property_name)
|
3901
|
+
if len(memeber_set) > 0:
|
3902
|
+
warnings.warn("%s fileds are useless." % ",".join(memeber_set))
|
3903
|
+
|
3904
|
+
|
3905
|
+
|
3906
|
+
class ImageQuestionResponse(AbstractModel):
|
3907
|
+
"""ImageQuestion返回参数结构体
|
3908
|
+
|
3909
|
+
"""
|
3910
|
+
|
3911
|
+
def __init__(self):
|
3912
|
+
r"""
|
3913
|
+
:param _Created: Unix 时间戳,单位为秒。
|
3914
|
+
:type Created: int
|
3915
|
+
:param _Usage: Token 统计信息。
|
3916
|
+
按照总 Token 数量计费。
|
3917
|
+
:type Usage: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
|
3918
|
+
:param _Note: 免责声明。
|
3919
|
+
:type Note: str
|
3920
|
+
:param _Id: 本次请求的 RequestId。
|
3921
|
+
:type Id: str
|
3922
|
+
:param _Choices: 回复内容。
|
3923
|
+
:type Choices: list of Choice
|
3924
|
+
:param _ErrorMsg: 错误信息。
|
3925
|
+
如果流式返回中服务处理异常,返回该错误信息。
|
3926
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
3927
|
+
:type ErrorMsg: :class:`tencentcloud.hunyuan.v20230901.models.ErrorMsg`
|
3928
|
+
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
3929
|
+
:type RequestId: str
|
3930
|
+
"""
|
3931
|
+
self._Created = None
|
3932
|
+
self._Usage = None
|
3933
|
+
self._Note = None
|
3934
|
+
self._Id = None
|
3935
|
+
self._Choices = None
|
3936
|
+
self._ErrorMsg = None
|
3937
|
+
self._RequestId = None
|
3938
|
+
|
3939
|
+
@property
|
3940
|
+
def Created(self):
|
3941
|
+
"""Unix 时间戳,单位为秒。
|
3942
|
+
:rtype: int
|
3943
|
+
"""
|
3944
|
+
return self._Created
|
3945
|
+
|
3946
|
+
@Created.setter
|
3947
|
+
def Created(self, Created):
|
3948
|
+
self._Created = Created
|
3949
|
+
|
3950
|
+
@property
|
3951
|
+
def Usage(self):
|
3952
|
+
"""Token 统计信息。
|
3953
|
+
按照总 Token 数量计费。
|
3954
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
|
3955
|
+
"""
|
3956
|
+
return self._Usage
|
3957
|
+
|
3958
|
+
@Usage.setter
|
3959
|
+
def Usage(self, Usage):
|
3960
|
+
self._Usage = Usage
|
3961
|
+
|
3962
|
+
@property
|
3963
|
+
def Note(self):
|
3964
|
+
"""免责声明。
|
3965
|
+
:rtype: str
|
3966
|
+
"""
|
3967
|
+
return self._Note
|
3968
|
+
|
3969
|
+
@Note.setter
|
3970
|
+
def Note(self, Note):
|
3971
|
+
self._Note = Note
|
3972
|
+
|
3973
|
+
@property
|
3974
|
+
def Id(self):
|
3975
|
+
"""本次请求的 RequestId。
|
3976
|
+
:rtype: str
|
3977
|
+
"""
|
3978
|
+
return self._Id
|
3979
|
+
|
3980
|
+
@Id.setter
|
3981
|
+
def Id(self, Id):
|
3982
|
+
self._Id = Id
|
3983
|
+
|
3984
|
+
@property
|
3985
|
+
def Choices(self):
|
3986
|
+
"""回复内容。
|
3987
|
+
:rtype: list of Choice
|
3988
|
+
"""
|
3989
|
+
return self._Choices
|
3990
|
+
|
3991
|
+
@Choices.setter
|
3992
|
+
def Choices(self, Choices):
|
3993
|
+
self._Choices = Choices
|
3994
|
+
|
3995
|
+
@property
|
3996
|
+
def ErrorMsg(self):
|
3997
|
+
"""错误信息。
|
3998
|
+
如果流式返回中服务处理异常,返回该错误信息。
|
3999
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
4000
|
+
:rtype: :class:`tencentcloud.hunyuan.v20230901.models.ErrorMsg`
|
4001
|
+
"""
|
4002
|
+
return self._ErrorMsg
|
4003
|
+
|
4004
|
+
@ErrorMsg.setter
|
4005
|
+
def ErrorMsg(self, ErrorMsg):
|
4006
|
+
self._ErrorMsg = ErrorMsg
|
4007
|
+
|
4008
|
+
@property
|
4009
|
+
def RequestId(self):
|
4010
|
+
"""唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
4011
|
+
:rtype: str
|
4012
|
+
"""
|
4013
|
+
return self._RequestId
|
4014
|
+
|
4015
|
+
@RequestId.setter
|
4016
|
+
def RequestId(self, RequestId):
|
4017
|
+
self._RequestId = RequestId
|
4018
|
+
|
4019
|
+
|
4020
|
+
def _deserialize(self, params):
|
4021
|
+
self._Created = params.get("Created")
|
4022
|
+
if params.get("Usage") is not None:
|
4023
|
+
self._Usage = Usage()
|
4024
|
+
self._Usage._deserialize(params.get("Usage"))
|
4025
|
+
self._Note = params.get("Note")
|
4026
|
+
self._Id = params.get("Id")
|
4027
|
+
if params.get("Choices") is not None:
|
4028
|
+
self._Choices = []
|
4029
|
+
for item in params.get("Choices"):
|
4030
|
+
obj = Choice()
|
4031
|
+
obj._deserialize(item)
|
4032
|
+
self._Choices.append(obj)
|
4033
|
+
if params.get("ErrorMsg") is not None:
|
4034
|
+
self._ErrorMsg = ErrorMsg()
|
4035
|
+
self._ErrorMsg._deserialize(params.get("ErrorMsg"))
|
4036
|
+
self._RequestId = params.get("RequestId")
|
4037
|
+
|
4038
|
+
|
3729
4039
|
class ImageUrl(AbstractModel):
|
3730
4040
|
"""具体的图片内容
|
3731
4041
|
|
@@ -6130,9 +6440,15 @@ class SubmitHunyuanTo3DJobRequest(AbstractModel):
|
|
6130
6440
|
r"""
|
6131
6441
|
:param _Prompt: 3D内容的描述,中文正向提示词。最多支持200个 utf-8 字符,ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
|
6132
6442
|
:type Prompt: str
|
6133
|
-
:param _ImageBase64: 输入图 Base64
|
6443
|
+
:param _ImageBase64: 输入图 Base64 数据。
|
6444
|
+
大小:单边分辨率要求不小于50,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)
|
6445
|
+
格式:jpg,png,jpeg,webp。
|
6446
|
+
ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
|
6134
6447
|
:type ImageBase64: str
|
6135
|
-
:param _ImageUrl: 输入图Url
|
6448
|
+
:param _ImageUrl: 输入图Url。
|
6449
|
+
大小:单边分辨率要求不小于50,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)
|
6450
|
+
格式:jpg,png,jpeg,webp。
|
6451
|
+
ImageBase64/ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
|
6136
6452
|
:type ImageUrl: str
|
6137
6453
|
:param _Num: 生成数量。默认1,当前限制只能为1。
|
6138
6454
|
:type Num: int
|
@@ -6155,7 +6471,10 @@ class SubmitHunyuanTo3DJobRequest(AbstractModel):
|
|
6155
6471
|
|
6156
6472
|
@property
|
6157
6473
|
def ImageBase64(self):
|
6158
|
-
"""输入图 Base64
|
6474
|
+
"""输入图 Base64 数据。
|
6475
|
+
大小:单边分辨率要求不小于50,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)
|
6476
|
+
格式:jpg,png,jpeg,webp。
|
6477
|
+
ImageBase64、ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
|
6159
6478
|
:rtype: str
|
6160
6479
|
"""
|
6161
6480
|
return self._ImageBase64
|
@@ -6166,7 +6485,10 @@ class SubmitHunyuanTo3DJobRequest(AbstractModel):
|
|
6166
6485
|
|
6167
6486
|
@property
|
6168
6487
|
def ImageUrl(self):
|
6169
|
-
"""输入图Url
|
6488
|
+
"""输入图Url。
|
6489
|
+
大小:单边分辨率要求不小于50,不大于5000。大小不超过8m(base64编码后会大30%左右,建议实际输入图片不超过6m)
|
6490
|
+
格式:jpg,png,jpeg,webp。
|
6491
|
+
ImageBase64/ImageUrl和 Prompt必填其一,且Prompt和ImageBase64/ImageUrl不能同时存在。
|
6170
6492
|
:rtype: str
|
6171
6493
|
"""
|
6172
6494
|
return self._ImageUrl
|
@@ -6209,7 +6531,7 @@ class SubmitHunyuanTo3DJobResponse(AbstractModel):
|
|
6209
6531
|
|
6210
6532
|
def __init__(self):
|
6211
6533
|
r"""
|
6212
|
-
:param _JobId: 任务id
|
6534
|
+
:param _JobId: 任务id(有效期24小时)
|
6213
6535
|
:type JobId: str
|
6214
6536
|
:param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
6215
6537
|
:type RequestId: str
|
@@ -6219,7 +6541,7 @@ class SubmitHunyuanTo3DJobResponse(AbstractModel):
|
|
6219
6541
|
|
6220
6542
|
@property
|
6221
6543
|
def JobId(self):
|
6222
|
-
"""任务id
|
6544
|
+
"""任务id(有效期24小时)
|
6223
6545
|
:rtype: str
|
6224
6546
|
"""
|
6225
6547
|
return self._JobId
|
@@ -246,28 +246,33 @@ class AnalyzeFaceRequest(AbstractModel):
|
|
246
246
|
|
247
247
|
def __init__(self):
|
248
248
|
r"""
|
249
|
-
:param _Mode: 检测模式。
|
249
|
+
:param _Mode: 检测模式。
|
250
|
+
- 取值范围:0 为检测所有出现的人脸, 1 为检测面积最大的人脸。
|
251
|
+
- 默认为 0。
|
252
|
+
- 最多返回 10 张人脸的五官定位(人脸关键点)具体信息。
|
250
253
|
:type Mode: int
|
251
|
-
:param _Image: 图片 base64
|
252
|
-
|
254
|
+
:param _Image: 图片 base64 数据。
|
255
|
+
- base64 编码后大小不可超过5M。
|
256
|
+
- 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
|
253
257
|
:type Image: str
|
254
|
-
:param _Url: 图片的 Url
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
258
|
+
:param _Url: 图片的 Url 。
|
259
|
+
- 对应图片 base64 编码后大小不可超过5M。
|
260
|
+
- Url、Image必须提供一个,如果都提供,只使用 Url。
|
261
|
+
- 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。
|
262
|
+
- 非腾讯云存储的Url速度和稳定性可能受一定影响。
|
263
|
+
- 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
|
259
264
|
:type Url: str
|
260
265
|
:param _FaceModelVersion: 人脸识别服务所用的算法模型版本。
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
2020年11月26日后开通服务的账号仅支持输入“3.0”。
|
267
|
-
|
268
|
-
不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。
|
266
|
+
- 目前入参支持 “2.0”和“3.0“ 两个输入。
|
267
|
+
- 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。
|
268
|
+
- 2020年11月26日后开通服务的账号仅支持输入“3.0”。
|
269
|
+
- 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。
|
269
270
|
:type FaceModelVersion: str
|
270
|
-
:param _NeedRotateDetection: 是否开启图片旋转识别支持。
|
271
|
+
:param _NeedRotateDetection: 是否开启图片旋转识别支持。
|
272
|
+
- 取值范围:0为不开启,1为开启。
|
273
|
+
- 默认为0。
|
274
|
+
- 本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。
|
275
|
+
- 若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。
|
271
276
|
:type NeedRotateDetection: int
|
272
277
|
"""
|
273
278
|
self._Mode = None
|
@@ -278,7 +283,10 @@ Url、Image必须提供一个,如果都提供,只使用 Url。
|
|
278
283
|
|
279
284
|
@property
|
280
285
|
def Mode(self):
|
281
|
-
"""检测模式。
|
286
|
+
"""检测模式。
|
287
|
+
- 取值范围:0 为检测所有出现的人脸, 1 为检测面积最大的人脸。
|
288
|
+
- 默认为 0。
|
289
|
+
- 最多返回 10 张人脸的五官定位(人脸关键点)具体信息。
|
282
290
|
:rtype: int
|
283
291
|
"""
|
284
292
|
return self._Mode
|
@@ -289,8 +297,9 @@ Url、Image必须提供一个,如果都提供,只使用 Url。
|
|
289
297
|
|
290
298
|
@property
|
291
299
|
def Image(self):
|
292
|
-
"""图片 base64
|
293
|
-
|
300
|
+
"""图片 base64 数据。
|
301
|
+
- base64 编码后大小不可超过5M。
|
302
|
+
- 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
|
294
303
|
:rtype: str
|
295
304
|
"""
|
296
305
|
return self._Image
|
@@ -301,11 +310,12 @@ Url、Image必须提供一个,如果都提供,只使用 Url。
|
|
301
310
|
|
302
311
|
@property
|
303
312
|
def Url(self):
|
304
|
-
"""图片的 Url
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
313
|
+
"""图片的 Url 。
|
314
|
+
- 对应图片 base64 编码后大小不可超过5M。
|
315
|
+
- Url、Image必须提供一个,如果都提供,只使用 Url。
|
316
|
+
- 图片存储于腾讯云的Url可保障更高下载速度和稳定性,建议图片存储于腾讯云。
|
317
|
+
- 非腾讯云存储的Url速度和稳定性可能受一定影响。
|
318
|
+
- 支持PNG、JPG、JPEG、BMP,不支持 GIF 图片。
|
309
319
|
:rtype: str
|
310
320
|
"""
|
311
321
|
return self._Url
|
@@ -317,14 +327,10 @@ Url、Image必须提供一个,如果都提供,只使用 Url。
|
|
317
327
|
@property
|
318
328
|
def FaceModelVersion(self):
|
319
329
|
"""人脸识别服务所用的算法模型版本。
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
2020年11月26日后开通服务的账号仅支持输入“3.0”。
|
326
|
-
|
327
|
-
不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。
|
330
|
+
- 目前入参支持 “2.0”和“3.0“ 两个输入。
|
331
|
+
- 2020年4月2日开始,默认为“3.0”,之前使用过本接口的账号若未填写本参数默认为“2.0”。
|
332
|
+
- 2020年11月26日后开通服务的账号仅支持输入“3.0”。
|
333
|
+
- 不同算法模型版本对应的人脸识别算法不同,新版本的整体效果会优于旧版本,建议使用“3.0”版本。
|
328
334
|
:rtype: str
|
329
335
|
"""
|
330
336
|
return self._FaceModelVersion
|
@@ -335,7 +341,11 @@ Url、Image必须提供一个,如果都提供,只使用 Url。
|
|
335
341
|
|
336
342
|
@property
|
337
343
|
def NeedRotateDetection(self):
|
338
|
-
"""是否开启图片旋转识别支持。
|
344
|
+
"""是否开启图片旋转识别支持。
|
345
|
+
- 取值范围:0为不开启,1为开启。
|
346
|
+
- 默认为0。
|
347
|
+
- 本参数的作用为,当图片中的人脸被旋转且图片没有exif信息时,如果不开启图片旋转识别支持则无法正确检测、识别图片中的人脸。
|
348
|
+
- 若您确认图片包含exif信息或者您确认输入图中人脸不会出现被旋转情况,请不要开启本参数。开启后,整体耗时将可能增加数百毫秒。
|
339
349
|
:rtype: int
|
340
350
|
"""
|
341
351
|
return self._NeedRotateDetection
|
@@ -1681,6 +1681,8 @@ class DescribeInstanceBackupsResponse(AbstractModel):
|
|
1681
1681
|
|
1682
1682
|
@property
|
1683
1683
|
def BackupSet(self):
|
1684
|
+
warnings.warn("parameter `BackupSet` is deprecated", DeprecationWarning)
|
1685
|
+
|
1684
1686
|
"""废弃字段。
|
1685
1687
|
:rtype: list of BinlogInfo
|
1686
1688
|
"""
|
@@ -1688,6 +1690,8 @@ class DescribeInstanceBackupsResponse(AbstractModel):
|
|
1688
1690
|
|
1689
1691
|
@BackupSet.setter
|
1690
1692
|
def BackupSet(self, BackupSet):
|
1693
|
+
warnings.warn("parameter `BackupSet` is deprecated", DeprecationWarning)
|
1694
|
+
|
1691
1695
|
self._BackupSet = BackupSet
|
1692
1696
|
|
1693
1697
|
@property
|
@@ -6587,7 +6587,7 @@ class DescribeFirewallTemplatesRequest(AbstractModel):
|
|
6587
6587
|
<li>template-type</li>按照【防火墙模板的类型】进行过滤。
|
6588
6588
|
类型:String
|
6589
6589
|
必选:否
|
6590
|
-
取值: "PRIVATE"(
|
6590
|
+
取值: "PRIVATE"(个人模板)
|
6591
6591
|
每次请求的 Filters 的上限为 10,Filter.Values 的上限为 100。参数不支持同时指定 TemplateIds 和 Filters。
|
6592
6592
|
:type Filters: list of Filter
|
6593
6593
|
:param _Offset: 偏移量,默认为 0。
|
@@ -6623,7 +6623,7 @@ class DescribeFirewallTemplatesRequest(AbstractModel):
|
|
6623
6623
|
<li>template-type</li>按照【防火墙模板的类型】进行过滤。
|
6624
6624
|
类型:String
|
6625
6625
|
必选:否
|
6626
|
-
取值: "PRIVATE"(
|
6626
|
+
取值: "PRIVATE"(个人模板)
|
6627
6627
|
每次请求的 Filters 的上限为 10,Filter.Values 的上限为 100。参数不支持同时指定 TemplateIds 和 Filters。
|
6628
6628
|
:rtype: list of Filter
|
6629
6629
|
"""
|
@@ -11160,7 +11160,7 @@ class FirewallTemplate(AbstractModel):
|
|
11160
11160
|
:type TemplateId: str
|
11161
11161
|
:param _TemplateName: 模板名称。
|
11162
11162
|
:type TemplateName: str
|
11163
|
-
:param _TemplateType: 模板类型。取值: "PRIVATE"(
|
11163
|
+
:param _TemplateType: 模板类型。取值: "PRIVATE"(个人模板)
|
11164
11164
|
:type TemplateType: str
|
11165
11165
|
:param _TemplateState: 模板状态。取值: "NORMAL"(正常)
|
11166
11166
|
:type TemplateState: str
|
@@ -11197,7 +11197,7 @@ class FirewallTemplate(AbstractModel):
|
|
11197
11197
|
|
11198
11198
|
@property
|
11199
11199
|
def TemplateType(self):
|
11200
|
-
"""模板类型。取值: "PRIVATE"(
|
11200
|
+
"""模板类型。取值: "PRIVATE"(个人模板)
|
11201
11201
|
:rtype: str
|
11202
11202
|
"""
|
11203
11203
|
return self._TemplateType
|
@@ -9272,6 +9272,8 @@ class ModifyDBInstanceSpecRequest(AbstractModel):
|
|
9272
9272
|
|
9273
9273
|
@property
|
9274
9274
|
def OplogSize(self):
|
9275
|
+
warnings.warn("parameter `OplogSize` is deprecated", DeprecationWarning)
|
9276
|
+
|
9275
9277
|
"""(已废弃) 请使用ResizeOplog独立接口完成。
|
9276
9278
|
|
9277
9279
|
实例配置变更后 Oplog 的大小。
|
@@ -9283,6 +9285,8 @@ class ModifyDBInstanceSpecRequest(AbstractModel):
|
|
9283
9285
|
|
9284
9286
|
@OplogSize.setter
|
9285
9287
|
def OplogSize(self, OplogSize):
|
9288
|
+
warnings.warn("parameter `OplogSize` is deprecated", DeprecationWarning)
|
9289
|
+
|
9286
9290
|
self._OplogSize = OplogSize
|
9287
9291
|
|
9288
9292
|
@property
|