tencentcloud-sdk-python 3.0.1135__py2.py3-none-any.whl → 3.0.1137__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.
Files changed (45) hide show
  1. tencentcloud/__init__.py +1 -1
  2. tencentcloud/aiart/v20221229/models.py +38 -34
  3. tencentcloud/apm/v20210622/apm_client.py +69 -0
  4. tencentcloud/apm/v20210622/errorcodes.py +27 -0
  5. tencentcloud/apm/v20210622/models.py +639 -0
  6. tencentcloud/ccc/v20200210/models.py +1 -1
  7. tencentcloud/cfs/v20190719/models.py +19 -5
  8. tencentcloud/cfw/v20190904/cfw_client.py +1 -1
  9. tencentcloud/cloudstudio/v20230508/models.py +49 -37
  10. tencentcloud/cls/v20201016/models.py +72 -20
  11. tencentcloud/cynosdb/v20190107/cynosdb_client.py +23 -0
  12. tencentcloud/cynosdb/v20190107/models.py +190 -2
  13. tencentcloud/dcdb/v20180411/dcdb_client.py +1 -1
  14. tencentcloud/ess/v20201111/models.py +98 -1
  15. tencentcloud/essbasic/v20210526/models.py +97 -0
  16. tencentcloud/faceid/v20180301/models.py +56 -7
  17. tencentcloud/hunyuan/v20230901/errorcodes.py +3 -3
  18. tencentcloud/hunyuan/v20230901/hunyuan_client.py +26 -4
  19. tencentcloud/hunyuan/v20230901/models.py +263 -17
  20. tencentcloud/ims/v20200713/errorcodes.py +3 -0
  21. tencentcloud/ims/v20201229/errorcodes.py +3 -0
  22. tencentcloud/ims/v20201229/ims_client.py +2 -3
  23. tencentcloud/ims/v20201229/models.py +12 -12
  24. tencentcloud/iotexplorer/v20190423/iotexplorer_client.py +23 -0
  25. tencentcloud/iotexplorer/v20190423/models.py +145 -0
  26. tencentcloud/iss/v20230517/models.py +48 -0
  27. tencentcloud/lcic/v20220817/models.py +1 -1
  28. tencentcloud/lke/v20231130/errorcodes.py +0 -12
  29. tencentcloud/lke/v20231130/lke_client.py +0 -46
  30. tencentcloud/lke/v20231130/models.py +0 -242
  31. tencentcloud/mariadb/v20170312/mariadb_client.py +1 -1
  32. tencentcloud/monitor/v20180724/monitor_client.py +1 -1
  33. tencentcloud/mps/v20190612/models.py +70 -0
  34. tencentcloud/rum/v20210622/models.py +1 -1
  35. tencentcloud/tdid/v20210519/tdid_client.py +1 -1
  36. tencentcloud/teo/v20220901/errorcodes.py +9 -0
  37. tencentcloud/teo/v20220901/models.py +198 -35
  38. tencentcloud/tione/v20211111/models.py +49 -0
  39. tencentcloud/tmt/v20180321/models.py +1 -1
  40. tencentcloud/waf/v20180125/models.py +1 -1
  41. {tencentcloud_sdk_python-3.0.1135.dist-info → tencentcloud_sdk_python-3.0.1137.dist-info}/METADATA +1 -1
  42. {tencentcloud_sdk_python-3.0.1135.dist-info → tencentcloud_sdk_python-3.0.1137.dist-info}/RECORD +45 -45
  43. {tencentcloud_sdk_python-3.0.1135.dist-info → tencentcloud_sdk_python-3.0.1137.dist-info}/LICENSE +0 -0
  44. {tencentcloud_sdk_python-3.0.1135.dist-info → tencentcloud_sdk_python-3.0.1137.dist-info}/WHEEL +0 -0
  45. {tencentcloud_sdk_python-3.0.1135.dist-info → tencentcloud_sdk_python-3.0.1137.dist-info}/top_level.txt +0 -0
@@ -18,6 +18,246 @@ import warnings
18
18
  from tencentcloud.common.abstract_model import AbstractModel
19
19
 
20
20
 
