tencentcloud-sdk-nodejs-tms 4.0.769 → 4.0.772

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tencentcloud-sdk-nodejs-tms",
3
- "version": "4.0.769",
3
+ "version": "4.0.772",
4
4
  "description": "Tencent Cloud API NODEJS SDK",
5
5
  "main": "tencentcloud/index.js",
6
6
  "scripts": {
package/products.md CHANGED
@@ -20,7 +20,7 @@
20
20
  | asr | [语音识别](https://cloud.tencent.com/document/product/1093) | 2023-12-29 01:07:59 |
21
21
  | asw | [应用与服务编排工作流](https://cloud.tencent.com/document/product/1272) | 2023-05-18 01:04:02 |
22
22
  | ba | [ICP备案](https://cloud.tencent.com/document/product/243) | 2023-10-13 01:07:08 |
23
- | batch | [批量计算](https://cloud.tencent.com/document/product/599) | 2023-12-15 19:00:41 |
23
+ | batch | [批量计算](https://cloud.tencent.com/document/product/599) | 2024-01-01 00:02:00 |
24
24
  | bda | [人体分析](https://cloud.tencent.com/document/product/1208) | 2023-10-11 01:10:01 |
25
25
  | bi | [商业智能分析 BI](https://cloud.tencent.com/document/product/590) | 2023-12-22 01:07:03 |
26
26
  | billing | [费用中心](https://cloud.tencent.com/document/product/555) | 2023-12-27 01:07:34 |
@@ -40,15 +40,15 @@
40
40
  | cat | [云拨测](https://cloud.tencent.com/document/product/280) | 2023-12-29 01:09:11 |
41
41
  | cbs | [云硬盘](https://cloud.tencent.com/document/product/362) | 2023-12-27 01:08:57 |
42
42
  | ccc | [云联络中心](https://cloud.tencent.com/document/product/679) | 2023-12-22 01:08:08 |
43
- | cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2023-12-22 01:08:53 |
44
- | cdc | [本地专用集群](https://cloud.tencent.com/document/product/1346) | 2023-12-05 01:17:51 |
43
+ | cdb | [云数据库 MySQL](https://cloud.tencent.com/document/product/236) | 2024-01-01 00:03:28 |
44
+ | cdc | [本地专用集群](https://cloud.tencent.com/document/product/1346) | 2024-01-03 01:08:25 |
45
45
  | cdn | [内容分发网络 CDN](https://cloud.tencent.com/document/product/228) | 2023-10-27 01:17:34 |
46
46
  | cds | [T-Sec-数据安全审计(DSA)](https://cloud.tencent.com/document/product/856) | 2023-08-17 01:43:06 |
47
- | cdwch | [云数据仓库 ClickHouse](https://cloud.tencent.com/document/product/1299) | 2023-12-11 00:15:21 |
48
- | cdwdoris | [腾讯云数据仓库 TCHouse-D](https://cloud.tencent.com/document/product/1387) | 2023-12-26 01:09:04 |
47
+ | cdwch | [云数据仓库 ClickHouse](https://cloud.tencent.com/document/product/1299) | 2024-01-03 01:08:49 |
48
+ | cdwdoris | [腾讯云数据仓库 TCHouse-D](https://cloud.tencent.com/document/product/1387) | 2024-01-01 00:04:17 |
49
49
  | cdwpg | [云数据仓库 PostgreSQL](https://cloud.tencent.com/document/product/878) | 2023-12-15 19:11:22 |
50
50
  | cfg | [混沌演练平台](https://cloud.tencent.com/document/product/1500) | 2023-11-24 01:09:00 |
51
- | cfs | [文件存储](https://cloud.tencent.com/document/product/582) | 2023-11-10 01:10:02 |
51
+ | cfs | [文件存储](https://cloud.tencent.com/document/product/582) | 2024-01-03 01:09:01 |
52
52
  | cfw | [云防火墙](https://cloud.tencent.com/document/product/1132) | 2023-12-29 01:10:22 |
53
53
  | chdfs | [云 HDFS](https://cloud.tencent.com/document/product/1105) | 2023-08-17 01:47:49 |
54
54
  | ciam | [账号风控平台](https://cloud.tencent.com/document/product/1441) | 2023-07-06 01:13:25 |
@@ -69,8 +69,8 @@
69
69
  | cr | [金融联络机器人](https://cloud.tencent.com/document/product/656) | 2021-02-24 08:03:24 |
70
70
  | csip | [云安全一体化平台](https://cloud.tencent.com/document/product/664) | 2023-12-29 01:11:43 |
71
71
  | csxg | [5G入云服务](https://cloud.tencent.com/document/product/1687) | 2023-05-19 11:26:14 |
72
- | cvm | [云服务器](https://cloud.tencent.com/document/product/213) | 2023-12-22 01:11:31 |
73
- | cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2023-12-29 01:12:06 |
72
+ | cvm | [云服务器](https://cloud.tencent.com/document/product/213) | 2024-01-01 00:06:04 |
73
+ | cwp | [主机安全](https://cloud.tencent.com/document/product/296) | 2024-01-03 01:11:16 |
74
74
  | cws | [漏洞扫描服务](https://cloud.tencent.com/document/product) | 2019-11-22 12:16:15 |
75
75
  | cynosdb | [TDSQL-C MySQL 版](https://cloud.tencent.com/document/product/1003) | 2023-12-15 19:25:23 |
76
76
  | dasb | [T-Sec-堡垒机(BH)](https://cloud.tencent.com/document/product/1025) | 2023-11-17 01:12:46 |
@@ -87,7 +87,7 @@
87
87
  | ds | [文档服务](https://cloud.tencent.com/document/product/869) | 2023-08-17 02:59:40 |
88
88
  | dsgc | [数据安全治理中心](https://cloud.tencent.com/document/product/1087) | 2023-11-29 01:53:04 |
89
89
  | dtf | [分布式事务](https://cloud.tencent.com/document/product/1224) | 2022-04-04 06:38:57 |
90
- | dts | [数据传输服务](https://cloud.tencent.com/document/product/571) | 2023-12-27 01:17:28 |
90
+ | dts | [数据传输服务](https://cloud.tencent.com/document/product/571) | 2024-01-03 01:14:19 |
91
91
  | eb | [事件总线](https://cloud.tencent.com/document/product/1359) | 2023-12-15 19:35:27 |
92
92
  | ecc | [英文作文批改](https://cloud.tencent.com/document/product/1076) | 2023-09-13 01:42:58 |
93
93
  | ecdn | [全站加速网络](https://cloud.tencent.com/document/product/570) | 2023-08-17 03:03:04 |
@@ -95,9 +95,9 @@
95
95
  | eiam | [数字身份管控平台(员工版)](https://cloud.tencent.com/document/product/1442) | 2023-05-18 01:25:40 |
96
96
  | eis | [数据连接器](https://cloud.tencent.com/document/product/1270) | 2023-08-10 01:17:44 |
97
97
  | emr | [弹性 MapReduce](https://cloud.tencent.com/document/product/589) | 2023-12-25 00:10:01 |
98
- | es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2023-12-05 01:46:13 |
99
- | ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2023-12-29 01:16:02 |
100
- | essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2023-12-29 01:16:18 |
98
+ | es | [Elasticsearch Service](https://cloud.tencent.com/document/product/845) | 2024-01-03 01:15:03 |
99
+ | ess | [腾讯电子签企业版](https://cloud.tencent.com/document/product/1323) | 2024-01-03 01:15:11 |
100
+ | essbasic | [腾讯电子签(基础版)](https://cloud.tencent.com/document/product/1420) | 2024-01-03 01:15:26 |
101
101
  | facefusion | [人脸融合](https://cloud.tencent.com/document/product/670) | 2023-12-15 19:41:44 |
102
102
  | faceid | [人脸核身](https://cloud.tencent.com/document/product/1007) | 2023-12-27 01:19:47 |
103
103
  | fmu | [人脸试妆](https://cloud.tencent.com/document/product/1172) | 2023-12-25 00:11:01 |
@@ -109,7 +109,7 @@
109
109
  | gs | [云游戏](https://cloud.tencent.com/document/product/1162) | 2023-05-18 01:29:42 |
110
110
  | gse | [游戏服务器伸缩](https://cloud.tencent.com/document/product/1165) | 2022-07-11 06:12:44 |
111
111
  | habo | [](https://cloud.tencent.com/document/product) | 2019-05-09 19:37:22 |
112
- | hai | [高性能应用服务](https://cloud.tencent.com/document/product/1721) | 2023-12-13 01:52:48 |
112
+ | hai | [高性能应用服务](https://cloud.tencent.com/document/product/1721) | 2024-01-03 01:16:14 |
113
113
  | hasim | [高可用物联网卡](https://cloud.tencent.com/document/product/1482) | 2023-05-18 01:29:47 |
114
114
  | hcm | [数学作业批改](https://cloud.tencent.com/document/product/1004) | 2023-11-01 01:14:52 |
115
115
  | hunyuan | [腾讯混元大模型](https://cloud.tencent.com/document/product/1729) | 2023-11-29 01:56:24 |
@@ -133,7 +133,7 @@
133
133
  | keewidb | [云数据库 KeeWiDB](https://cloud.tencent.com/document/product/1520) | 2023-11-30 04:52:16 |
134
134
  | kms | [密钥管理系统](https://cloud.tencent.com/document/product/573) | 2023-08-17 03:51:31 |
135
135
  | lcic | [实时互动-教育版](https://cloud.tencent.com/document/product/1639) | 2023-12-21 01:48:52 |
136
- | lighthouse | [轻量应用服务器](https://cloud.tencent.com/document/product/1207) | 2023-12-26 01:18:52 |
136
+ | lighthouse | [轻量应用服务器](https://cloud.tencent.com/document/product/1207) | 2024-01-03 01:18:19 |
137
137
  | live | [云直播CSS](https://cloud.tencent.com/document/product/267) | 2023-12-19 01:53:39 |
138
138
  | lowcode | [云开发低码](https://cloud.tencent.com/document/product/1301) | 2022-04-04 06:56:51 |
139
139
  | lp | [登录保护](https://cloud.tencent.com/document/product/1190) | 2022-04-04 06:56:52 |
@@ -146,14 +146,14 @@
146
146
  | mna | [多网聚合加速](https://cloud.tencent.com/document/product/1385) | 2023-12-01 01:19:47 |
147
147
  | mongodb | [云数据库 MongoDB](https://cloud.tencent.com/document/product/240) | 2023-12-27 01:26:46 |
148
148
  | monitor | [腾讯云可观测平台](https://cloud.tencent.com/document/product/248) | 2023-12-27 01:26:59 |
149
- | mps | [媒体处理](https://cloud.tencent.com/document/product/862) | 2023-12-06 20:13:59 |
149
+ | mps | [媒体处理](https://cloud.tencent.com/document/product/862) | 2024-01-03 01:19:35 |
150
150
  | mrs | [医疗报告结构化](https://cloud.tencent.com/document/product/1314) | 2023-12-08 02:10:30 |
151
151
  | ms | [移动应用安全](https://cloud.tencent.com/document/product/283) | 2023-12-05 02:07:42 |
152
152
  | msp | [迁移服务平台](https://cloud.tencent.com/document/product/659) | 2023-08-17 04:18:22 |
153
153
  | mvj | [营销价值判断](https://cloud.tencent.com/document/product) | 2020-03-19 08:11:44 |
154
154
  | nlp | [NLP 服务](https://cloud.tencent.com/document/product/271) | 2023-09-15 02:14:19 |
155
155
  | npp | [号码保护](https://cloud.tencent.com/document/product) | 2020-04-22 08:00:22 |
156
- | oceanus | [流计算 Oceanus](https://cloud.tencent.com/document/product/849) | 2023-12-29 01:21:17 |
156
+ | oceanus | [流计算 Oceanus](https://cloud.tencent.com/document/product/849) | 2024-01-01 00:15:04 |
157
157
  | ocr | [文字识别](https://cloud.tencent.com/document/product/866) | 2023-12-21 01:56:34 |
158
158
  | omics | [腾讯健康组学平台](https://cloud.tencent.com/document/product/1643) | 2023-12-28 01:21:09 |
159
159
  | organization | [集团账号管理](https://cloud.tencent.com/document/product/850) | 2023-12-25 00:15:53 |
@@ -198,7 +198,7 @@
198
198
  | tci | [腾讯智学课堂分析](https://cloud.tencent.com/document/product) | 2020-08-24 08:06:03 |
199
199
  | tcm | [服务网格](https://cloud.tencent.com/document/product/1261) | 2023-10-09 01:23:14 |
200
200
  | tcr | [容器镜像服务](https://cloud.tencent.com/document/product/1141) | 2023-12-12 02:27:39 |
201
- | tcss | [容器安全服务](https://cloud.tencent.com/document/product/1285) | 2023-12-29 01:24:30 |
201
+ | tcss | [容器安全服务](https://cloud.tencent.com/document/product/1285) | 2024-01-03 01:24:22 |
202
202
  | tdcpg | [TDSQL-C PostgreSQL 版](https://cloud.tencent.com/document/product/1556) | 2023-06-21 01:36:25 |
203
203
  | tdid | [分布式身份](https://cloud.tencent.com/document/product/1439) | 2023-07-24 01:49:20 |
204
204
  | tdmq | [消息队列 TDMQ](https://cloud.tencent.com/document/product/1179) | 2023-12-21 02:11:13 |
@@ -212,11 +212,11 @@
212
212
  | tics | [威胁情报云查服务](https://cloud.tencent.com/document/product/1013) | 2023-08-17 05:26:12 |
213
213
  | tiems | [腾讯云 TI 平台 TI-EMS ](https://cloud.tencent.com/document/product/1120) | 2022-07-19 06:19:39 |
214
214
  | tiia | [图像分析](https://cloud.tencent.com/document/product/865) | 2023-09-01 01:23:47 |
215
- | tione | [TI-ONE 训练平台](https://cloud.tencent.com/document/product/851) | 2023-12-21 02:14:50 |
215
+ | tione | [TI-ONE 训练平台](https://cloud.tencent.com/document/product/851) | 2024-01-01 00:19:59 |
216
216
  | tiw | [互动白板](https://cloud.tencent.com/document/product/1137) | 2023-12-29 01:26:38 |
217
217
  | tke | [容器服务](https://cloud.tencent.com/document/product/457) | 2023-12-26 01:27:04 |
218
218
  | tkgdq | [腾讯知识图谱数据查询](https://cloud.tencent.com/document/product) | 2020-03-10 00:51:44 |
219
- | tms | [文本内容安全](https://cloud.tencent.com/document/product/1124) | 2023-11-28 01:28:13 |
219
+ | tms | [文本内容安全](https://cloud.tencent.com/document/product/1124) | 2024-01-01 00:20:49 |
220
220
  | tmt | [机器翻译](https://cloud.tencent.com/document/product/551) | 2023-12-07 02:40:15 |
221
221
  | tourism | [文旅客情大数据](https://cloud.tencent.com/document/product/1684) | 2023-08-10 01:43:37 |
222
222
  | trdp | [流量风险决策平台](https://cloud.tencent.com/document/product/1604) | 2023-05-18 02:01:19 |
@@ -231,7 +231,7 @@
231
231
  | ump | [客流数字化平台](https://cloud.tencent.com/document/product/1320) | 2023-08-17 05:50:27 |
232
232
  | vm | [视频内容安全](https://cloud.tencent.com/document/product/1265) | 2023-12-22 01:27:31 |
233
233
  | vms | [语音消息](https://cloud.tencent.com/document/product/1128) | 2023-08-17 05:50:56 |
234
- | vod | [云点播](https://cloud.tencent.com/document/product/266) | 2023-12-29 01:28:41 |
234
+ | vod | [云点播](https://cloud.tencent.com/document/product/266) | 2024-01-01 00:21:59 |
235
235
  | vpc | [私有网络](https://cloud.tencent.com/document/product/215) | 2023-12-27 01:44:26 |
236
236
  | vrs | [声音复刻](https://cloud.tencent.com/document/product/1283) | 2023-11-27 00:23:42 |
237
237
  | waf | [Web 应用防火墙](https://cloud.tencent.com/document/product/627) | 2023-12-26 02:05:35 |
@@ -17,17 +17,23 @@
17
17
  */
18
18
  import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common"
19
19
  import {
20
+ LabelGrade,
21
+ Tag,
20
22
  SentimentAnalysis,
21
23
  Positions,
22
24
  RiskDetails,
25
+ ModerateTextResponse,
23
26
  TextModerationRequest,
24
27
  DetailResults,
28
+ ModelResult,
25
29
  HitInfo,
26
- Tag,
27
- User,
30
+ ModerationDetail,
31
+ ModerateTextRequest,
28
32
  Device,
29
33
  SentimentDetail,
30
34
  TextModerationResponse,
35
+ LibCheckResult,
36
+ User,
31
37
  } from "./tms_models"
32
38
 
33
39
  /**
@@ -39,6 +45,16 @@ export class Client extends TencentCloudCommon.AbstractClient {
39
45
  super("tms.tencentcloudapi.com", "2020-12-29", clientConfig)
40
46
  }
41
47
 
48
+ /**
49
+ * 天御文本内容安全审核接口,改接口会按照客户定制标签输出审核结果
50
+ */
51
+ async ModerateText(
52
+ req: ModerateTextRequest,
53
+ cb?: (error: string, rep: ModerateTextResponse) => void
54
+ ): Promise<ModerateTextResponse> {
55
+ return this.request("ModerateText", req, cb)
56
+ }
57
+
42
58
  /**
43
59
  * 本接口(Text Moderation)用于提交文本内容进行智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通文本内容安全服务](https://console.cloud.tencent.com/cms) 并调整好对应的业务配置。
44
60
 
@@ -15,6 +15,53 @@
15
15
  * under the License.
16
16
  */
17
17
 
18
+ /**
19
+ * 内容审核多级标签结构
20
+ */
21
+ export interface LabelGrade {
22
+ /**
23
+ * 内容审核结果客户定制标签码
24
+ 注意:此字段可能返回 null,表示取不到有效值。
25
+ */
26
+ Code?: string
27
+ /**
28
+ * 内容审核结果客户定制一级标签
29
+ 注意:此字段可能返回 null,表示取不到有效值。
30
+ */
31
+ Grade1?: string
32
+ /**
33
+ * 内容审核结果客户定制二级标签
34
+ 注意:此字段可能返回 null,表示取不到有效值。
35
+ */
36
+ Grade2?: string
37
+ /**
38
+ * 内容审核结果客户定制三级标签
39
+ 注意:此字段可能返回 null,表示取不到有效值。
40
+ */
41
+ Grade3?: string
42
+ }
43
+
44
+ /**
45
+ * 该字段用于返回审核结果明细字段的标签及分数
46
+ */
47
+ export interface Tag {
48
+ /**
49
+ * 该字段用于返回命中的关键词
50
+ 注意:此字段可能返回 null,表示取不到有效值。
51
+ */
52
+ Keyword?: string
53
+ /**
54
+ * 该字段用于返回子标签
55
+ 注意:此字段可能返回 null,表示取不到有效值。
56
+ */
57
+ SubLabel?: string
58
+ /**
59
+ * 该字段用于返回子标签对应的分数
60
+ 注意:此字段可能返回 null,表示取不到有效值。
61
+ */
62
+ Score?: number
63
+ }
64
+
18
65
  /**
19
66
  * 情感分析结果
20
67
  */
@@ -75,6 +122,49 @@ export interface RiskDetails {
75
122
  Level: number
76
123
  }
77
124
 
125
+ /**
126
+ * ModerateText返回参数结构体
127
+ */
128
+ export interface ModerateTextResponse {
129
+ /**
130
+ * 该字段用于返回检测对象对应请求参数中的DataId,与输入的DataId字段中的内容对应
131
+ */
132
+ DataId?: string
133
+ /**
134
+ * 该字段用于返回请求参数中的BizType参数
135
+ */
136
+ BizType?: string
137
+ /**
138
+ * 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。
139
+ 返回值:Block:建议屏蔽,Review :建议人工复审,Pass:建议通过
140
+ */
141
+ Suggestion?: string
142
+ /**
143
+ * 命中标签,可参阅对应数据结构(LabelGrade)的详细描述
144
+ */
145
+ Label?: LabelGrade
146
+ /**
147
+ * 命中标签对应腾讯侧定义的标签
148
+ */
149
+ TcLabelCodes?: Array<string>
150
+ /**
151
+ * 该字段用于返回当前标签(Label)下被检测文本命中的关键词信息,用于标注文本违规的具体原因(如:加我微信)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值
152
+ */
153
+ Keywords?: Array<string>
154
+ /**
155
+ * 该字段用于返回文本审核的详细结果,返回值信息可参阅对应数据结构(ModerationDetail)的详细描述
156
+ */
157
+ ModerationDetails?: Array<ModerationDetail>
158
+ /**
159
+ * 该字段用于返回审核结果置信度,使用百分制。分数越高表示结果可信度越高。
160
+ */
161
+ Score?: number
162
+ /**
163
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
164
+ */
165
+ RequestId?: string
166
+ }
167
+
78
168
  /**
79
169
  * TextModeration请求参数结构体
80
170
  */
@@ -106,54 +196,70 @@ export interface TextModerationRequest {
106
196
  */
107
197
  export interface DetailResults {
108
198
  /**
109
- * 该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
199
+ * 该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
110
200
  */
111
- Label: string
201
+ Label?: string
112
202
  /**
113
203
  * 该字段用于返回对应当前标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
114
204
  注意:此字段可能返回 null,表示取不到有效值。
115
205
  */
116
- Suggestion: string
206
+ Suggestion?: string
117
207
  /**
118
208
  * 该字段用于返回检测文本命中的关键词信息,用于标注文本违规的具体原因(如:*加我微信*)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值。
119
209
  注意:此字段可能返回 null,表示取不到有效值。
120
210
  */
121
- Keywords: Array<string>
211
+ Keywords?: Array<string>
122
212
  /**
123
213
  * 该字段用于返回当前标签(Label)下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容;*色情 0*,则表明该文本不属于色情内容。
124
214
  注意:此字段可能返回 null,表示取不到有效值。
125
215
  */
126
- Score: number
216
+ Score?: number
127
217
  /**
128
- * 该字段**仅当Label为Custom自定义关键词时有效**,用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
218
+ * 该字段用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
129
219
  注意:此字段可能返回 null,表示取不到有效值。
130
220
  */
131
- LibType: number
221
+ LibType?: number
132
222
  /**
133
- * 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
223
+ * 该字段用于返回自定义库的ID,以方便自定义库管理和配置。
134
224
  注意:此字段可能返回 null,表示取不到有效值。
135
225
  */
136
- LibId: string
226
+ LibId?: string
137
227
  /**
138
- * 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
228
+ * 该字段用于返回自定义库的名称,以方便自定义库管理和配置。
139
229
  注意:此字段可能返回 null,表示取不到有效值。
140
230
  */
141
- LibName: string
231
+ LibName?: string
142
232
  /**
143
233
  * 该字段用于返回当前标签(Label)下的二级标签。
144
234
  注意:此字段可能返回 null,表示取不到有效值。
145
235
  */
146
- SubLabel: string
236
+ SubLabel?: string
147
237
  /**
148
238
  * 该字段用于返回当前一级标签(Label)下的关键词、子标签及分数。
149
239
  注意:此字段可能返回 null,表示取不到有效值。
150
240
  */
151
- Tags: Array<Tag>
241
+ Tags?: Array<Tag>
152
242
  /**
153
243
  * 该字段用于返回违规文本命中信息
154
244
  注意:此字段可能返回 null,表示取不到有效值。
155
245
  */
156
- HitInfos: Array<HitInfo>
246
+ HitInfos?: Array<HitInfo>
247
+ }
248
+
249
+ /**
250
+ * 模型检测结果
251
+ */
252
+ export interface ModelResult {
253
+ /**
254
+ * 模型检测出的违规内容
255
+ 注意:此字段可能返回 null,表示取不到有效值。
256
+ */
257
+ Content?: string
258
+ /**
259
+ * 模型检测出的违规内容的位置
260
+ 注意:此字段可能返回 null,表示取不到有效值。
261
+ */
262
+ Positions?: Array<Positions>
157
263
  }
158
264
 
159
265
  /**
@@ -183,85 +289,72 @@ export interface HitInfo {
183
289
  }
184
290
 
185
291
  /**
186
- * 该字段用于返回审核结果明细字段的标签及分数
292
+ * 文本审核明细结果
187
293
  */
188
- export interface Tag {
294
+ export interface ModerationDetail {
189
295
  /**
190
- * 该字段用于返回命中的关键词
296
+ * 审核建议,Block表示建议拦截,Review表示建议人工复审,Pass表示建议放行
191
297
  注意:此字段可能返回 null,表示取不到有效值。
192
298
  */
193
- Keyword: string
299
+ Suggestion?: string
194
300
  /**
195
- * 该字段用于返回子标签
301
+ * 命中标签,含标签码和一二三级标签名
196
302
  注意:此字段可能返回 null,表示取不到有效值。
197
303
  */
198
- SubLabel: string
304
+ Label?: LabelGrade
199
305
  /**
200
- * 该字段用于返回子标签对应的分数
306
+ * 标签得分
201
307
  注意:此字段可能返回 null,表示取不到有效值。
202
308
  */
203
- Score: number
204
- }
205
-
206
- /**
207
- * 用于表示业务用户的账号相关信息
208
- */
209
- export interface User {
210
- /**
211
- * 该字段表示业务用户ID,填写后,系统可根据账号过往违规历史优化审核结果判定,有利于存在可疑违规风险时的辅助判断。<br>
212
- 备注:该字段可传入微信openid、QQopenid、字符串等账号信息,与账号类别参数(AccountType)配合使用可确定唯一账号。
213
- */
214
- UserId?: string
215
- /**
216
- * 该字段表示业务用户对应的账号昵称信息。
217
- */
218
- Nickname?: string
219
- /**
220
- * 该字段表示业务用户ID对应的账号类型,取值:**1**-微信uin,**2**-QQ号,**3**-微信群uin,**4**-qq群号,**5**-微信openid,**6**-QQopenid,**7**-其它string。<br>
221
- 该字段与账号ID参数(UserId)配合使用可确定唯一账号。
222
- */
223
- AccountType?: number
309
+ Score?: number
224
310
  /**
225
- * 该字段表示业务用户对应账号的性别信息。<br>
226
- 取值:**0**(默认值,代表性别未知)、**1**(男性)、**2**(女性)。
311
+ * label对应腾讯侧命中标签码
312
+ 注意:此字段可能返回 null,表示取不到有效值。
227
313
  */
228
- Gender?: number
314
+ TcLabelCodes?: Array<string>
229
315
  /**
230
- * 该字段表示业务用户对应账号的年龄信息。<br>
231
- 取值:**0**(默认值,代表年龄未知)-(**自定义年龄上限**)之间的整数。
316
+ * 库检测命中详情
317
+ 注意:此字段可能返回 null,表示取不到有效值。
232
318
  */
233
- Age?: number
319
+ LibResults?: Array<LibCheckResult>
234
320
  /**
235
- * 该字段表示业务用户对应账号的等级信息。<br>
236
- 取值:**0**(默认值,代表等级未知)、**1**(等级较低)、**2**(等级中等)、**3**(等级较高),目前**暂不支持自定义等级**。
321
+ * 模型检测详情
322
+ 注意:此字段可能返回 null,表示取不到有效值。
237
323
  */
238
- Level?: number
324
+ ModelResults?: Array<ModelResult>
239
325
  /**
240
- * 该字段表示业务用户对应账号的手机号信息,支持全球各地区手机号的记录。<br>
241
- 备注:请保持手机号格式的统一,如区号格式(086/+86)等。
326
+ * 情绪正负向检测结果
327
+ 注意:此字段可能返回 null,表示取不到有效值。
242
328
  */
243
- Phone?: string
329
+ SentimentResult?: SentimentDetail
330
+ }
331
+
332
+ /**
333
+ * ModerateText请求参数结构体
334
+ */
335
+ export interface ModerateTextRequest {
244
336
  /**
245
- * 该字段表示业务用户头像图片的访问链接(URL),支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。
246
- 备注:头像图片大小不超过5MB,建议分辨率不低于256x256;图片下载时间限制为3秒,超过则会返回下载超时。
337
+ * 该字段表示待检测对象的文本内容,文本需要按utf-8格式编码,长度不能超过10000个字符(按unicode编码计算),并进行 Base64加密
247
338
  */
248
- HeadUrl?: string
339
+ Content: string
249
340
  /**
250
- * 该字段表示业务用户的简介信息,支持汉字、英文及特殊符号,长度不超过5000个汉字字符。
341
+ * 该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。
342
+ 备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype
251
343
  */
252
- Desc?: string
344
+ BizType?: string
253
345
  /**
254
- * 该字段表示业务群聊场景时的房间ID
346
+ * 该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。
347
+ 取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,长度不超过64个字符
255
348
  */
256
- RoomId?: string
349
+ DataId?: string
257
350
  /**
258
- * 该字段表示消息接受者ID
351
+ * 该字段表示待检测对象对应的用户相关信息,传入后可便于甄别相应违规风险用户
259
352
  */
260
- ReceiverId?: string
353
+ User?: User
261
354
  /**
262
- * 消息生成时间,精确到毫秒
355
+ * 该字段表示待检测对象对应的设备相关信息,传入后可便于甄别相应违规风险设备
263
356
  */
264
- SendTime?: number
357
+ Device?: Device
265
358
  }
266
359
 
267
360
  /**
@@ -381,3 +474,95 @@ export interface TextModerationResponse {
381
474
  */
382
475
  RequestId?: string
383
476
  }
477
+
478
+ /**
479
+ * 库检测结果
480
+ */
481
+ export interface LibCheckResult {
482
+ /**
483
+ * 库ID
484
+ 注意:此字段可能返回 null,表示取不到有效值。
485
+ */
486
+ LibId?: string
487
+ /**
488
+ * 库名称
489
+ 注意:此字段可能返回 null,表示取不到有效值。
490
+ */
491
+ LibName?: string
492
+ /**
493
+ * 库类型
494
+ 注意:此字段可能返回 null,表示取不到有效值。
495
+ */
496
+ LibType?: number
497
+ /**
498
+ * 命中的关键词
499
+ 注意:此字段可能返回 null,表示取不到有效值。
500
+ */
501
+ Keyword?: string
502
+ /**
503
+ * 命中的关键词在送审文本的位置,可能存在多个位置,每个位置显示开始位置和结束位置
504
+ 注意:此字段可能返回 null,表示取不到有效值。
505
+ */
506
+ Positions?: Array<Positions>
507
+ }
508
+
509
+ /**
510
+ * 用于表示业务用户的账号相关信息
511
+ */
512
+ export interface User {
513
+ /**
514
+ * 该字段表示业务用户ID,填写后,系统可根据账号过往违规历史优化审核结果判定,有利于存在可疑违规风险时的辅助判断。<br>
515
+ 备注:该字段可传入微信openid、QQopenid、字符串等账号信息,与账号类别参数(AccountType)配合使用可确定唯一账号。
516
+ */
517
+ UserId?: string
518
+ /**
519
+ * 该字段表示业务用户对应的账号昵称信息。
520
+ */
521
+ Nickname?: string
522
+ /**
523
+ * 该字段表示业务用户ID对应的账号类型,取值:**1**-微信uin,**2**-QQ号,**3**-微信群uin,**4**-qq群号,**5**-微信openid,**6**-QQopenid,**7**-其它string。<br>
524
+ 该字段与账号ID参数(UserId)配合使用可确定唯一账号。
525
+ */
526
+ AccountType?: number
527
+ /**
528
+ * 该字段表示业务用户对应账号的性别信息。<br>
529
+ 取值:**0**(默认值,代表性别未知)、**1**(男性)、**2**(女性)。
530
+ */
531
+ Gender?: number
532
+ /**
533
+ * 该字段表示业务用户对应账号的年龄信息。<br>
534
+ 取值:**0**(默认值,代表年龄未知)-(**自定义年龄上限**)之间的整数。
535
+ */
536
+ Age?: number
537
+ /**
538
+ * 该字段表示业务用户对应账号的等级信息。<br>
539
+ 取值:**0**(默认值,代表等级未知)、**1**(等级较低)、**2**(等级中等)、**3**(等级较高),目前**暂不支持自定义等级**。
540
+ */
541
+ Level?: number
542
+ /**
543
+ * 该字段表示业务用户对应账号的手机号信息,支持全球各地区手机号的记录。<br>
544
+ 备注:请保持手机号格式的统一,如区号格式(086/+86)等。
545
+ */
546
+ Phone?: string
547
+ /**
548
+ * 该字段表示业务用户头像图片的访问链接(URL),支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。
549
+ 备注:头像图片大小不超过5MB,建议分辨率不低于256x256;图片下载时间限制为3秒,超过则会返回下载超时。
550
+ */
551
+ HeadUrl?: string
552
+ /**
553
+ * 该字段表示业务用户的简介信息,支持汉字、英文及特殊符号,长度不超过5000个汉字字符。
554
+ */
555
+ Desc?: string
556
+ /**
557
+ * 该字段表示业务群聊场景时的房间ID。
558
+ */
559
+ RoomId?: string
560
+ /**
561
+ * 该字段表示消息接受者ID
562
+ */
563
+ ReceiverId?: string
564
+ /**
565
+ * 消息生成时间,精确到毫秒
566
+ */
567
+ SendTime?: number
568
+ }
@@ -1,11 +1,15 @@
1
1
  import * as TencentCloudCommon from "tencentcloud-sdk-nodejs-common";
2
- import { TextModerationRequest, TextModerationResponse } from "./tms_models";
2
+ import { ModerateTextResponse, TextModerationRequest, ModerateTextRequest, TextModerationResponse } from "./tms_models";
3
3
  /**
4
4
  * tms client
5
5
  * @class
6
6
  */
7
7
  export declare class Client extends TencentCloudCommon.AbstractClient {
8
8
  constructor(clientConfig: TencentCloudCommon.ClientConfig);
9
+ /**
10
+ * 天御文本内容安全审核接口,改接口会按照客户定制标签输出审核结果
11
+ */
12
+ ModerateText(req: ModerateTextRequest, cb?: (error: string, rep: ModerateTextResponse) => void): Promise<ModerateTextResponse>;
9
13
  /**
10
14
  * 本接口(Text Moderation)用于提交文本内容进行智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通文本内容安全服务](https://console.cloud.tencent.com/cms) 并调整好对应的业务配置。
11
15
 
@@ -27,6 +27,12 @@ class Client extends TencentCloudCommon.AbstractClient {
27
27
  constructor(clientConfig) {
28
28
  super("tms.tencentcloudapi.com", "2020-12-29", clientConfig);
29
29
  }
30
+ /**
31
+ * 天御文本内容安全审核接口,改接口会按照客户定制标签输出审核结果
32
+ */
33
+ async ModerateText(req, cb) {
34
+ return this.request("ModerateText", req, cb);
35
+ }
30
36
  /**
31
37
  * 本接口(Text Moderation)用于提交文本内容进行智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通文本内容安全服务](https://console.cloud.tencent.com/cms) 并调整好对应的业务配置。
32
38
 
@@ -1,3 +1,48 @@
1
+ /**
2
+ * 内容审核多级标签结构
3
+ */
4
+ export interface LabelGrade {
5
+ /**
6
+ * 内容审核结果客户定制标签码
7
+ 注意:此字段可能返回 null,表示取不到有效值。
8
+ */
9
+ Code?: string;
10
+ /**
11
+ * 内容审核结果客户定制一级标签
12
+ 注意:此字段可能返回 null,表示取不到有效值。
13
+ */
14
+ Grade1?: string;
15
+ /**
16
+ * 内容审核结果客户定制二级标签
17
+ 注意:此字段可能返回 null,表示取不到有效值。
18
+ */
19
+ Grade2?: string;
20
+ /**
21
+ * 内容审核结果客户定制三级标签
22
+ 注意:此字段可能返回 null,表示取不到有效值。
23
+ */
24
+ Grade3?: string;
25
+ }
26
+ /**
27
+ * 该字段用于返回审核结果明细字段的标签及分数
28
+ */
29
+ export interface Tag {
30
+ /**
31
+ * 该字段用于返回命中的关键词
32
+ 注意:此字段可能返回 null,表示取不到有效值。
33
+ */
34
+ Keyword?: string;
35
+ /**
36
+ * 该字段用于返回子标签
37
+ 注意:此字段可能返回 null,表示取不到有效值。
38
+ */
39
+ SubLabel?: string;
40
+ /**
41
+ * 该字段用于返回子标签对应的分数
42
+ 注意:此字段可能返回 null,表示取不到有效值。
43
+ */
44
+ Score?: number;
45
+ }
1
46
  /**
2
47
  * 情感分析结果
3
48
  */
@@ -55,6 +100,48 @@ export interface RiskDetails {
55
100
  */
56
101
  Level: number;
57
102
  }
103
+ /**
104
+ * ModerateText返回参数结构体
105
+ */
106
+ export interface ModerateTextResponse {
107
+ /**
108
+ * 该字段用于返回检测对象对应请求参数中的DataId,与输入的DataId字段中的内容对应
109
+ */
110
+ DataId?: string;
111
+ /**
112
+ * 该字段用于返回请求参数中的BizType参数
113
+ */
114
+ BizType?: string;
115
+ /**
116
+ * 该字段用于返回后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。
117
+ 返回值:Block:建议屏蔽,Review :建议人工复审,Pass:建议通过
118
+ */
119
+ Suggestion?: string;
120
+ /**
121
+ * 命中标签,可参阅对应数据结构(LabelGrade)的详细描述
122
+ */
123
+ Label?: LabelGrade;
124
+ /**
125
+ * 命中标签对应腾讯侧定义的标签
126
+ */
127
+ TcLabelCodes?: Array<string>;
128
+ /**
129
+ * 该字段用于返回当前标签(Label)下被检测文本命中的关键词信息,用于标注文本违规的具体原因(如:加我微信)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值
130
+ */
131
+ Keywords?: Array<string>;
132
+ /**
133
+ * 该字段用于返回文本审核的详细结果,返回值信息可参阅对应数据结构(ModerationDetail)的详细描述
134
+ */
135
+ ModerationDetails?: Array<ModerationDetail>;
136
+ /**
137
+ * 该字段用于返回审核结果置信度,使用百分制。分数越高表示结果可信度越高。
138
+ */
139
+ Score?: number;
140
+ /**
141
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
142
+ */
143
+ RequestId?: string;
144
+ }
58
145
  /**
59
146
  * TextModeration请求参数结构体
60
147
  */
@@ -85,54 +172,69 @@ export interface TextModerationRequest {
85
172
  */
86
173
  export interface DetailResults {
87
174
  /**
88
- * 该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告,**Custom**:自定义违规;以及其他令人反感、不安全或不适宜的内容类型。
175
+ * 该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
89
176
  */
90
- Label: string;
177
+ Label?: string;
91
178
  /**
92
179
  * 该字段用于返回对应当前标签的后续操作建议。当您获取到判定结果后,返回值表示系统推荐的后续操作;建议您按照业务所需,对不同违规类型与建议值进行处理。<br>返回值:**Block**:建议屏蔽,**Review** :建议人工复审,**Pass**:建议通过
93
180
  注意:此字段可能返回 null,表示取不到有效值。
94
181
  */
95
- Suggestion: string;
182
+ Suggestion?: string;
96
183
  /**
97
184
  * 该字段用于返回检测文本命中的关键词信息,用于标注文本违规的具体原因(如:*加我微信*)。该参数可能会有多个返回值,代表命中的多个关键词;如返回值为空且Score不为空,则代表识别结果所对应的恶意标签(Label)是来自于语义模型判断的返回值。
98
185
  注意:此字段可能返回 null,表示取不到有效值。
99
186
  */
100
- Keywords: Array<string>;
187
+ Keywords?: Array<string>;
101
188
  /**
102
189
  * 该字段用于返回当前标签(Label)下的置信度,取值范围:0(**置信度最低**)-100(**置信度最高** ),越高代表文本越有可能属于当前返回的标签;如:*色情 99*,则表明该文本非常有可能属于色情内容;*色情 0*,则表明该文本不属于色情内容。
103
190
  注意:此字段可能返回 null,表示取不到有效值。
104
191
  */
105
- Score: number;
192
+ Score?: number;
106
193
  /**
107
- * 该字段**仅当Label为Custom自定义关键词时有效**,用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
194
+ * 该字段用于返回自定义关键词对应的词库类型,取值为**1**(黑白库)和**2**(自定义关键词库),若未配置自定义关键词库,则默认值为1(黑白库匹配)。
108
195
  注意:此字段可能返回 null,表示取不到有效值。
109
196
  */
110
- LibType: number;
197
+ LibType?: number;
111
198
  /**
112
- * 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的ID,以方便自定义库管理和配置。
199
+ * 该字段用于返回自定义库的ID,以方便自定义库管理和配置。
113
200
  注意:此字段可能返回 null,表示取不到有效值。
114
201
  */
115
- LibId: string;
202
+ LibId?: string;
116
203
  /**
117
- * 该字段**仅当Label为Custom:自定义关键词时该参数有效**,用于返回自定义库的名称,以方便自定义库管理和配置。
204
+ * 该字段用于返回自定义库的名称,以方便自定义库管理和配置。
118
205
  注意:此字段可能返回 null,表示取不到有效值。
119
206
  */
120
- LibName: string;
207
+ LibName?: string;
121
208
  /**
122
209
  * 该字段用于返回当前标签(Label)下的二级标签。
123
210
  注意:此字段可能返回 null,表示取不到有效值。
124
211
  */
125
- SubLabel: string;
212
+ SubLabel?: string;
126
213
  /**
127
214
  * 该字段用于返回当前一级标签(Label)下的关键词、子标签及分数。
128
215
  注意:此字段可能返回 null,表示取不到有效值。
129
216
  */
130
- Tags: Array<Tag>;
217
+ Tags?: Array<Tag>;
131
218
  /**
132
219
  * 该字段用于返回违规文本命中信息
133
220
  注意:此字段可能返回 null,表示取不到有效值。
134
221
  */
135
- HitInfos: Array<HitInfo>;
222
+ HitInfos?: Array<HitInfo>;
223
+ }
224
+ /**
225
+ * 模型检测结果
226
+ */
227
+ export interface ModelResult {
228
+ /**
229
+ * 模型检测出的违规内容
230
+ 注意:此字段可能返回 null,表示取不到有效值。
231
+ */
232
+ Content?: string;
233
+ /**
234
+ * 模型检测出的违规内容的位置
235
+ 注意:此字段可能返回 null,表示取不到有效值。
236
+ */
237
+ Positions?: Array<Positions>;
136
238
  }
137
239
  /**
138
240
  * 关键词命中位置信息
@@ -160,84 +262,71 @@ export interface HitInfo {
160
262
  Positions: Array<Positions>;
161
263
  }
162
264
  /**
163
- * 该字段用于返回审核结果明细字段的标签及分数
265
+ * 文本审核明细结果
164
266
  */
165
- export interface Tag {
267
+ export interface ModerationDetail {
166
268
  /**
167
- * 该字段用于返回命中的关键词
269
+ * 审核建议,Block表示建议拦截,Review表示建议人工复审,Pass表示建议放行
168
270
  注意:此字段可能返回 null,表示取不到有效值。
169
271
  */
170
- Keyword: string;
272
+ Suggestion?: string;
171
273
  /**
172
- * 该字段用于返回子标签
274
+ * 命中标签,含标签码和一二三级标签名
173
275
  注意:此字段可能返回 null,表示取不到有效值。
174
276
  */
175
- SubLabel: string;
277
+ Label?: LabelGrade;
176
278
  /**
177
- * 该字段用于返回子标签对应的分数
279
+ * 标签得分
178
280
  注意:此字段可能返回 null,表示取不到有效值。
179
281
  */
180
- Score: number;
181
- }
182
- /**
183
- * 用于表示业务用户的账号相关信息
184
- */
185
- export interface User {
186
- /**
187
- * 该字段表示业务用户ID,填写后,系统可根据账号过往违规历史优化审核结果判定,有利于存在可疑违规风险时的辅助判断。<br>
188
- 备注:该字段可传入微信openid、QQopenid、字符串等账号信息,与账号类别参数(AccountType)配合使用可确定唯一账号。
189
- */
190
- UserId?: string;
191
- /**
192
- * 该字段表示业务用户对应的账号昵称信息。
193
- */
194
- Nickname?: string;
195
- /**
196
- * 该字段表示业务用户ID对应的账号类型,取值:**1**-微信uin,**2**-QQ号,**3**-微信群uin,**4**-qq群号,**5**-微信openid,**6**-QQopenid,**7**-其它string。<br>
197
- 该字段与账号ID参数(UserId)配合使用可确定唯一账号。
198
- */
199
- AccountType?: number;
282
+ Score?: number;
200
283
  /**
201
- * 该字段表示业务用户对应账号的性别信息。<br>
202
- 取值:**0**(默认值,代表性别未知)、**1**(男性)、**2**(女性)。
284
+ * label对应腾讯侧命中标签码
285
+ 注意:此字段可能返回 null,表示取不到有效值。
203
286
  */
204
- Gender?: number;
287
+ TcLabelCodes?: Array<string>;
205
288
  /**
206
- * 该字段表示业务用户对应账号的年龄信息。<br>
207
- 取值:**0**(默认值,代表年龄未知)-(**自定义年龄上限**)之间的整数。
289
+ * 库检测命中详情
290
+ 注意:此字段可能返回 null,表示取不到有效值。
208
291
  */
209
- Age?: number;
292
+ LibResults?: Array<LibCheckResult>;
210
293
  /**
211
- * 该字段表示业务用户对应账号的等级信息。<br>
212
- 取值:**0**(默认值,代表等级未知)、**1**(等级较低)、**2**(等级中等)、**3**(等级较高),目前**暂不支持自定义等级**。
294
+ * 模型检测详情
295
+ 注意:此字段可能返回 null,表示取不到有效值。
213
296
  */
214
- Level?: number;
297
+ ModelResults?: Array<ModelResult>;
215
298
  /**
216
- * 该字段表示业务用户对应账号的手机号信息,支持全球各地区手机号的记录。<br>
217
- 备注:请保持手机号格式的统一,如区号格式(086/+86)等。
299
+ * 情绪正负向检测结果
300
+ 注意:此字段可能返回 null,表示取不到有效值。
218
301
  */
219
- Phone?: string;
302
+ SentimentResult?: SentimentDetail;
303
+ }
304
+ /**
305
+ * ModerateText请求参数结构体
306
+ */
307
+ export interface ModerateTextRequest {
220
308
  /**
221
- * 该字段表示业务用户头像图片的访问链接(URL),支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。
222
- 备注:头像图片大小不超过5MB,建议分辨率不低于256x256;图片下载时间限制为3秒,超过则会返回下载超时。
309
+ * 该字段表示待检测对象的文本内容,文本需要按utf-8格式编码,长度不能超过10000个字符(按unicode编码计算),并进行 Base64加密
223
310
  */
224
- HeadUrl?: string;
311
+ Content: string;
225
312
  /**
226
- * 该字段表示业务用户的简介信息,支持汉字、英文及特殊符号,长度不超过5000个汉字字符。
313
+ * 该字段表示策略的具体编号,用于接口调度,在内容安全控制台中可配置。若不传入Biztype参数(留空),则代表采用默认的识别策略;传入则会在审核时根据业务场景采取不同的审核策略。
314
+ 备注:Biztype仅为数字、字母与下划线的组合,长度为3-32个字符;不同Biztype关联不同的业务场景与识别能力策略,调用前请确认正确的Biztype
227
315
  */
228
- Desc?: string;
316
+ BizType?: string;
229
317
  /**
230
- * 该字段表示业务群聊场景时的房间ID
318
+ * 该字段表示您为待检测对象分配的数据ID,传入后可方便您对文件进行标识和管理。
319
+ 取值:由英文字母(大小写均可)、数字及四个特殊符号(_,-,@,#)组成,长度不超过64个字符
231
320
  */
232
- RoomId?: string;
321
+ DataId?: string;
233
322
  /**
234
- * 该字段表示消息接受者ID
323
+ * 该字段表示待检测对象对应的用户相关信息,传入后可便于甄别相应违规风险用户
235
324
  */
236
- ReceiverId?: string;
325
+ User?: User;
237
326
  /**
238
- * 消息生成时间,精确到毫秒
327
+ * 该字段表示待检测对象对应的设备相关信息,传入后可便于甄别相应违规风险设备
239
328
  */
240
- SendTime?: number;
329
+ Device?: Device;
241
330
  }
242
331
  /**
243
332
  * 用于表示业务用户对应的设备信息
@@ -354,3 +443,93 @@ export interface TextModerationResponse {
354
443
  */
355
444
  RequestId?: string;
356
445
  }
446
+ /**
447
+ * 库检测结果
448
+ */
449
+ export interface LibCheckResult {
450
+ /**
451
+ * 库ID
452
+ 注意:此字段可能返回 null,表示取不到有效值。
453
+ */
454
+ LibId?: string;
455
+ /**
456
+ * 库名称
457
+ 注意:此字段可能返回 null,表示取不到有效值。
458
+ */
459
+ LibName?: string;
460
+ /**
461
+ * 库类型
462
+ 注意:此字段可能返回 null,表示取不到有效值。
463
+ */
464
+ LibType?: number;
465
+ /**
466
+ * 命中的关键词
467
+ 注意:此字段可能返回 null,表示取不到有效值。
468
+ */
469
+ Keyword?: string;
470
+ /**
471
+ * 命中的关键词在送审文本的位置,可能存在多个位置,每个位置显示开始位置和结束位置
472
+ 注意:此字段可能返回 null,表示取不到有效值。
473
+ */
474
+ Positions?: Array<Positions>;
475
+ }
476
+ /**
477
+ * 用于表示业务用户的账号相关信息
478
+ */
479
+ export interface User {
480
+ /**
481
+ * 该字段表示业务用户ID,填写后,系统可根据账号过往违规历史优化审核结果判定,有利于存在可疑违规风险时的辅助判断。<br>
482
+ 备注:该字段可传入微信openid、QQopenid、字符串等账号信息,与账号类别参数(AccountType)配合使用可确定唯一账号。
483
+ */
484
+ UserId?: string;
485
+ /**
486
+ * 该字段表示业务用户对应的账号昵称信息。
487
+ */
488
+ Nickname?: string;
489
+ /**
490
+ * 该字段表示业务用户ID对应的账号类型,取值:**1**-微信uin,**2**-QQ号,**3**-微信群uin,**4**-qq群号,**5**-微信openid,**6**-QQopenid,**7**-其它string。<br>
491
+ 该字段与账号ID参数(UserId)配合使用可确定唯一账号。
492
+ */
493
+ AccountType?: number;
494
+ /**
495
+ * 该字段表示业务用户对应账号的性别信息。<br>
496
+ 取值:**0**(默认值,代表性别未知)、**1**(男性)、**2**(女性)。
497
+ */
498
+ Gender?: number;
499
+ /**
500
+ * 该字段表示业务用户对应账号的年龄信息。<br>
501
+ 取值:**0**(默认值,代表年龄未知)-(**自定义年龄上限**)之间的整数。
502
+ */
503
+ Age?: number;
504
+ /**
505
+ * 该字段表示业务用户对应账号的等级信息。<br>
506
+ 取值:**0**(默认值,代表等级未知)、**1**(等级较低)、**2**(等级中等)、**3**(等级较高),目前**暂不支持自定义等级**。
507
+ */
508
+ Level?: number;
509
+ /**
510
+ * 该字段表示业务用户对应账号的手机号信息,支持全球各地区手机号的记录。<br>
511
+ 备注:请保持手机号格式的统一,如区号格式(086/+86)等。
512
+ */
513
+ Phone?: string;
514
+ /**
515
+ * 该字段表示业务用户头像图片的访问链接(URL),支持PNG、JPG、JPEG、BMP、GIF、WEBP格式。
516
+ 备注:头像图片大小不超过5MB,建议分辨率不低于256x256;图片下载时间限制为3秒,超过则会返回下载超时。
517
+ */
518
+ HeadUrl?: string;
519
+ /**
520
+ * 该字段表示业务用户的简介信息,支持汉字、英文及特殊符号,长度不超过5000个汉字字符。
521
+ */
522
+ Desc?: string;
523
+ /**
524
+ * 该字段表示业务群聊场景时的房间ID。
525
+ */
526
+ RoomId?: string;
527
+ /**
528
+ * 该字段表示消息接受者ID
529
+ */
530
+ ReceiverId?: string;
531
+ /**
532
+ * 消息生成时间,精确到毫秒
533
+ */
534
+ SendTime?: number;
535
+ }