tencentcloud-sdk-tms 3.0.1153 → 3.0.1160
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.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/tencentcloud-sdk-tms.rb +3 -3
- data/lib/v20201229/client.rb +50 -1
- data/lib/v20201229/models.rb +186 -4
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e0e81c3cd11d7f9c6cf19ec98da3dd796a234c6
|
|
4
|
+
data.tar.gz: 010df3aee76648d32c45d78e47a665b13a40d83b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 824996f54034b87d2611c02fd68da6658b3f37935cabf300679930d0ae5bd5058c5c72d6c7b3fbccaae9bdfd5cd1332393d50aac683eeea17c187ad4d4393032
|
|
7
|
+
data.tar.gz: bd935ee940d212d78c251d7e32f015fe1eca6e3e9997530cb3ca9d0adb6e5e582fc739933a440fad59c34247d7ac9c8a136b8345652051eb9ef52cfbad650316
|
data/lib/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.1160
|
data/lib/tencentcloud-sdk-tms.rb
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
require 'tencentcloud-sdk-common'
|
|
4
4
|
|
|
5
|
-
require_relative 'v20200713/client'
|
|
6
|
-
require_relative 'v20200713/models'
|
|
7
|
-
|
|
8
5
|
require_relative 'v20201229/client'
|
|
9
6
|
require_relative 'v20201229/models'
|
|
10
7
|
|
|
8
|
+
require_relative 'v20200713/client'
|
|
9
|
+
require_relative 'v20200713/models'
|
|
10
|
+
|
|
11
11
|
module TencentCloud
|
|
12
12
|
module Tms
|
|
13
13
|
end
|
data/lib/v20201229/client.rb
CHANGED
|
@@ -29,6 +29,54 @@ module TencentCloud
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
# 创建金融大模型审校任务
|
|
33
|
+
|
|
34
|
+
# @param request: Request instance for CreateFinancialLLMTask.
|
|
35
|
+
# @type request: :class:`Tencentcloud::tms::V20201229::CreateFinancialLLMTaskRequest`
|
|
36
|
+
# @rtype: :class:`Tencentcloud::tms::V20201229::CreateFinancialLLMTaskResponse`
|
|
37
|
+
def CreateFinancialLLMTask(request)
|
|
38
|
+
body = send_request('CreateFinancialLLMTask', request.serialize)
|
|
39
|
+
response = JSON.parse(body)
|
|
40
|
+
if response['Response'].key?('Error') == false
|
|
41
|
+
model = CreateFinancialLLMTaskResponse.new
|
|
42
|
+
model.deserialize(response['Response'])
|
|
43
|
+
model
|
|
44
|
+
else
|
|
45
|
+
code = response['Response']['Error']['Code']
|
|
46
|
+
message = response['Response']['Error']['Message']
|
|
47
|
+
reqid = response['Response']['RequestId']
|
|
48
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
49
|
+
end
|
|
50
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
51
|
+
raise e
|
|
52
|
+
rescue StandardError => e
|
|
53
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# 获取金融大模型审校任务结果
|
|
57
|
+
|
|
58
|
+
# @param request: Request instance for GetFinancialLLMTaskResult.
|
|
59
|
+
# @type request: :class:`Tencentcloud::tms::V20201229::GetFinancialLLMTaskResultRequest`
|
|
60
|
+
# @rtype: :class:`Tencentcloud::tms::V20201229::GetFinancialLLMTaskResultResponse`
|
|
61
|
+
def GetFinancialLLMTaskResult(request)
|
|
62
|
+
body = send_request('GetFinancialLLMTaskResult', request.serialize)
|
|
63
|
+
response = JSON.parse(body)
|
|
64
|
+
if response['Response'].key?('Error') == false
|
|
65
|
+
model = GetFinancialLLMTaskResultResponse.new
|
|
66
|
+
model.deserialize(response['Response'])
|
|
67
|
+
model
|
|
68
|
+
else
|
|
69
|
+
code = response['Response']['Error']['Code']
|
|
70
|
+
message = response['Response']['Error']['Message']
|
|
71
|
+
reqid = response['Response']['RequestId']
|
|
72
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
73
|
+
end
|
|
74
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
75
|
+
raise e
|
|
76
|
+
rescue StandardError => e
|
|
77
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
78
|
+
end
|
|
79
|
+
|
|
32
80
|
# 本接口(Text Moderation)用于提交文本内容进行智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通文本内容安全服务](https://console.cloud.tencent.com/cms) 并调整好对应的业务配置。
|
|
33
81
|
|
|
34
82
|
# ### 接口使用说明
|
|
@@ -40,7 +88,8 @@ module TencentCloud
|
|
|
40
88
|
# - 支持识别多种违规场景,包括:低俗、谩骂、色情、广告等场景;
|
|
41
89
|
# - 支持根据不同的业务场景配置自定义的审核策略,可在控制台文本内容安全-策略管理中配置;
|
|
42
90
|
# - 支持用户自定义配置词库黑白名单,打击自定义识别类型的违规文本(目前仅支持黑名单配置);
|
|
43
|
-
# -
|
|
91
|
+
# - 支持在审核文本内容时同时关联账号或设备信息,可识别违规风险账号或设备;
|
|
92
|
+
# - 支持大模型、聊天室等场景下的流式上下文审核。
|
|
44
93
|
|
|
45
94
|
# ### 接口调用说明:
|
|
46
95
|
# - 文本内容大小支持:文本原文长度不能超过unicode编码长度10000个字符;
|
data/lib/v20201229/models.rb
CHANGED
|
@@ -17,6 +17,62 @@
|
|
|
17
17
|
module TencentCloud
|
|
18
18
|
module Tms
|
|
19
19
|
module V20201229
|
|
20
|
+
# CreateFinancialLLMTask请求参数结构体
|
|
21
|
+
class CreateFinancialLLMTaskRequest < TencentCloud::Common::AbstractModel
|
|
22
|
+
# @param BizType: 审核策略BizType
|
|
23
|
+
# @type BizType: String
|
|
24
|
+
# @param FileType: 待审文件类型,目前支持:PDF, DOC, DOCX
|
|
25
|
+
# @type FileType: String
|
|
26
|
+
# @param ContentType: 送审内容类型:1-文档,2-文本
|
|
27
|
+
# @type ContentType: Integer
|
|
28
|
+
# @param Content: 送审内容,根据ContentType字段的取值,传入送审文档的Url链接,或送审文本的Base64编码
|
|
29
|
+
|
|
30
|
+
# 文档限制:
|
|
31
|
+
|
|
32
|
+
# - 文件下载时间不超过15秒(文件存储于腾讯云的Url可保障更高的下载速度和稳定性,建议文件存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。)
|
|
33
|
+
# - 所下载文件经 Base64 编码后不超过支持的文件大小:PDF/DOC/DOCX - 200M
|
|
34
|
+
# - 文档解析后的纯文本长度不超过 10000字
|
|
35
|
+
|
|
36
|
+
# 文本限制:Base64解码后的文本长度不超过10000字
|
|
37
|
+
# @type Content: String
|
|
38
|
+
|
|
39
|
+
attr_accessor :BizType, :FileType, :ContentType, :Content
|
|
40
|
+
|
|
41
|
+
def initialize(biztype=nil, filetype=nil, contenttype=nil, content=nil)
|
|
42
|
+
@BizType = biztype
|
|
43
|
+
@FileType = filetype
|
|
44
|
+
@ContentType = contenttype
|
|
45
|
+
@Content = content
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def deserialize(params)
|
|
49
|
+
@BizType = params['BizType']
|
|
50
|
+
@FileType = params['FileType']
|
|
51
|
+
@ContentType = params['ContentType']
|
|
52
|
+
@Content = params['Content']
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# CreateFinancialLLMTask返回参数结构体
|
|
57
|
+
class CreateFinancialLLMTaskResponse < TencentCloud::Common::AbstractModel
|
|
58
|
+
# @param TaskId: 金融大模型审校任务ID
|
|
59
|
+
# @type TaskId: String
|
|
60
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
61
|
+
# @type RequestId: String
|
|
62
|
+
|
|
63
|
+
attr_accessor :TaskId, :RequestId
|
|
64
|
+
|
|
65
|
+
def initialize(taskid=nil, requestid=nil)
|
|
66
|
+
@TaskId = taskid
|
|
67
|
+
@RequestId = requestid
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def deserialize(params)
|
|
71
|
+
@TaskId = params['TaskId']
|
|
72
|
+
@RequestId = params['RequestId']
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
20
76
|
# 文本审核返回的详细结果
|
|
21
77
|
class DetailResults < TencentCloud::Common::AbstractModel
|
|
22
78
|
# @param Label: 该字段用于返回检测结果所对应的全部恶意标签。<br>返回值:**Normal**:正常,**Porn**:色情,**Abuse**:谩骂,**Ad**:广告;以及其他令人反感、不安全或不适宜的内容类型。
|
|
@@ -126,6 +182,124 @@ module TencentCloud
|
|
|
126
182
|
end
|
|
127
183
|
end
|
|
128
184
|
|
|
185
|
+
# 金融大模型审校 违规明细
|
|
186
|
+
class FinancialLLMViolationDetail < TencentCloud::Common::AbstractModel
|
|
187
|
+
# @param Label: 违规点
|
|
188
|
+
# @type Label: String
|
|
189
|
+
# @param Suggestion: 处置建议
|
|
190
|
+
# @type Suggestion: String
|
|
191
|
+
# @param Reasons: 违规原因列表
|
|
192
|
+
# @type Reasons: Array
|
|
193
|
+
|
|
194
|
+
attr_accessor :Label, :Suggestion, :Reasons
|
|
195
|
+
|
|
196
|
+
def initialize(label=nil, suggestion=nil, reasons=nil)
|
|
197
|
+
@Label = label
|
|
198
|
+
@Suggestion = suggestion
|
|
199
|
+
@Reasons = reasons
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def deserialize(params)
|
|
203
|
+
@Label = params['Label']
|
|
204
|
+
@Suggestion = params['Suggestion']
|
|
205
|
+
unless params['Reasons'].nil?
|
|
206
|
+
@Reasons = []
|
|
207
|
+
params['Reasons'].each do |i|
|
|
208
|
+
financialllmviolationreason_tmp = FinancialLLMViolationReason.new
|
|
209
|
+
financialllmviolationreason_tmp.deserialize(i)
|
|
210
|
+
@Reasons << financialllmviolationreason_tmp
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# 金融大模型审校-违规原因
|
|
217
|
+
class FinancialLLMViolationReason < TencentCloud::Common::AbstractModel
|
|
218
|
+
# @param TargetText: 违规原文片段
|
|
219
|
+
# @type TargetText: String
|
|
220
|
+
# @param Reason: 违规原因
|
|
221
|
+
# @type Reason: String
|
|
222
|
+
|
|
223
|
+
attr_accessor :TargetText, :Reason
|
|
224
|
+
|
|
225
|
+
def initialize(targettext=nil, reason=nil)
|
|
226
|
+
@TargetText = targettext
|
|
227
|
+
@Reason = reason
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
def deserialize(params)
|
|
231
|
+
@TargetText = params['TargetText']
|
|
232
|
+
@Reason = params['Reason']
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# GetFinancialLLMTaskResult请求参数结构体
|
|
237
|
+
class GetFinancialLLMTaskResultRequest < TencentCloud::Common::AbstractModel
|
|
238
|
+
# @param TaskId: 金融大模型审校任务ID
|
|
239
|
+
# @type TaskId: String
|
|
240
|
+
|
|
241
|
+
attr_accessor :TaskId
|
|
242
|
+
|
|
243
|
+
def initialize(taskid=nil)
|
|
244
|
+
@TaskId = taskid
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
def deserialize(params)
|
|
248
|
+
@TaskId = params['TaskId']
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# GetFinancialLLMTaskResult返回参数结构体
|
|
253
|
+
class GetFinancialLLMTaskResultResponse < TencentCloud::Common::AbstractModel
|
|
254
|
+
# @param Status: 审校任务状态:
|
|
255
|
+
|
|
256
|
+
# - Success: 成功
|
|
257
|
+
# - Processing: 处理中,请等待
|
|
258
|
+
# - Failed: 失败
|
|
259
|
+
# @type Status: String
|
|
260
|
+
# @param ModerationResult: 大模型审校结果
|
|
261
|
+
# @type ModerationResult: String
|
|
262
|
+
# @param FailureReason: 审校任务失败原因,仅当任务失败时有值
|
|
263
|
+
# @type FailureReason: String
|
|
264
|
+
# @param StartTime: 审校任务开始时间
|
|
265
|
+
# @type StartTime: String
|
|
266
|
+
# @param ReviewedLabels: 本次检测的违规点列表
|
|
267
|
+
# @type ReviewedLabels: Array
|
|
268
|
+
# @param Details: 违规明细
|
|
269
|
+
# @type Details: Array
|
|
270
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
271
|
+
# @type RequestId: String
|
|
272
|
+
|
|
273
|
+
attr_accessor :Status, :ModerationResult, :FailureReason, :StartTime, :ReviewedLabels, :Details, :RequestId
|
|
274
|
+
|
|
275
|
+
def initialize(status=nil, moderationresult=nil, failurereason=nil, starttime=nil, reviewedlabels=nil, details=nil, requestid=nil)
|
|
276
|
+
@Status = status
|
|
277
|
+
@ModerationResult = moderationresult
|
|
278
|
+
@FailureReason = failurereason
|
|
279
|
+
@StartTime = starttime
|
|
280
|
+
@ReviewedLabels = reviewedlabels
|
|
281
|
+
@Details = details
|
|
282
|
+
@RequestId = requestid
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
def deserialize(params)
|
|
286
|
+
@Status = params['Status']
|
|
287
|
+
@ModerationResult = params['ModerationResult']
|
|
288
|
+
@FailureReason = params['FailureReason']
|
|
289
|
+
@StartTime = params['StartTime']
|
|
290
|
+
@ReviewedLabels = params['ReviewedLabels']
|
|
291
|
+
unless params['Details'].nil?
|
|
292
|
+
@Details = []
|
|
293
|
+
params['Details'].each do |i|
|
|
294
|
+
financialllmviolationdetail_tmp = FinancialLLMViolationDetail.new
|
|
295
|
+
financialllmviolationdetail_tmp.deserialize(i)
|
|
296
|
+
@Details << financialllmviolationdetail_tmp
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
@RequestId = params['RequestId']
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
129
303
|
# 关键词命中位置信息
|
|
130
304
|
class HitInfo < TencentCloud::Common::AbstractModel
|
|
131
305
|
# @param Type: 标识模型命中还是关键词命中
|
|
@@ -297,10 +471,12 @@ module TencentCloud
|
|
|
297
471
|
# @type SourceLanguage: String
|
|
298
472
|
# @param Type: 审核的业务类型,枚举值包括"TEXT"和"TEXT_AIGC"。其中"TEXT"表示传统文本审核,"TEXT_AIGC"表示AI生成检测(生成检测能力具体能力了解可[参见文档](https://cloud.tencent.com/document/product/1124/118694))。
|
|
299
473
|
# @type Type: String
|
|
474
|
+
# @param SessionId: 流式审核策略维度下的唯一会话ID
|
|
475
|
+
# @type SessionId: String
|
|
300
476
|
|
|
301
|
-
attr_accessor :Content, :BizType, :DataId, :User, :Device, :SourceLanguage, :Type
|
|
477
|
+
attr_accessor :Content, :BizType, :DataId, :User, :Device, :SourceLanguage, :Type, :SessionId
|
|
302
478
|
|
|
303
|
-
def initialize(content=nil, biztype=nil, dataid=nil, user=nil, device=nil, sourcelanguage=nil, type=nil)
|
|
479
|
+
def initialize(content=nil, biztype=nil, dataid=nil, user=nil, device=nil, sourcelanguage=nil, type=nil, sessionid=nil)
|
|
304
480
|
@Content = content
|
|
305
481
|
@BizType = biztype
|
|
306
482
|
@DataId = dataid
|
|
@@ -308,6 +484,7 @@ module TencentCloud
|
|
|
308
484
|
@Device = device
|
|
309
485
|
@SourceLanguage = sourcelanguage
|
|
310
486
|
@Type = type
|
|
487
|
+
@SessionId = sessionid
|
|
311
488
|
end
|
|
312
489
|
|
|
313
490
|
def deserialize(params)
|
|
@@ -324,6 +501,7 @@ module TencentCloud
|
|
|
324
501
|
end
|
|
325
502
|
@SourceLanguage = params['SourceLanguage']
|
|
326
503
|
@Type = params['Type']
|
|
504
|
+
@SessionId = params['SessionId']
|
|
327
505
|
end
|
|
328
506
|
end
|
|
329
507
|
|
|
@@ -359,12 +537,14 @@ module TencentCloud
|
|
|
359
537
|
# @type SentimentAnalysis: :class:`Tencentcloud::Tms.v20201229.models.SentimentAnalysis`
|
|
360
538
|
# @param HitType: 该字段用于标识本次审核决策归因,比如text_nlp_tianji标识是由nlp tianji模型给出的审核决策,text_keyword_public标识命中了业务的关键词库
|
|
361
539
|
# @type HitType: String
|
|
540
|
+
# @param SessionId: 流式审核策略维度下的唯一会话ID
|
|
541
|
+
# @type SessionId: String
|
|
362
542
|
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
|
363
543
|
# @type RequestId: String
|
|
364
544
|
|
|
365
|
-
attr_accessor :BizType, :Label, :Suggestion, :Keywords, :Score, :DetailResults, :RiskDetails, :Extra, :DataId, :SubLabel, :ContextText, :SentimentAnalysis, :HitType, :RequestId
|
|
545
|
+
attr_accessor :BizType, :Label, :Suggestion, :Keywords, :Score, :DetailResults, :RiskDetails, :Extra, :DataId, :SubLabel, :ContextText, :SentimentAnalysis, :HitType, :SessionId, :RequestId
|
|
366
546
|
|
|
367
|
-
def initialize(biztype=nil, label=nil, suggestion=nil, keywords=nil, score=nil, detailresults=nil, riskdetails=nil, extra=nil, dataid=nil, sublabel=nil, contexttext=nil, sentimentanalysis=nil, hittype=nil, requestid=nil)
|
|
547
|
+
def initialize(biztype=nil, label=nil, suggestion=nil, keywords=nil, score=nil, detailresults=nil, riskdetails=nil, extra=nil, dataid=nil, sublabel=nil, contexttext=nil, sentimentanalysis=nil, hittype=nil, sessionid=nil, requestid=nil)
|
|
368
548
|
@BizType = biztype
|
|
369
549
|
@Label = label
|
|
370
550
|
@Suggestion = suggestion
|
|
@@ -378,6 +558,7 @@ module TencentCloud
|
|
|
378
558
|
@ContextText = contexttext
|
|
379
559
|
@SentimentAnalysis = sentimentanalysis
|
|
380
560
|
@HitType = hittype
|
|
561
|
+
@SessionId = sessionid
|
|
381
562
|
@RequestId = requestid
|
|
382
563
|
end
|
|
383
564
|
|
|
@@ -412,6 +593,7 @@ module TencentCloud
|
|
|
412
593
|
@SentimentAnalysis.deserialize(params['SentimentAnalysis'])
|
|
413
594
|
end
|
|
414
595
|
@HitType = params['HitType']
|
|
596
|
+
@SessionId = params['SessionId']
|
|
415
597
|
@RequestId = params['RequestId']
|
|
416
598
|
end
|
|
417
599
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tencentcloud-sdk-tms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1160
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tencent Cloud
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-10-
|
|
11
|
+
date: 2025-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: tencentcloud-sdk-common
|
|
@@ -33,9 +33,9 @@ executables: []
|
|
|
33
33
|
extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
|
35
35
|
files:
|
|
36
|
-
- lib/tencentcloud-sdk-tms.rb
|
|
37
36
|
- lib/v20200713/models.rb
|
|
38
37
|
- lib/v20200713/client.rb
|
|
38
|
+
- lib/tencentcloud-sdk-tms.rb
|
|
39
39
|
- lib/v20201229/models.rb
|
|
40
40
|
- lib/v20201229/client.rb
|
|
41
41
|
- lib/VERSION
|