21
+ class ChatCompletionsRequest(AbstractModel):
22
+ """ChatCompletions请求参数结构体
23
+
24
+ """
25
+
26
+ def __init__(self):
27
+ r"""
28
+ :param _Model: 模型名称,可选值包括 hunyuan-lite、hunyuan-standard、hunyuan-pro。
29
+ 各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。
30
+
31
+ 注意:
32
+ 不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
33
+ :type Model: str
34
+ :param _Messages: 聊天上下文信息。
35
+ 说明:
36
+ 1. 长度最多为 40,按对话时间从旧到新在数组中排列。
37
+ 2. Message.Role 可选值:system、user、assistant。
38
+ 其中,system 角色可选,如存在则必须位于列表的最开始。user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。
39
+ 3. Messages 中 Content 总长度不超过 16000 Token,超过则会截断最前面的内容,只保留尾部内容。建议不超过 4000 Token。
40
+ :type Messages: list of Message
41
+ :param _Stream: 流式调用开关。
42
+ 说明:
43
+ 1. 未传值时默认为非流式调用(false)。
44
+ 2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。
45
+ 3. 非流式调用时:
46
+ 调用方式与普通 HTTP 请求无异。
47
+ 接口响应耗时较长,**如需更低时延建议设置为 true**。
48
+ 只返回一次最终结果(返回值取 Choices[n].Message 中的值)。
49
+
50
+ 注意:
51
+ 通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
52
+ :type Stream: bool
53
+ :param _StreamModeration: 流式输出审核开关。
54
+ 说明:
55
+ 1. 输出审核有流式和同步两种模式,**流式模式首包响应更快**。
56
+ 2. 当使用流式输出(Stream 字段值为 true)时,该字段生效。
57
+ 3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 FinishReason 值为 sensitive。
58
+ 4. 如果未传值或值为 false,则不使用流式输出审核,需要审核完所有输出内容后再返回结果。
59
+
60
+ 注意:
61
+ 当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 FinishReason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
62
+ :type StreamModeration: bool
63
+ :param _TopP: 说明:
64
+ 1. 影响输出文本的多样性,取值越大,生成文本的多样性越强。
65
+ 2. 默认 1.0,取值区间为 [0.0, 1.0]。
66
+ 3. 非必要不建议使用,不合理的取值会影响效果。
67
+ :type TopP: float
68
+ :param _Temperature: 说明:
69
+ 1. 较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定。
70
+ 2. 默认 1.0,取值区间为 [0.0, 2.0]。
71
+ 3. 非必要不建议使用,不合理的取值会影响效果。
72
+ :type Temperature: float
73
+ """
74
+ self._Model = None
75
+ self._Messages = None
76
+ self._Stream = None
77
+ self._StreamModeration = None
78
+ self._TopP = None
79
+ self._Temperature = None
80
+
81
+ @property
82
+ def Model(self):
83
+ return self._Model
84
+
85
+ @Model.setter
86
+ def Model(self, Model):
87
+ self._Model = Model
88
+
89
+ @property
90
+ def Messages(self):
91
+ return self._Messages
92
+
93
+ @Messages.setter
94
+ def Messages(self, Messages):
95
+ self._Messages = Messages
96
+
97
+ @property
98
+ def Stream(self):
99
+ return self._Stream
100
+
101
+ @Stream.setter
102
+ def Stream(self, Stream):
103
+ self._Stream = Stream
104
+
105
+ @property
106
+ def StreamModeration(self):
107
+ return self._StreamModeration
108
+
109
+ @StreamModeration.setter
110
+ def StreamModeration(self, StreamModeration):
111
+ self._StreamModeration = StreamModeration
112
+
113
+ @property
114
+ def TopP(self):
115
+ return self._TopP
116
+
117
+ @TopP.setter
118
+ def TopP(self, TopP):
119
+ self._TopP = TopP
120
+
121
+ @property
122
+ def Temperature(self):
123
+ return self._Temperature
124
+
125
+ @Temperature.setter
126
+ def Temperature(self, Temperature):
127
+ self._Temperature = Temperature
128
+
129
+
130
+ def _deserialize(self, params):
131
+ self._Model = params.get("Model")
132
+ if params.get("Messages") is not None:
133
+ self._Messages = []
134
+ for item in params.get("Messages"):
135
+ obj = Message()
136
+ obj._deserialize(item)
137
+ self._Messages.append(obj)
138
+ self._Stream = params.get("Stream")
139
+ self._StreamModeration = params.get("StreamModeration")
140
+ self._TopP = params.get("TopP")
141
+ self._Temperature = params.get("Temperature")
142
+ memeber_set = set(params.keys())
143
+ for name, value in vars(self).items():
144
+ property_name = name[1:]
145
+ if property_name in memeber_set:
146
+ memeber_set.remove(property_name)
147
+ if len(memeber_set) > 0:
148
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
149
+
150
+
151
+
152
+ class ChatCompletionsResponse(AbstractModel):
153
+ """ChatCompletions返回参数结构体
154
+
155
+ """
156
+
157
+ def __init__(self):
158
+ r"""
159
+ :param _Created: Unix 时间戳,单位为秒。
160
+ :type Created: int
161
+ :param _Usage: Token 统计信息。
162
+ 按照总 Token 数量计费。
163
+ :type Usage: :class:`tencentcloud.hunyuan.v20230901.models.Usage`
164
+ :param _Note: 免责声明。
165
+ :type Note: str
166
+ :param _Id: 本轮对话的 ID。
167
+ :type Id: str
168
+ :param _Choices: 回复内容。
169
+ :type Choices: list of Choice
170
+ :param _ErrorMsg: 错误信息。
171
+ 如果流式返回中服务处理异常,返回该错误信息。
172
+ 注意:此字段可能返回 null,表示取不到有效值。
173
+ :type ErrorMsg: :class:`tencentcloud.hunyuan.v20230901.models.ErrorMsg`
174
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
175
+ :type RequestId: str
176
+ """
177
+ self._Created = None
178
+ self._Usage = None
179
+ self._Note = None
180
+ self._Id = None
181
+ self._Choices = None
182
+ self._ErrorMsg = None
183
+ self._RequestId = None
184
+
185
+ @property
186
+ def Created(self):
187
+ return self._Created
188
+
189
+ @Created.setter
190
+ def Created(self, Created):
191
+ self._Created = Created
192
+
193
+ @property
194
+ def Usage(self):
195
+ return self._Usage
196
+
197
+ @Usage.setter
198
+ def Usage(self, Usage):
199
+ self._Usage = Usage
200
+
201
+ @property
202
+ def Note(self):
203
+ return self._Note
204
+
205
+ @Note.setter
206
+ def Note(self, Note):
207
+ self._Note = Note
208
+
209
+ @property
210
+ def Id(self):
211
+ return self._Id
212
+
213
+ @Id.setter
214
+ def Id(self, Id):
215
+ self._Id = Id
216
+
217
+ @property
218
+ def Choices(self):
219
+ return self._Choices
220
+
221
+ @Choices.setter
222
+ def Choices(self, Choices):
223
+ self._Choices = Choices
224
+
225
+ @property
226
+ def ErrorMsg(self):
227
+ return self._ErrorMsg
228
+
229
+ @ErrorMsg.setter
230
+ def ErrorMsg(self, ErrorMsg):
231
+ self._ErrorMsg = ErrorMsg
232
+
233
+ @property
234
+ def RequestId(self):
235
+ return self._RequestId
236
+
237
+ @RequestId.setter
238
+ def RequestId(self, RequestId):
239
+ self._RequestId = RequestId
240
+
241
+
242
+ def _deserialize(self, params):
243
+ self._Created = params.get("Created")
244
+ if params.get("Usage") is not None:
245
+ self._Usage = Usage()
246
+ self._Usage._deserialize(params.get("Usage"))
247
+ self._Note = params.get("Note")
248
+ self._Id = params.get("Id")
249
+ if params.get("Choices") is not None:
250
+ self._Choices = []
251
+ for item in params.get("Choices"):
252
+ obj = Choice()
253
+ obj._deserialize(item)
254
+ self._Choices.append(obj)
255
+ if params.get("ErrorMsg") is not None:
256
+ self._ErrorMsg = ErrorMsg()
257
+ self._ErrorMsg._deserialize(params.get("ErrorMsg"))
258
+ self._RequestId = params.get("RequestId")
259
+
260
+
21
261
  class ChatProRequest(AbstractModel):
22
262
  """ChatPro请求参数结构体
23
263
 
@@ -38,7 +278,7 @@ class ChatProRequest(AbstractModel):
38
278
  :type TopP: float
39
279
  :param _Temperature: 说明:
40
280
  1. 较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定。
41
- 2. 默认 1.0,取值区间为 [0.02.0]。
281
+ 2. 默认 1.0,取值区间为 [0.0, 2.0]。
42
282
  3. 非必要不建议使用,不合理的取值会影响效果。
43
283
  :type Temperature: float
44
284
  :param _Stream: 流式调用开关。
@@ -47,16 +287,19 @@ class ChatProRequest(AbstractModel):
47
287
  2. 流式调用时以 SSE 协议增量返回结果。
48
288
  3. 非流式调用时接口响应耗时较长,非必要不建议使用。
49
289
  4. 非流式调用时只返回一次最终结果,调用方式与普通 HTTP 请求无异。
290
+
291
+ 注意:
292
+ 通过 SDK 调用时,流式和非流式调用需要用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
50
293
  :type Stream: bool
51
294
  :param _StreamModeration: 流式输出审核开关。
52
295
  说明:
53
- 1. 当 Stream 字段值为 true 时,该字段有效。
54
- 2. 未传值时默认不使用流式输出审核。
55
- 3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 finish_reason 值为 sensitive。
56
- 4. 如果值为 false,则需要审核完所有输出内容后再返回结果。
296
+ 1. 输出审核有流式和同步两种模式,**流式模式首包响应更快**。
297
+ 2. 当使用流式输出(Stream 字段值为 true)时,该字段生效。
298
+ 3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 FinishReason 值为 sensitive。
299
+ 4. 如果未传值或值为 false,则不使用流式输出审核,需要审核完所有输出内容后再返回结果。
57
300
 
58
301
  注意:
59
- 当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 finish_reason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
302
+ 当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 FinishReason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
60
303
  :type StreamModeration: bool
61
304
  """
62
305
  self._Messages = None
@@ -257,7 +500,7 @@ class ChatStdRequest(AbstractModel):
257
500
  :type TopP: float
258
501
  :param _Temperature: 说明:
259
502
  1. 较高的数值会使输出更加随机,而较低的数值会使其更加集中和确定。
260
- 2. 默认 1.0,取值区间为 [0.02.0]。
503
+ 2. 默认 1.0,取值区间为 [0.0, 2.0]。
261
504
  3. 非必要不建议使用,不合理的取值会影响效果。
262
505
  :type Temperature: float
263
506
  :param _Stream: 流式调用开关。
@@ -266,16 +509,19 @@ class ChatStdRequest(AbstractModel):
266
509
  2. 流式调用时以 SSE 协议增量返回结果。
267
510
  3. 非流式调用时接口响应耗时较长,非必要不建议使用。
268
511
  4. 非流式调用时只返回一次最终结果,调用方式与普通 HTTP 请求无异。
512
+
513
+ 注意:
514
+ 通过 SDK 调用时,流式和非流式调用需要用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。
269
515
  :type Stream: bool
270
516
  :param _StreamModeration: 流式输出审核开关。
271
517
  说明:
272
- 1. 当 Stream 字段值为 true 时,该字段有效。
273
- 2. 未传值时默认不使用流式输出审核。
274
- 3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 finish_reason 值为 sensitive。
275
- 4. 如果值为 false,则需要审核完所有输出内容后再返回结果。
518
+ 1. 输出审核有流式和同步两种模式,**流式模式首包响应更快**。
519
+ 2. 当使用流式输出(Stream 字段值为 true)时,该字段生效。
520
+ 3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 FinishReason 值为 sensitive。
521
+ 4. 如果未传值或值为 false,则不使用流式输出审核,需要审核完所有输出内容后再返回结果。
276
522
 
277
523
  注意:
278
- 当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 finish_reason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
524
+ 当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 FinishReason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。
279
525
  :type StreamModeration: bool
280
526
  """
281
527
  self._Messages = None
@@ -564,7 +810,7 @@ class Delta(AbstractModel):
564
810
 
565
811
 
566
812
  class EmbeddingData(AbstractModel):
567
- """embedding 信息,当前不支持批量,所以数组元素数目为1。
813
+ """Embedding 信息。
568
814
 
569
815
  """
570
816
 
@@ -723,7 +969,7 @@ class GetEmbeddingRequest(AbstractModel):
723
969
 
724
970
  def __init__(self):
725
971
  r"""
726
- :param _Input: 输入文本。总长度不超过1024 个token, 超过则会截断最后面的内容。
972
+ :param _Input: 输入文本。总长度不超过 1024 个 Token,超过则会截断最后面的内容。
727
973
  :type Input: str
728
974
  """
729
975
  self._Input = None
@@ -756,9 +1002,9 @@ class GetEmbeddingResponse(AbstractModel):
756
1002
 
757
1003
  def __init__(self):
758
1004
  r"""
759
- :param _Data: 返回的 embedding 信息。
1005
+ :param _Data: 返回的 Embedding 信息。当前不支持批量,所以数组元素数目为 1。
760
1006
  :type Data: list of EmbeddingData
761
- :param _Usage: token 使用计数,按照总token数量收费。
1007
+ :param _Usage: Token 使用计数,按照总 Token 数量收费。
762
1008
  :type Usage: :class:`tencentcloud.hunyuan.v20230901.models.EmbeddingUsage`
763
1009
  :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
764
1010
  :type RequestId: str
@@ -908,7 +1154,7 @@ class Message(AbstractModel):
908
1154
  r"""
909
1155
  :param _Role: 角色
910
1156
  :type Role: str
911
- :param _Content: 消息内容
1157
+ :param _Content: 文本内容
912
1158
  :type Content: str
913
1159
  """
914
1160
  self._Role = None
@@ -98,6 +98,9 @@ RESOURCEUNAVAILABLE_IMAGEDOWNLOADERROR = 'ResourceUnavailable.ImageDownloadError
98
98
  # 图片资源错误。
99
99
  RESOURCEUNAVAILABLE_INVALIDIMAGECONTENT = 'ResourceUnavailable.InvalidImageContent'
100
100
 
101
+ # 模型调用失败,请重试。
102
+ RESOURCEUNAVAILABLE_MODELCALLFAILED = 'ResourceUnavailable.ModelCallFailed'
103
+
101
104
  # 资源售罄。
102
105
  RESOURCESSOLDOUT = 'ResourcesSoldOut'
103
106
 
@@ -101,6 +101,9 @@ RESOURCEUNAVAILABLE_IMAGEDOWNLOADERROR = 'ResourceUnavailable.ImageDownloadError
101
101
  # 图片资源错误。
102
102
  RESOURCEUNAVAILABLE_INVALIDIMAGECONTENT = 'ResourceUnavailable.InvalidImageContent'
103
103
 
104
+ # 模型调用失败,请重试。
105
+ RESOURCEUNAVAILABLE_MODELCALLFAILED = 'ResourceUnavailable.ModelCallFailed'
106
+
104
107
  # 资源售罄。
105
108
  RESOURCESSOLDOUT = 'ResourcesSoldOut'
106
109
 
@@ -85,13 +85,12 @@ class ImsClient(AbstractClient):
85
85
 
86
86
  ### 接口调用说明:
87
87
  - 图片文件大小支持:**文件 < 5M**
88
- - 图片尺寸支持:**长或者宽 >50分辨率**和**长或者宽<10000分辨率**
88
+ - 图片默认尺寸支持:**长或者宽 >50分辨率**和**长或者宽<10000分辨率**
89
89
  - 图片文件分辨率支持:建议**分辨率大于256x256**,否则可能会影响识别效果;
90
90
  - 图片文件支持格式:PNG、JPG、JPEG、BMP、GIF、WEBP格式;
91
91
  - 图片文件链接支持的传输协议:HTTP、HTTPS;
92
92
  - 若传入图片文件的访问链接,则需要注意**图片下载时间限制为3秒**,为保障被检测图片的稳定性和可靠性,建议您使用腾讯云COS存储或者CDN缓存等;
93
- - 默认接口请求频率限制:**100次/秒**,超过此调用频率则会报错。
94
- -审核列表中,排序是按照用户通过API接口上传调用的时间进行排序;
93
+
95
94
 
96
95
  <div class="rno-api-explorer" style="margin-bottom:20px">
97
96
  <div class="rno-api-explorer-inner">
@@ -319,7 +319,7 @@ class ImageModerationRequest(AbstractModel):
319
319
  :type DataId: str
320
320
  :param _FileContent: 该字段表示待检测图片文件内容的Base64编码,图片**大小不超过5MB**,建议**分辨率不低于256x256**,否则可能会影响识别效果。<br>备注: **该字段与FileUrl必须选择输入其中一个**。
321
321
  :type FileContent: str
322
- :param _FileUrl: 该字段表示待检测图片文件的访问链接,图片支持PNG、JPG、JPEG、BMP、GIF、WEBP格式,**大小不超过5MB**,建议**分辨率不低于256x256**;图片下载时间限制为3秒,超过则会返回下载超时;由于网络安全策略,**送审带重定向的链接,可能引起下载失败**,请尽量避免,比如Http返回302状态码的链接,可能导致接口返回ResourceUnavailable.ImageDownloadError。<br>备注:**该字段与FileContent必须选择输入其中一个**。
322
+ :param _FileUrl: 该字段表示待检测图片文件的访问链接。图片支持PNG、JPG、JPEG、BMP、GIF、WEBP格式,且**大小不得超过5MB**,建议**分辨率不低于256x256**。**图片下载时间限制为3秒,超时将进行一次重试,若再次失败,则会返回下载超时**。由于网络安全策略,**送审带重定向的链接**可能引起下载失败,请尽量避免使用返回302或其他非200状态码的HTTP链接,会导致接口返回 ResourceUnavailable.ImageDownloadError 错误。<br>备注:该字段与FileContent必须选择输入其中一个。
323
323
  :type FileUrl: str
324
324
  :param _Interval: **GIF/长图检测专用**,用于表示GIF截帧频率(每隔多少张图片抽取一帧进行检测),长图则按照长边:短边取整计算要切割的总图数;默认值为0,此时只会检测GIF的第一帧或对长图不进行切分处理。<br>备注:Interval与MaxFrames参数需要组合使用。例如,Interval=3, MaxFrames=400,则代表在检测GIF/长图时,将每间隔2帧检测一次且最多检测400帧。
325
325
  :type Interval: int
@@ -436,7 +436,7 @@ class ImageModerationResponse(AbstractModel):
436
436
  r"""
437
437
  :param _Suggestion: 该字段用于返回Label标签下的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
438
438
  :type Suggestion: str
439
- :param _Label: 该字段用于返回检测结果(LabelResults)中所对应的**优先级最高的恶意标签**,表示模型推荐的审核结果,建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
439
+ :param _Label: 该字段用于返回检测结果(LabelResults)中所对应的**优先级最高的恶意标签**,表示模型推荐的审核结果,建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
440
440
  :type Label: str
441
441
  :param _SubLabel: 该字段用于返回检测结果所命中优先级最高的恶意标签下的子标签名称,如:*色情--性行为*;若未命中任何子标签则返回空字符串。
442
442
  :type SubLabel: str
@@ -710,7 +710,7 @@ class LabelResult(AbstractModel):
710
710
  :type Scene: str
711
711
  :param _Suggestion: 该字段用于返回针对当前恶意标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
712
712
  :type Suggestion: str
713
- :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
713
+ :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
714
714
  :type Label: str
715
715
  :param _SubLabel: 该字段用于返回对应恶意标签下的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
716
716
  :type SubLabel: str
@@ -807,14 +807,14 @@ class LibDetail(AbstractModel):
807
807
  r"""
808
808
  :param _Id: 该字段用于返回识别对象的ID以方便识别和区分。
809
809
  :type Id: int
810
- :param _LibId: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
810
+ :param _LibId: 该字段用于返回自定义库的ID,以方便自定义库管理和配置。
811
811
  :type LibId: str
812
- :param _LibName: 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
812
+ :param _LibName: 该字段用于返回自定义库的名称,以方便自定义库管理和配置。
813
813
  注意:此字段可能返回 null,表示取不到有效值。
814
814
  :type LibName: str
815
815
  :param _ImageId: 该字段用于返回识别图像对象的ID以方便文件管理。
816
816
  :type ImageId: str
817
- :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
817
+ :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
818
818
  :type Label: str
819
819
  :param _Tag: 该字段用于返回其他自定义标签以满足您的定制化场景需求,若无需求则可略过。
820
820
  注意:此字段可能返回 null,表示取不到有效值。
@@ -916,7 +916,7 @@ class LibResult(AbstractModel):
916
916
  :type Scene: str
917
917
  :param _Suggestion: 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
918
918
  :type Suggestion: str
919
- :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
919
+ :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
920
920
  :type Label: str
921
921
  :param _SubLabel: 该字段用于返回恶意标签下对应的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
922
922
  注意:此字段可能返回 null,表示取不到有效值。
@@ -1205,7 +1205,7 @@ class ObjectResult(AbstractModel):
1205
1205
  :type Scene: str
1206
1206
  :param _Suggestion: 该字段用于返回针对当前恶意标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
1207
1207
  :type Suggestion: str
1208
- :param _Label: 该字段用于返回检测结果所对应的恶意标签,表示模型推荐的审核结果,建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
1208
+ :param _Label: 该字段用于返回检测结果所对应的恶意标签,表示模型推荐的审核结果,建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
1209
1209
  :type Label: str
1210
1210
  :param _SubLabel: 该字段用于返回当前恶意标签下对应的子标签的检测结果,如:*Porn-SexBehavior* 等子标签。
1211
1211
  :type SubLabel: str
@@ -1318,7 +1318,7 @@ class OcrResult(AbstractModel):
1318
1318
  :type Scene: str
1319
1319
  :param _Suggestion: 该字段用于返回优先级最高的恶意标签对应的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
1320
1320
  :type Suggestion: str
1321
- :param _Label: 该字段用于返回OCR检测结果所对应的优先级最高的恶意标签,表示模型推荐的审核结果,建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
1321
+ :param _Label: 该字段用于返回OCR检测结果所对应的优先级最高的恶意标签,表示模型推荐的审核结果,建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
1322
1322
  :type Label: str
1323
1323
  :param _SubLabel: 该字段用于返回当前标签(Label)下对应的子标签的检测结果,如:*Porn-SexBehavior*等子标签。
1324
1324
  :type SubLabel: str
@@ -1427,11 +1427,11 @@ class OcrTextDetail(AbstractModel):
1427
1427
  r"""
1428
1428
  :param _Text: 该字段用于返回OCR识别出的文本内容。<br>备注:OCR文本识别上限在**5000字节内**。
1429
1429
  :type Text: str
1430
- :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
1430
+ :param _Label: 该字段用于返回检测结果所对应的恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
1431
1431
  :type Label: str
1432
- :param _LibId: 该字段**仅当Label为Custom自定义关键词时有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
1432
+ :param _LibId: 该字段用于返回自定义库的ID,以方便自定义库管理和配置。
1433
1433
  :type LibId: str
1434
- :param _LibName: 该字段**仅当Label为Custom自定义关键词时有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
1434
+ :param _LibName: 该字段用于返回自定义库的名称,以方便自定义库管理和配置。
1435
1435
  :type LibName: str
1436
1436
  :param _Keywords: 该参数用于返回在当前label下命中的关键词。
1437
1437
  :type Keywords: list of str
@@ -1222,6 +1222,29 @@ class IotexplorerClient(AbstractClient):
1222
1222
  raise TencentCloudSDKException(type(e).__name__, str(e))
1223
1223
 
1224
1224
 
1225
+ def DescribeDeviceFirmwares(self, request):
1226
+ """获取设备当前固件信息
1227
+
1228
+ :param request: Request instance for DescribeDeviceFirmwares.
1229
+ :type request: :class:`tencentcloud.iotexplorer.v20190423.models.DescribeDeviceFirmwaresRequest`
1230
+ :rtype: :class:`tencentcloud.iotexplorer.v20190423.models.DescribeDeviceFirmwaresResponse`
1231
+
1232
+ """
1233
+ try:
1234
+ params = request._serialize()
1235
+ headers = request.headers
1236
+ body = self.call("DescribeDeviceFirmwares", params, headers=headers)
1237
+ response = json.loads(body)
1238
+ model = models.DescribeDeviceFirmwaresResponse()
1239
+ model._deserialize(response["Response"])
1240
+ return model
1241
+ except Exception as e:
1242
+ if isinstance(e, TencentCloudSDKException):
1243
+ raise
1244
+ else:
1245
+ raise TencentCloudSDKException(type(e).__name__, str(e))
1246
+
1247
+
1225
1248
  def DescribeDeviceLocationSolve(self, request):
1226
1249
  """获取实时位置解析
1227
1250
 
@@ -6371,6 +6371,94 @@ class DescribeDeviceFirmWareResponse(AbstractModel):
6371
6371
  self._RequestId = params.get("RequestId")
6372
6372
 
6373
6373
 
6374
+ class DescribeDeviceFirmwaresRequest(AbstractModel):
6375
+ """DescribeDeviceFirmwares请求参数结构体
6376
+
6377
+ """
6378
+
6379
+ def __init__(self):
6380
+ r"""
6381
+ :param _ProductId: 产品ID
6382
+ :type ProductId: str
6383
+ :param _DeviceName: 设备名
6384
+ :type DeviceName: str
6385
+ """
6386
+ self._ProductId = None
6387
+ self._DeviceName = None
6388
+
6389
+ @property
6390
+ def ProductId(self):
6391
+ return self._ProductId
6392
+
6393
+ @ProductId.setter
6394
+ def ProductId(self, ProductId):
6395
+ self._ProductId = ProductId
6396
+
6397
+ @property
6398
+ def DeviceName(self):
6399
+ return self._DeviceName
6400
+
6401
+ @DeviceName.setter
6402
+ def DeviceName(self, DeviceName):
6403
+ self._DeviceName = DeviceName
6404
+
6405
+
6406
+ def _deserialize(self, params):
6407
+ self._ProductId = params.get("ProductId")
6408
+ self._DeviceName = params.get("DeviceName")
6409
+ memeber_set = set(params.keys())
6410
+ for name, value in vars(self).items():
6411
+ property_name = name[1:]
6412
+ if property_name in memeber_set:
6413
+ memeber_set.remove(property_name)
6414
+ if len(memeber_set) > 0:
6415
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
6416
+
6417
+
6418
+
6419
+ class DescribeDeviceFirmwaresResponse(AbstractModel):
6420
+ """DescribeDeviceFirmwares返回参数结构体
6421
+
6422
+ """
6423
+
6424
+ def __init__(self):
6425
+ r"""
6426
+ :param _Firmwares: 固件信息列表
6427
+ 注意:此字段可能返回 null,表示取不到有效值。
6428
+ :type Firmwares: list of DeviceFirmwareInfo
6429
+ :param _RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
6430
+ :type RequestId: str
6431
+ """
6432
+ self._Firmwares = None
6433
+ self._RequestId = None
6434
+
6435
+ @property
6436
+ def Firmwares(self):
6437
+ return self._Firmwares
6438
+
6439
+ @Firmwares.setter
6440
+ def Firmwares(self, Firmwares):
6441
+ self._Firmwares = Firmwares
6442
+
6443
+ @property
6444
+ def RequestId(self):
6445
+ return self._RequestId
6446
+
6447
+ @RequestId.setter
6448
+ def RequestId(self, RequestId):
6449
+ self._RequestId = RequestId
6450
+
6451
+
6452
+ def _deserialize(self, params):
6453
+ if params.get("Firmwares") is not None:
6454
+ self._Firmwares = []
6455
+ for item in params.get("Firmwares"):
6456
+ obj = DeviceFirmwareInfo()
6457
+ obj._deserialize(item)
6458
+ self._Firmwares.append(obj)
6459
+ self._RequestId = params.get("RequestId")
6460
+
6461
+
6374
6462
  class DescribeDeviceLocationSolveRequest(AbstractModel):
6375
6463
  """DescribeDeviceLocationSolve请求参数结构体
6376
6464
 
@@ -8982,6 +9070,63 @@ class DeviceDataHistoryItem(AbstractModel):
8982
9070
 
8983
9071
 
8984
9072
 
9073
+ class DeviceFirmwareInfo(AbstractModel):
9074
+ """设备固件信息
9075
+
9076
+ """
9077
+
9078
+ def __init__(self):
9079
+ r"""
9080
+ :param _FwType: 固件类型
9081
+ :type FwType: str
9082
+ :param _Version: 固件版本
9083
+ :type Version: str
9084
+ :param _UpdateTime: 最后更新时间
9085
+ :type UpdateTime: int
9086
+ """
9087
+ self._FwType = None
9088
+ self._Version = None
9089
+ self._UpdateTime = None
9090
+
9091
+ @property
9092
+ def FwType(self):
9093
+ return self._FwType
9094
+
9095
+ @FwType.setter
9096
+ def FwType(self, FwType):
9097
+ self._FwType = FwType
9098
+
9099
+ @property
9100
+ def Version(self):
9101
+ return self._Version
9102
+
9103
+ @Version.setter
9104
+ def Version(self, Version):
9105
+ self._Version = Version
9106
+
9107
+ @property
9108
+ def UpdateTime(self):
9109
+ return self._UpdateTime
9110
+
9111
+ @UpdateTime.setter
9112
+ def UpdateTime(self, UpdateTime):
9113
+ self._UpdateTime = UpdateTime
9114
+
9115
+
9116
+ def _deserialize(self, params):
9117
+ self._FwType = params.get("FwType")
9118
+ self._Version = params.get("Version")
9119
+ self._UpdateTime = params.get("UpdateTime")
9120
+ memeber_set = set(params.keys())
9121
+ for name, value in vars(self).items():
9122
+ property_name = name[1:]
9123
+ if property_name in memeber_set:
9124
+ memeber_set.remove(property_name)
9125
+ if len(memeber_set) > 0:
9126
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
9127
+
9128
+
9129
+
8985
9130
  class DeviceInfo(AbstractModel):
8986
9131
  """设备详细信息
8987
9132