tencentcloud-sdk-hunyuan 3.0.936 → 3.0.937
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20230901/client.rb +218 -0
- data/lib/v20230901/models.rb +882 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52c4ee20e90a2e11d2fe754d011f1c6311295d52
|
4
|
+
data.tar.gz: 042c50ae3282f0ea5e25f81839f40c9de2048c5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5222c7e8cbe5e6824e261dd98896f9cf0ce031e8a4b1ffec74c42625228ea6858419bf6ee2d8e414227b0b55aa2b06618c048f8805c1418278274dcdbe7f86c
|
7
|
+
data.tar.gz: 8921900b74aff1194237b41f7590ce4b00800a08758f33f18e060940a862b1cc392d001b97ff9ffa08c42757422c38095b3d15c0232fe525eec3256f792808d9
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.937
|
data/lib/v20230901/client.rb
CHANGED
@@ -82,6 +82,108 @@ module TencentCloud
|
|
82
82
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
83
83
|
end
|
84
84
|
|
85
|
+
# 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
86
|
+
|
87
|
+
# 1. 本接口暂不支持返回图片内容。
|
88
|
+
# 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。
|
89
|
+
# 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。
|
90
|
+
# 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。
|
91
|
+
|
92
|
+
# @param request: Request instance for CreateThread.
|
93
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::CreateThreadRequest`
|
94
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::CreateThreadResponse`
|
95
|
+
def CreateThread(request)
|
96
|
+
body = send_request('CreateThread', request.serialize)
|
97
|
+
response = JSON.parse(body)
|
98
|
+
if response['Response'].key?('Error') == false
|
99
|
+
model = CreateThreadResponse.new
|
100
|
+
model.deserialize(response['Response'])
|
101
|
+
model
|
102
|
+
else
|
103
|
+
code = response['Response']['Error']['Code']
|
104
|
+
message = response['Response']['Error']['Message']
|
105
|
+
reqid = response['Response']['RequestId']
|
106
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
107
|
+
end
|
108
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
109
|
+
raise e
|
110
|
+
rescue StandardError => e
|
111
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
112
|
+
end
|
113
|
+
|
114
|
+
# 删除文件。
|
115
|
+
|
116
|
+
# @param request: Request instance for FilesDeletions.
|
117
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::FilesDeletionsRequest`
|
118
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::FilesDeletionsResponse`
|
119
|
+
def FilesDeletions(request)
|
120
|
+
body = send_request('FilesDeletions', request.serialize)
|
121
|
+
response = JSON.parse(body)
|
122
|
+
if response['Response'].key?('Error') == false
|
123
|
+
model = FilesDeletionsResponse.new
|
124
|
+
model.deserialize(response['Response'])
|
125
|
+
model
|
126
|
+
else
|
127
|
+
code = response['Response']['Error']['Code']
|
128
|
+
message = response['Response']['Error']['Message']
|
129
|
+
reqid = response['Response']['RequestId']
|
130
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
131
|
+
end
|
132
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
133
|
+
raise e
|
134
|
+
rescue StandardError => e
|
135
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
136
|
+
end
|
137
|
+
|
138
|
+
# 文件列表。
|
139
|
+
|
140
|
+
# @param request: Request instance for FilesList.
|
141
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::FilesListRequest`
|
142
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::FilesListResponse`
|
143
|
+
def FilesList(request)
|
144
|
+
body = send_request('FilesList', request.serialize)
|
145
|
+
response = JSON.parse(body)
|
146
|
+
if response['Response'].key?('Error') == false
|
147
|
+
model = FilesListResponse.new
|
148
|
+
model.deserialize(response['Response'])
|
149
|
+
model
|
150
|
+
else
|
151
|
+
code = response['Response']['Error']['Code']
|
152
|
+
message = response['Response']['Error']['Message']
|
153
|
+
reqid = response['Response']['RequestId']
|
154
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
155
|
+
end
|
156
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
157
|
+
raise e
|
158
|
+
rescue StandardError => e
|
159
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
160
|
+
end
|
161
|
+
|
162
|
+
# 上传用于不同用途的的文件。
|
163
|
+
# 当前用途仅支持 hunyuan 等模型的文档理解。
|
164
|
+
|
165
|
+
# @param request: Request instance for FilesUploads.
|
166
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::FilesUploadsRequest`
|
167
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::FilesUploadsResponse`
|
168
|
+
def FilesUploads(request)
|
169
|
+
body = send_request('FilesUploads', request.serialize)
|
170
|
+
response = JSON.parse(body)
|
171
|
+
if response['Response'].key?('Error') == false
|
172
|
+
model = FilesUploadsResponse.new
|
173
|
+
model.deserialize(response['Response'])
|
174
|
+
model
|
175
|
+
else
|
176
|
+
code = response['Response']['Error']['Code']
|
177
|
+
message = response['Response']['Error']['Message']
|
178
|
+
reqid = response['Response']['RequestId']
|
179
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
180
|
+
end
|
181
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
182
|
+
raise e
|
183
|
+
rescue StandardError => e
|
184
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
185
|
+
end
|
186
|
+
|
85
187
|
# 腾讯混元 Embedding 接口,可以将文本转化为高质量的向量数据。向量维度为1024维。
|
86
188
|
|
87
189
|
# @param request: Request instance for GetEmbedding.
|
@@ -106,6 +208,93 @@ module TencentCloud
|
|
106
208
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
107
209
|
end
|
108
210
|
|
211
|
+
# 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
212
|
+
|
213
|
+
# 1. 本接口暂不支持返回图片内容。
|
214
|
+
# 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。
|
215
|
+
# 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。
|
216
|
+
# 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。
|
217
|
+
|
218
|
+
# @param request: Request instance for GetThread.
|
219
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::GetThreadRequest`
|
220
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::GetThreadResponse`
|
221
|
+
def GetThread(request)
|
222
|
+
body = send_request('GetThread', request.serialize)
|
223
|
+
response = JSON.parse(body)
|
224
|
+
if response['Response'].key?('Error') == false
|
225
|
+
model = GetThreadResponse.new
|
226
|
+
model.deserialize(response['Response'])
|
227
|
+
model
|
228
|
+
else
|
229
|
+
code = response['Response']['Error']['Code']
|
230
|
+
message = response['Response']['Error']['Message']
|
231
|
+
reqid = response['Response']['RequestId']
|
232
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
233
|
+
end
|
234
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
235
|
+
raise e
|
236
|
+
rescue StandardError => e
|
237
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
238
|
+
end
|
239
|
+
|
240
|
+
# 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
241
|
+
|
242
|
+
# 1. 本接口暂不支持返回图片内容。
|
243
|
+
# 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。
|
244
|
+
# 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。
|
245
|
+
# 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。
|
246
|
+
|
247
|
+
# @param request: Request instance for GetThreadMessage.
|
248
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::GetThreadMessageRequest`
|
249
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::GetThreadMessageResponse`
|
250
|
+
def GetThreadMessage(request)
|
251
|
+
body = send_request('GetThreadMessage', request.serialize)
|
252
|
+
response = JSON.parse(body)
|
253
|
+
if response['Response'].key?('Error') == false
|
254
|
+
model = GetThreadMessageResponse.new
|
255
|
+
model.deserialize(response['Response'])
|
256
|
+
model
|
257
|
+
else
|
258
|
+
code = response['Response']['Error']['Code']
|
259
|
+
message = response['Response']['Error']['Message']
|
260
|
+
reqid = response['Response']['RequestId']
|
261
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
262
|
+
end
|
263
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
264
|
+
raise e
|
265
|
+
rescue StandardError => e
|
266
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
267
|
+
end
|
268
|
+
|
269
|
+
# 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
270
|
+
|
271
|
+
# 1. 本接口暂不支持返回图片内容。
|
272
|
+
# 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。
|
273
|
+
# 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。
|
274
|
+
# 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。
|
275
|
+
|
276
|
+
# @param request: Request instance for GetThreadMessageList.
|
277
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::GetThreadMessageListRequest`
|
278
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::GetThreadMessageListResponse`
|
279
|
+
def GetThreadMessageList(request)
|
280
|
+
body = send_request('GetThreadMessageList', request.serialize)
|
281
|
+
response = JSON.parse(body)
|
282
|
+
if response['Response'].key?('Error') == false
|
283
|
+
model = GetThreadMessageListResponse.new
|
284
|
+
model.deserialize(response['Response'])
|
285
|
+
model
|
286
|
+
else
|
287
|
+
code = response['Response']['Error']['Code']
|
288
|
+
message = response['Response']['Error']['Message']
|
289
|
+
reqid = response['Response']['RequestId']
|
290
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
291
|
+
end
|
292
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
293
|
+
raise e
|
294
|
+
rescue StandardError => e
|
295
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
296
|
+
end
|
297
|
+
|
109
298
|
# 该接口用于计算文本对应Token数、字符数。
|
110
299
|
|
111
300
|
# @param request: Request instance for GetTokenCount.
|
@@ -184,6 +373,35 @@ module TencentCloud
|
|
184
373
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
185
374
|
end
|
186
375
|
|
376
|
+
# 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。
|
377
|
+
|
378
|
+
# 1. 本接口暂不支持返回图片内容。
|
379
|
+
# 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。
|
380
|
+
# 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。
|
381
|
+
# 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。
|
382
|
+
|
383
|
+
# @param request: Request instance for RunThread.
|
384
|
+
# @type request: :class:`Tencentcloud::hunyuan::V20230901::RunThreadRequest`
|
385
|
+
# @rtype: :class:`Tencentcloud::hunyuan::V20230901::RunThreadResponse`
|
386
|
+
def RunThread(request)
|
387
|
+
body = send_request('RunThread', request.serialize)
|
388
|
+
response = JSON.parse(body)
|
389
|
+
if response['Response'].key?('Error') == false
|
390
|
+
model = RunThreadResponse.new
|
391
|
+
model.deserialize(response['Response'])
|
392
|
+
model
|
393
|
+
else
|
394
|
+
code = response['Response']['Error']['Code']
|
395
|
+
message = response['Response']['Error']['Message']
|
396
|
+
reqid = response['Response']['RequestId']
|
397
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
398
|
+
end
|
399
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
400
|
+
raise e
|
401
|
+
rescue StandardError => e
|
402
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
403
|
+
end
|
404
|
+
|
187
405
|
# 设置付费模式
|
188
406
|
|
189
407
|
# @param request: Request instance for SetPayMode.
|
data/lib/v20230901/models.rb
CHANGED
@@ -342,6 +342,53 @@ module TencentCloud
|
|
342
342
|
end
|
343
343
|
end
|
344
344
|
|
345
|
+
# CreateThread请求参数结构体
|
346
|
+
class CreateThreadRequest < TencentCloud::Common::AbstractModel
|
347
|
+
|
348
|
+
|
349
|
+
def initialize()
|
350
|
+
end
|
351
|
+
|
352
|
+
def deserialize(params)
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
# CreateThread返回参数结构体
|
357
|
+
class CreateThreadResponse < TencentCloud::Common::AbstractModel
|
358
|
+
# @param ID: 会话 ID
|
359
|
+
# @type ID: String
|
360
|
+
# @param Object: 对象类型
|
361
|
+
# @type Object: String
|
362
|
+
# @param CreatedAt: 创建时间,Unix 时间戳,单位为秒。
|
363
|
+
# @type CreatedAt: Integer
|
364
|
+
# @param ToolResources: 提供给工具的资源列表
|
365
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
366
|
+
# @type ToolResources: :class:`Tencentcloud::Hunyuan.v20230901.models.ThreadToolResources`
|
367
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
368
|
+
# @type RequestId: String
|
369
|
+
|
370
|
+
attr_accessor :ID, :Object, :CreatedAt, :ToolResources, :RequestId
|
371
|
+
|
372
|
+
def initialize(id=nil, object=nil, createdat=nil, toolresources=nil, requestid=nil)
|
373
|
+
@ID = id
|
374
|
+
@Object = object
|
375
|
+
@CreatedAt = createdat
|
376
|
+
@ToolResources = toolresources
|
377
|
+
@RequestId = requestid
|
378
|
+
end
|
379
|
+
|
380
|
+
def deserialize(params)
|
381
|
+
@ID = params['ID']
|
382
|
+
@Object = params['Object']
|
383
|
+
@CreatedAt = params['CreatedAt']
|
384
|
+
unless params['ToolResources'].nil?
|
385
|
+
@ToolResources = ThreadToolResources.new
|
386
|
+
@ToolResources.deserialize(params['ToolResources'])
|
387
|
+
end
|
388
|
+
@RequestId = params['RequestId']
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
345
392
|
# 返回的内容(流式返回)
|
346
393
|
class Delta < TencentCloud::Common::AbstractModel
|
347
394
|
# @param Role: 角色名称。
|
@@ -446,6 +493,201 @@ module TencentCloud
|
|
446
493
|
end
|
447
494
|
end
|
448
495
|
|
496
|
+
# 已上传的文件对象。
|
497
|
+
class FileObject < TencentCloud::Common::AbstractModel
|
498
|
+
# @param ID: 文件标识符,可在各个API中引用。
|
499
|
+
# @type ID: String
|
500
|
+
# @param Object: 对象类型,始终为 file。
|
501
|
+
# @type Object: String
|
502
|
+
# @param Bytes: 文件大小,单位为字节。
|
503
|
+
# @type Bytes: Integer
|
504
|
+
# @param CreatedAt: 文件创建时的 Unix 时间戳(秒)。
|
505
|
+
# @type CreatedAt: Integer
|
506
|
+
# @param Filename: 文件名。
|
507
|
+
# @type Filename: String
|
508
|
+
# @param Purpose: 上传文件的用途。
|
509
|
+
# @type Purpose: String
|
510
|
+
|
511
|
+
attr_accessor :ID, :Object, :Bytes, :CreatedAt, :Filename, :Purpose
|
512
|
+
|
513
|
+
def initialize(id=nil, object=nil, bytes=nil, createdat=nil, filename=nil, purpose=nil)
|
514
|
+
@ID = id
|
515
|
+
@Object = object
|
516
|
+
@Bytes = bytes
|
517
|
+
@CreatedAt = createdat
|
518
|
+
@Filename = filename
|
519
|
+
@Purpose = purpose
|
520
|
+
end
|
521
|
+
|
522
|
+
def deserialize(params)
|
523
|
+
@ID = params['ID']
|
524
|
+
@Object = params['Object']
|
525
|
+
@Bytes = params['Bytes']
|
526
|
+
@CreatedAt = params['CreatedAt']
|
527
|
+
@Filename = params['Filename']
|
528
|
+
@Purpose = params['Purpose']
|
529
|
+
end
|
530
|
+
end
|
531
|
+
|
532
|
+
# FilesDeletions请求参数结构体
|
533
|
+
class FilesDeletionsRequest < TencentCloud::Common::AbstractModel
|
534
|
+
# @param ID: 文件标识符。
|
535
|
+
# @type ID: String
|
536
|
+
|
537
|
+
attr_accessor :ID
|
538
|
+
|
539
|
+
def initialize(id=nil)
|
540
|
+
@ID = id
|
541
|
+
end
|
542
|
+
|
543
|
+
def deserialize(params)
|
544
|
+
@ID = params['ID']
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
# FilesDeletions返回参数结构体
|
549
|
+
class FilesDeletionsResponse < TencentCloud::Common::AbstractModel
|
550
|
+
# @param ID: 文件标识符。
|
551
|
+
# @type ID: String
|
552
|
+
# @param Object: 对象类型,始终为 file。
|
553
|
+
# @type Object: String
|
554
|
+
# @param Deleted: 是否删除成功。
|
555
|
+
# @type Deleted: Boolean
|
556
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
557
|
+
# @type RequestId: String
|
558
|
+
|
559
|
+
attr_accessor :ID, :Object, :Deleted, :RequestId
|
560
|
+
|
561
|
+
def initialize(id=nil, object=nil, deleted=nil, requestid=nil)
|
562
|
+
@ID = id
|
563
|
+
@Object = object
|
564
|
+
@Deleted = deleted
|
565
|
+
@RequestId = requestid
|
566
|
+
end
|
567
|
+
|
568
|
+
def deserialize(params)
|
569
|
+
@ID = params['ID']
|
570
|
+
@Object = params['Object']
|
571
|
+
@Deleted = params['Deleted']
|
572
|
+
@RequestId = params['RequestId']
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
# FilesList请求参数结构体
|
577
|
+
class FilesListRequest < TencentCloud::Common::AbstractModel
|
578
|
+
# @param Offset: 分页偏移量。
|
579
|
+
# @type Offset: Integer
|
580
|
+
# @param Limit: 每页数量,最大 100。
|
581
|
+
# @type Limit: Integer
|
582
|
+
|
583
|
+
attr_accessor :Offset, :Limit
|
584
|
+
|
585
|
+
def initialize(offset=nil, limit=nil)
|
586
|
+
@Offset = offset
|
587
|
+
@Limit = limit
|
588
|
+
end
|
589
|
+
|
590
|
+
def deserialize(params)
|
591
|
+
@Offset = params['Offset']
|
592
|
+
@Limit = params['Limit']
|
593
|
+
end
|
594
|
+
end
|
595
|
+
|
596
|
+
# FilesList返回参数结构体
|
597
|
+
class FilesListResponse < TencentCloud::Common::AbstractModel
|
598
|
+
# @param Total: 文件数量。
|
599
|
+
# @type Total: Integer
|
600
|
+
# @param Object: 对象类型,始终为 list。
|
601
|
+
# @type Object: String
|
602
|
+
# @param Data: FileObject 列表。
|
603
|
+
# @type Data: Array
|
604
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
605
|
+
# @type RequestId: String
|
606
|
+
|
607
|
+
attr_accessor :Total, :Object, :Data, :RequestId
|
608
|
+
|
609
|
+
def initialize(total=nil, object=nil, data=nil, requestid=nil)
|
610
|
+
@Total = total
|
611
|
+
@Object = object
|
612
|
+
@Data = data
|
613
|
+
@RequestId = requestid
|
614
|
+
end
|
615
|
+
|
616
|
+
def deserialize(params)
|
617
|
+
@Total = params['Total']
|
618
|
+
@Object = params['Object']
|
619
|
+
unless params['Data'].nil?
|
620
|
+
@Data = []
|
621
|
+
params['Data'].each do |i|
|
622
|
+
fileobject_tmp = FileObject.new
|
623
|
+
fileobject_tmp.deserialize(i)
|
624
|
+
@Data << fileobject_tmp
|
625
|
+
end
|
626
|
+
end
|
627
|
+
@RequestId = params['RequestId']
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
# FilesUploads请求参数结构体
|
632
|
+
class FilesUploadsRequest < TencentCloud::Common::AbstractModel
|
633
|
+
# @param Name: 文件名。
|
634
|
+
# @type Name: String
|
635
|
+
# @param URL: 文件链接。目前仅支持 pdf 格式,单文件大小限制为100M。
|
636
|
+
# @type URL: String
|
637
|
+
|
638
|
+
attr_accessor :Name, :URL
|
639
|
+
|
640
|
+
def initialize(name=nil, url=nil)
|
641
|
+
@Name = name
|
642
|
+
@URL = url
|
643
|
+
end
|
644
|
+
|
645
|
+
def deserialize(params)
|
646
|
+
@Name = params['Name']
|
647
|
+
@URL = params['URL']
|
648
|
+
end
|
649
|
+
end
|
650
|
+
|
651
|
+
# FilesUploads返回参数结构体
|
652
|
+
class FilesUploadsResponse < TencentCloud::Common::AbstractModel
|
653
|
+
# @param ID: 文件标识符,可在各个API中引用。
|
654
|
+
# @type ID: String
|
655
|
+
# @param Object: 对象类型,始终为 file。
|
656
|
+
# @type Object: String
|
657
|
+
# @param Bytes: 文件大小,单位为字节。
|
658
|
+
# @type Bytes: Integer
|
659
|
+
# @param CreatedAt: 文件创建时的 Unix 时间戳(秒)。
|
660
|
+
# @type CreatedAt: Integer
|
661
|
+
# @param Filename: 文件名。
|
662
|
+
# @type Filename: String
|
663
|
+
# @param Purpose: 上传文件的用途。
|
664
|
+
# @type Purpose: String
|
665
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
666
|
+
# @type RequestId: String
|
667
|
+
|
668
|
+
attr_accessor :ID, :Object, :Bytes, :CreatedAt, :Filename, :Purpose, :RequestId
|
669
|
+
|
670
|
+
def initialize(id=nil, object=nil, bytes=nil, createdat=nil, filename=nil, purpose=nil, requestid=nil)
|
671
|
+
@ID = id
|
672
|
+
@Object = object
|
673
|
+
@Bytes = bytes
|
674
|
+
@CreatedAt = createdat
|
675
|
+
@Filename = filename
|
676
|
+
@Purpose = purpose
|
677
|
+
@RequestId = requestid
|
678
|
+
end
|
679
|
+
|
680
|
+
def deserialize(params)
|
681
|
+
@ID = params['ID']
|
682
|
+
@Object = params['Object']
|
683
|
+
@Bytes = params['Bytes']
|
684
|
+
@CreatedAt = params['CreatedAt']
|
685
|
+
@Filename = params['Filename']
|
686
|
+
@Purpose = params['Purpose']
|
687
|
+
@RequestId = params['RequestId']
|
688
|
+
end
|
689
|
+
end
|
690
|
+
|
449
691
|
# GetEmbedding请求参数结构体
|
450
692
|
class GetEmbeddingRequest < TencentCloud::Common::AbstractModel
|
451
693
|
# @param Input: 输入文本。总长度不超过 1024 个 Token,超过则会截断最后面的内容。
|
@@ -496,6 +738,231 @@ module TencentCloud
|
|
496
738
|
end
|
497
739
|
end
|
498
740
|
|
741
|
+
# GetThreadMessageList请求参数结构体
|
742
|
+
class GetThreadMessageListRequest < TencentCloud::Common::AbstractModel
|
743
|
+
# @param ThreadID: 会话 ID
|
744
|
+
# @type ThreadID: String
|
745
|
+
# @param Limit: 返回的消息条数,1 - 100 条
|
746
|
+
# @type Limit: Integer
|
747
|
+
# @param Order: 排序方式,按创建时间升序(asc)或降序(desc),默认为 desc
|
748
|
+
# @type Order: String
|
749
|
+
|
750
|
+
attr_accessor :ThreadID, :Limit, :Order
|
751
|
+
|
752
|
+
def initialize(threadid=nil, limit=nil, order=nil)
|
753
|
+
@ThreadID = threadid
|
754
|
+
@Limit = limit
|
755
|
+
@Order = order
|
756
|
+
end
|
757
|
+
|
758
|
+
def deserialize(params)
|
759
|
+
@ThreadID = params['ThreadID']
|
760
|
+
@Limit = params['Limit']
|
761
|
+
@Order = params['Order']
|
762
|
+
end
|
763
|
+
end
|
764
|
+
|
765
|
+
# GetThreadMessageList返回参数结构体
|
766
|
+
class GetThreadMessageListResponse < TencentCloud::Common::AbstractModel
|
767
|
+
# @param Data: 消息列表
|
768
|
+
# @type Data: Array
|
769
|
+
# @param FirstID: 第一条消息 ID
|
770
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
771
|
+
# @type FirstID: String
|
772
|
+
# @param LastID: 最后一条消息 ID
|
773
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
774
|
+
# @type LastID: Integer
|
775
|
+
# @param HasMore: 是否还有更多消息
|
776
|
+
# @type HasMore: Boolean
|
777
|
+
# @param Object: 对象类型
|
778
|
+
# @type Object: String
|
779
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
780
|
+
# @type RequestId: String
|
781
|
+
|
782
|
+
attr_accessor :Data, :FirstID, :LastID, :HasMore, :Object, :RequestId
|
783
|
+
|
784
|
+
def initialize(data=nil, firstid=nil, lastid=nil, hasmore=nil, object=nil, requestid=nil)
|
785
|
+
@Data = data
|
786
|
+
@FirstID = firstid
|
787
|
+
@LastID = lastid
|
788
|
+
@HasMore = hasmore
|
789
|
+
@Object = object
|
790
|
+
@RequestId = requestid
|
791
|
+
end
|
792
|
+
|
793
|
+
def deserialize(params)
|
794
|
+
unless params['Data'].nil?
|
795
|
+
@Data = []
|
796
|
+
params['Data'].each do |i|
|
797
|
+
threadmessage_tmp = ThreadMessage.new
|
798
|
+
threadmessage_tmp.deserialize(i)
|
799
|
+
@Data << threadmessage_tmp
|
800
|
+
end
|
801
|
+
end
|
802
|
+
@FirstID = params['FirstID']
|
803
|
+
@LastID = params['LastID']
|
804
|
+
@HasMore = params['HasMore']
|
805
|
+
@Object = params['Object']
|
806
|
+
@RequestId = params['RequestId']
|
807
|
+
end
|
808
|
+
end
|
809
|
+
|
810
|
+
# GetThreadMessage请求参数结构体
|
811
|
+
class GetThreadMessageRequest < TencentCloud::Common::AbstractModel
|
812
|
+
# @param ThreadID: 会话 ID
|
813
|
+
# @type ThreadID: String
|
814
|
+
# @param MessageID: 消息 ID
|
815
|
+
# @type MessageID: String
|
816
|
+
|
817
|
+
attr_accessor :ThreadID, :MessageID
|
818
|
+
|
819
|
+
def initialize(threadid=nil, messageid=nil)
|
820
|
+
@ThreadID = threadid
|
821
|
+
@MessageID = messageid
|
822
|
+
end
|
823
|
+
|
824
|
+
def deserialize(params)
|
825
|
+
@ThreadID = params['ThreadID']
|
826
|
+
@MessageID = params['MessageID']
|
827
|
+
end
|
828
|
+
end
|
829
|
+
|
830
|
+
# GetThreadMessage返回参数结构体
|
831
|
+
class GetThreadMessageResponse < TencentCloud::Common::AbstractModel
|
832
|
+
# @param ID: 消息 ID
|
833
|
+
# @type ID: String
|
834
|
+
# @param Object: 对象类型
|
835
|
+
# @type Object: String
|
836
|
+
# @param CreatedAt: 创建时间
|
837
|
+
# @type CreatedAt: Integer
|
838
|
+
# @param ThreadID: 会话 ID
|
839
|
+
# @type ThreadID: String
|
840
|
+
# @param Status: 状态,处理中 in_progress,已完成 completed,未完成 incomplete。
|
841
|
+
# @type Status: String
|
842
|
+
# @param InCompleteDetails: 未完成原因
|
843
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
844
|
+
# @type InCompleteDetails: :class:`Tencentcloud::Hunyuan.v20230901.models.ThreadMessageInCompleteDetailsObject`
|
845
|
+
# @param CompletedAt: 完成时间
|
846
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
847
|
+
# @type CompletedAt: Integer
|
848
|
+
# @param InCompleteAt: 未完成时间
|
849
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
850
|
+
# @type InCompleteAt: Integer
|
851
|
+
# @param Role: 角色
|
852
|
+
# @type Role: String
|
853
|
+
# @param Content: 内容
|
854
|
+
# @type Content: String
|
855
|
+
# @param AssistantID: 助手 ID
|
856
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
857
|
+
# @type AssistantID: String
|
858
|
+
# @param RunID: 运行 ID
|
859
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
860
|
+
# @type RunID: String
|
861
|
+
# @param Attachments: 附件
|
862
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
863
|
+
# @type Attachments: Array
|
864
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
865
|
+
# @type RequestId: String
|
866
|
+
|
867
|
+
attr_accessor :ID, :Object, :CreatedAt, :ThreadID, :Status, :InCompleteDetails, :CompletedAt, :InCompleteAt, :Role, :Content, :AssistantID, :RunID, :Attachments, :RequestId
|
868
|
+
|
869
|
+
def initialize(id=nil, object=nil, createdat=nil, threadid=nil, status=nil, incompletedetails=nil, completedat=nil, incompleteat=nil, role=nil, content=nil, assistantid=nil, runid=nil, attachments=nil, requestid=nil)
|
870
|
+
@ID = id
|
871
|
+
@Object = object
|
872
|
+
@CreatedAt = createdat
|
873
|
+
@ThreadID = threadid
|
874
|
+
@Status = status
|
875
|
+
@InCompleteDetails = incompletedetails
|
876
|
+
@CompletedAt = completedat
|
877
|
+
@InCompleteAt = incompleteat
|
878
|
+
@Role = role
|
879
|
+
@Content = content
|
880
|
+
@AssistantID = assistantid
|
881
|
+
@RunID = runid
|
882
|
+
@Attachments = attachments
|
883
|
+
@RequestId = requestid
|
884
|
+
end
|
885
|
+
|
886
|
+
def deserialize(params)
|
887
|
+
@ID = params['ID']
|
888
|
+
@Object = params['Object']
|
889
|
+
@CreatedAt = params['CreatedAt']
|
890
|
+
@ThreadID = params['ThreadID']
|
891
|
+
@Status = params['Status']
|
892
|
+
unless params['InCompleteDetails'].nil?
|
893
|
+
@InCompleteDetails = ThreadMessageInCompleteDetailsObject.new
|
894
|
+
@InCompleteDetails.deserialize(params['InCompleteDetails'])
|
895
|
+
end
|
896
|
+
@CompletedAt = params['CompletedAt']
|
897
|
+
@InCompleteAt = params['InCompleteAt']
|
898
|
+
@Role = params['Role']
|
899
|
+
@Content = params['Content']
|
900
|
+
@AssistantID = params['AssistantID']
|
901
|
+
@RunID = params['RunID']
|
902
|
+
unless params['Attachments'].nil?
|
903
|
+
@Attachments = []
|
904
|
+
params['Attachments'].each do |i|
|
905
|
+
threadmessageattachmentobject_tmp = ThreadMessageAttachmentObject.new
|
906
|
+
threadmessageattachmentobject_tmp.deserialize(i)
|
907
|
+
@Attachments << threadmessageattachmentobject_tmp
|
908
|
+
end
|
909
|
+
end
|
910
|
+
@RequestId = params['RequestId']
|
911
|
+
end
|
912
|
+
end
|
913
|
+
|
914
|
+
# GetThread请求参数结构体
|
915
|
+
class GetThreadRequest < TencentCloud::Common::AbstractModel
|
916
|
+
# @param ThreadID: 会话 ID
|
917
|
+
# @type ThreadID: String
|
918
|
+
|
919
|
+
attr_accessor :ThreadID
|
920
|
+
|
921
|
+
def initialize(threadid=nil)
|
922
|
+
@ThreadID = threadid
|
923
|
+
end
|
924
|
+
|
925
|
+
def deserialize(params)
|
926
|
+
@ThreadID = params['ThreadID']
|
927
|
+
end
|
928
|
+
end
|
929
|
+
|
930
|
+
# GetThread返回参数结构体
|
931
|
+
class GetThreadResponse < TencentCloud::Common::AbstractModel
|
932
|
+
# @param ID: 会话 ID
|
933
|
+
# @type ID: String
|
934
|
+
# @param Object: 对象类型
|
935
|
+
# @type Object: String
|
936
|
+
# @param CreatedAt: 创建时间,Unix 时间戳,单位为秒。
|
937
|
+
# @type CreatedAt: Integer
|
938
|
+
# @param ToolResources: 提供给工具的资源列表
|
939
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
940
|
+
# @type ToolResources: :class:`Tencentcloud::Hunyuan.v20230901.models.ThreadToolResources`
|
941
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
942
|
+
# @type RequestId: String
|
943
|
+
|
944
|
+
attr_accessor :ID, :Object, :CreatedAt, :ToolResources, :RequestId
|
945
|
+
|
946
|
+
def initialize(id=nil, object=nil, createdat=nil, toolresources=nil, requestid=nil)
|
947
|
+
@ID = id
|
948
|
+
@Object = object
|
949
|
+
@CreatedAt = createdat
|
950
|
+
@ToolResources = toolresources
|
951
|
+
@RequestId = requestid
|
952
|
+
end
|
953
|
+
|
954
|
+
def deserialize(params)
|
955
|
+
@ID = params['ID']
|
956
|
+
@Object = params['Object']
|
957
|
+
@CreatedAt = params['CreatedAt']
|
958
|
+
unless params['ToolResources'].nil?
|
959
|
+
@ToolResources = ThreadToolResources.new
|
960
|
+
@ToolResources.deserialize(params['ToolResources'])
|
961
|
+
end
|
962
|
+
@RequestId = params['RequestId']
|
963
|
+
end
|
964
|
+
end
|
965
|
+
|
499
966
|
# GetTokenCount请求参数结构体
|
500
967
|
class GetTokenCountRequest < TencentCloud::Common::AbstractModel
|
501
968
|
# @param Prompt: 输入文本
|
@@ -693,6 +1160,28 @@ module TencentCloud
|
|
693
1160
|
end
|
694
1161
|
end
|
695
1162
|
|
1163
|
+
# 脑图
|
1164
|
+
class Mindmap < TencentCloud::Common::AbstractModel
|
1165
|
+
# @param ThumbUrl: 脑图缩略图链接
|
1166
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1167
|
+
# @type ThumbUrl: String
|
1168
|
+
# @param Url: 脑图图片链接
|
1169
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1170
|
+
# @type Url: String
|
1171
|
+
|
1172
|
+
attr_accessor :ThumbUrl, :Url
|
1173
|
+
|
1174
|
+
def initialize(thumburl=nil, url=nil)
|
1175
|
+
@ThumbUrl = thumburl
|
1176
|
+
@Url = url
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
def deserialize(params)
|
1180
|
+
@ThumbUrl = params['ThumbUrl']
|
1181
|
+
@Url = params['Url']
|
1182
|
+
end
|
1183
|
+
end
|
1184
|
+
|
696
1185
|
# 多媒体详情
|
697
1186
|
class Multimedia < TencentCloud::Common::AbstractModel
|
698
1187
|
# @param Type: 多媒体类型,可选值包括 image、music、album、playlist。
|
@@ -889,6 +1378,65 @@ module TencentCloud
|
|
889
1378
|
end
|
890
1379
|
end
|
891
1380
|
|
1381
|
+
# 相关组织及人物
|
1382
|
+
class RelevantEntity < TencentCloud::Common::AbstractModel
|
1383
|
+
# @param Name: 相关组织及人物名称
|
1384
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1385
|
+
# @type Name: String
|
1386
|
+
# @param Content: 相关组织及人物内容
|
1387
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1388
|
+
# @type Content: String
|
1389
|
+
# @param Reference: 相关事件引用文章标号
|
1390
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1391
|
+
# @type Reference: Array
|
1392
|
+
|
1393
|
+
attr_accessor :Name, :Content, :Reference
|
1394
|
+
|
1395
|
+
def initialize(name=nil, content=nil, reference=nil)
|
1396
|
+
@Name = name
|
1397
|
+
@Content = content
|
1398
|
+
@Reference = reference
|
1399
|
+
end
|
1400
|
+
|
1401
|
+
def deserialize(params)
|
1402
|
+
@Name = params['Name']
|
1403
|
+
@Content = params['Content']
|
1404
|
+
@Reference = params['Reference']
|
1405
|
+
end
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
# 相关事件
|
1409
|
+
class RelevantEvent < TencentCloud::Common::AbstractModel
|
1410
|
+
# @param Title: 相关事件标题
|
1411
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1412
|
+
# @type Title: String
|
1413
|
+
# @param Content: 相关事件内容
|
1414
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1415
|
+
# @type Content: String
|
1416
|
+
# @param Datetime: 相关事件时间
|
1417
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1418
|
+
# @type Datetime: String
|
1419
|
+
# @param Reference: 相关事件引用文章标号
|
1420
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1421
|
+
# @type Reference: Array
|
1422
|
+
|
1423
|
+
attr_accessor :Title, :Content, :Datetime, :Reference
|
1424
|
+
|
1425
|
+
def initialize(title=nil, content=nil, datetime=nil, reference=nil)
|
1426
|
+
@Title = title
|
1427
|
+
@Content = content
|
1428
|
+
@Datetime = datetime
|
1429
|
+
@Reference = reference
|
1430
|
+
end
|
1431
|
+
|
1432
|
+
def deserialize(params)
|
1433
|
+
@Title = params['Title']
|
1434
|
+
@Content = params['Content']
|
1435
|
+
@Datetime = params['Datetime']
|
1436
|
+
@Reference = params['Reference']
|
1437
|
+
end
|
1438
|
+
end
|
1439
|
+
|
892
1440
|
# 多媒体占位符替换信息
|
893
1441
|
class Replace < TencentCloud::Common::AbstractModel
|
894
1442
|
# @param Id: 占位符序号
|
@@ -916,16 +1464,126 @@ module TencentCloud
|
|
916
1464
|
end
|
917
1465
|
end
|
918
1466
|
|
1467
|
+
# RunThread请求参数结构体
|
1468
|
+
class RunThreadRequest < TencentCloud::Common::AbstractModel
|
1469
|
+
# @param ThreadID: 会话 ID
|
1470
|
+
# @type ThreadID: String
|
1471
|
+
# @param AssistantID: 助手 ID
|
1472
|
+
# @type AssistantID: String
|
1473
|
+
# @param Model: 模型名称,可选值包括 hunyuan-lite、hunyuan-standard、hunyuan-standard-256K、hunyuan-pro、 hunyuan-code、 hunyuan-role、 hunyuan-functioncall、 hunyuan-vision、 hunyuan-turbo。各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。注意:不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。
|
1474
|
+
# @type Model: String
|
1475
|
+
# @param AdditionalMessages: 附加消息
|
1476
|
+
# @type AdditionalMessages: Array
|
1477
|
+
# @param Temperature: 说明:1. 影响模型输出多样性,模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。2. 取值区间为 [0.0, 2.0]。较高的数值会使输出更加多样化和不可预测,而较低的数值会使其更加集中和确定。
|
1478
|
+
# @type Temperature: Float
|
1479
|
+
# @param TopP: 说明:1. 影响输出文本的多样性。模型已有默认参数,不传值时使用各模型推荐值,不推荐用户修改。2. 取值区间为 [0.0, 1.0]。取值越大,生成文本的多样性越强。
|
1480
|
+
# @type TopP: Float
|
1481
|
+
# @param Stream: 是否流式输出,当前只允许 true
|
1482
|
+
# @type Stream: Boolean
|
1483
|
+
# @param MaxPromptTokens: 运行过程中可使用的 token 最大数量。
|
1484
|
+
# @type MaxPromptTokens: Integer
|
1485
|
+
# @param MaxCompletionTokens: 运行过程中可使用的完成 token 的最大数量。
|
1486
|
+
# @type MaxCompletionTokens: Integer
|
1487
|
+
# @param Tools: 可调用的工具列表,仅对 hunyuan-pro、hunyuan-turbo、hunyuan-functioncall 模型生效。
|
1488
|
+
# @type Tools: Array
|
1489
|
+
# @param ToolChoice: 工具使用选项,可选值包括 none、auto、custom。说明:1. 仅对 hunyuan-pro、hunyuan-turbo、hunyuan-functioncall 模型生效。2. none:不调用工具;auto:模型自行选择生成回复或调用工具;custom:强制模型调用指定的工具。3. 未设置时,默认值为auto
|
1490
|
+
# @type ToolChoice: String
|
1491
|
+
|
1492
|
+
attr_accessor :ThreadID, :AssistantID, :Model, :AdditionalMessages, :Temperature, :TopP, :Stream, :MaxPromptTokens, :MaxCompletionTokens, :Tools, :ToolChoice
|
1493
|
+
|
1494
|
+
def initialize(threadid=nil, assistantid=nil, model=nil, additionalmessages=nil, temperature=nil, topp=nil, stream=nil, maxprompttokens=nil, maxcompletiontokens=nil, tools=nil, toolchoice=nil)
|
1495
|
+
@ThreadID = threadid
|
1496
|
+
@AssistantID = assistantid
|
1497
|
+
@Model = model
|
1498
|
+
@AdditionalMessages = additionalmessages
|
1499
|
+
@Temperature = temperature
|
1500
|
+
@TopP = topp
|
1501
|
+
@Stream = stream
|
1502
|
+
@MaxPromptTokens = maxprompttokens
|
1503
|
+
@MaxCompletionTokens = maxcompletiontokens
|
1504
|
+
@Tools = tools
|
1505
|
+
@ToolChoice = toolchoice
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
def deserialize(params)
|
1509
|
+
@ThreadID = params['ThreadID']
|
1510
|
+
@AssistantID = params['AssistantID']
|
1511
|
+
@Model = params['Model']
|
1512
|
+
unless params['AdditionalMessages'].nil?
|
1513
|
+
@AdditionalMessages = []
|
1514
|
+
params['AdditionalMessages'].each do |i|
|
1515
|
+
threadadditionalmessage_tmp = ThreadAdditionalMessage.new
|
1516
|
+
threadadditionalmessage_tmp.deserialize(i)
|
1517
|
+
@AdditionalMessages << threadadditionalmessage_tmp
|
1518
|
+
end
|
1519
|
+
end
|
1520
|
+
@Temperature = params['Temperature']
|
1521
|
+
@TopP = params['TopP']
|
1522
|
+
@Stream = params['Stream']
|
1523
|
+
@MaxPromptTokens = params['MaxPromptTokens']
|
1524
|
+
@MaxCompletionTokens = params['MaxCompletionTokens']
|
1525
|
+
unless params['Tools'].nil?
|
1526
|
+
@Tools = []
|
1527
|
+
params['Tools'].each do |i|
|
1528
|
+
tool_tmp = Tool.new
|
1529
|
+
tool_tmp.deserialize(i)
|
1530
|
+
@Tools << tool_tmp
|
1531
|
+
end
|
1532
|
+
end
|
1533
|
+
@ToolChoice = params['ToolChoice']
|
1534
|
+
end
|
1535
|
+
end
|
1536
|
+
|
1537
|
+
# RunThread返回参数结构体
|
1538
|
+
class RunThreadResponse < TencentCloud::Common::AbstractModel
|
1539
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header "X-TC-RequestId" 中。
|
1540
|
+
# @type RequestId: String
|
1541
|
+
|
1542
|
+
attr_accessor :RequestId
|
1543
|
+
|
1544
|
+
def initialize(requestid=nil)
|
1545
|
+
@RequestId = requestid
|
1546
|
+
end
|
1547
|
+
|
1548
|
+
def deserialize(params)
|
1549
|
+
@RequestId = params['RequestId']
|
1550
|
+
end
|
1551
|
+
end
|
1552
|
+
|
919
1553
|
# 搜索结果信息
|
920
1554
|
class SearchInfo < TencentCloud::Common::AbstractModel
|
921
1555
|
# @param SearchResults: 搜索引文信息
|
922
1556
|
# 注意:此字段可能返回 null,表示取不到有效值。
|
923
1557
|
# @type SearchResults: Array
|
1558
|
+
# @param Mindmap: 脑图(回复中不一定存在,流式协议中,仅在最后一条流式数据中返回)
|
1559
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1560
|
+
# @type Mindmap: :class:`Tencentcloud::Hunyuan.v20230901.models.Mindmap`
|
1561
|
+
# @param RelevantEvents: 相关事件(回复中不一定存在,流式协议中,仅在最后一条流式数据中返回,深度模式下返回)
|
1562
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1563
|
+
# @type RelevantEvents: Array
|
1564
|
+
# @param RelevantEntities: 相关组织及人物(回复中不一定存在,流式协议中,仅在最后一条流式数据中返回,深度模式下返回)
|
1565
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1566
|
+
# @type RelevantEntities: Array
|
1567
|
+
# @param Timeline: 时间线(回复中不一定存在,流式协议中,仅在最后一条流式数据中返回,深度模式下返回)
|
1568
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1569
|
+
# @type Timeline: Array
|
1570
|
+
# @param SupportDeepSearch: 是否命中搜索深度模式
|
1571
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1572
|
+
# @type SupportDeepSearch: Boolean
|
1573
|
+
# @param Outline: 搜索回复大纲(深度模式下返回)
|
1574
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1575
|
+
# @type Outline: Array
|
924
1576
|
|
925
|
-
attr_accessor :SearchResults
|
1577
|
+
attr_accessor :SearchResults, :Mindmap, :RelevantEvents, :RelevantEntities, :Timeline, :SupportDeepSearch, :Outline
|
926
1578
|
|
927
|
-
def initialize(searchresults=nil)
|
1579
|
+
def initialize(searchresults=nil, mindmap=nil, relevantevents=nil, relevantentities=nil, timeline=nil, supportdeepsearch=nil, outline=nil)
|
928
1580
|
@SearchResults = searchresults
|
1581
|
+
@Mindmap = mindmap
|
1582
|
+
@RelevantEvents = relevantevents
|
1583
|
+
@RelevantEntities = relevantentities
|
1584
|
+
@Timeline = timeline
|
1585
|
+
@SupportDeepSearch = supportdeepsearch
|
1586
|
+
@Outline = outline
|
929
1587
|
end
|
930
1588
|
|
931
1589
|
def deserialize(params)
|
@@ -937,6 +1595,36 @@ module TencentCloud
|
|
937
1595
|
@SearchResults << searchresult_tmp
|
938
1596
|
end
|
939
1597
|
end
|
1598
|
+
unless params['Mindmap'].nil?
|
1599
|
+
@Mindmap = Mindmap.new
|
1600
|
+
@Mindmap.deserialize(params['Mindmap'])
|
1601
|
+
end
|
1602
|
+
unless params['RelevantEvents'].nil?
|
1603
|
+
@RelevantEvents = []
|
1604
|
+
params['RelevantEvents'].each do |i|
|
1605
|
+
relevantevent_tmp = RelevantEvent.new
|
1606
|
+
relevantevent_tmp.deserialize(i)
|
1607
|
+
@RelevantEvents << relevantevent_tmp
|
1608
|
+
end
|
1609
|
+
end
|
1610
|
+
unless params['RelevantEntities'].nil?
|
1611
|
+
@RelevantEntities = []
|
1612
|
+
params['RelevantEntities'].each do |i|
|
1613
|
+
relevantentity_tmp = RelevantEntity.new
|
1614
|
+
relevantentity_tmp.deserialize(i)
|
1615
|
+
@RelevantEntities << relevantentity_tmp
|
1616
|
+
end
|
1617
|
+
end
|
1618
|
+
unless params['Timeline'].nil?
|
1619
|
+
@Timeline = []
|
1620
|
+
params['Timeline'].each do |i|
|
1621
|
+
timeline_tmp = Timeline.new
|
1622
|
+
timeline_tmp.deserialize(i)
|
1623
|
+
@Timeline << timeline_tmp
|
1624
|
+
end
|
1625
|
+
end
|
1626
|
+
@SupportDeepSearch = params['SupportDeepSearch']
|
1627
|
+
@Outline = params['Outline']
|
940
1628
|
end
|
941
1629
|
end
|
942
1630
|
|
@@ -1246,6 +1934,198 @@ module TencentCloud
|
|
1246
1934
|
end
|
1247
1935
|
end
|
1248
1936
|
|
1937
|
+
# 会话额外消息
|
1938
|
+
class ThreadAdditionalMessage < TencentCloud::Common::AbstractModel
|
1939
|
+
# @param Role: 角色
|
1940
|
+
# @type Role: String
|
1941
|
+
# @param Content: 内容
|
1942
|
+
# @type Content: String
|
1943
|
+
# @param Attachments: 附件
|
1944
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1945
|
+
# @type Attachments: Array
|
1946
|
+
|
1947
|
+
attr_accessor :Role, :Content, :Attachments
|
1948
|
+
|
1949
|
+
def initialize(role=nil, content=nil, attachments=nil)
|
1950
|
+
@Role = role
|
1951
|
+
@Content = content
|
1952
|
+
@Attachments = attachments
|
1953
|
+
end
|
1954
|
+
|
1955
|
+
def deserialize(params)
|
1956
|
+
@Role = params['Role']
|
1957
|
+
@Content = params['Content']
|
1958
|
+
unless params['Attachments'].nil?
|
1959
|
+
@Attachments = []
|
1960
|
+
params['Attachments'].each do |i|
|
1961
|
+
threadmessageattachmentobject_tmp = ThreadMessageAttachmentObject.new
|
1962
|
+
threadmessageattachmentobject_tmp.deserialize(i)
|
1963
|
+
@Attachments << threadmessageattachmentobject_tmp
|
1964
|
+
end
|
1965
|
+
end
|
1966
|
+
end
|
1967
|
+
end
|
1968
|
+
|
1969
|
+
# 会话消息
|
1970
|
+
class ThreadMessage < TencentCloud::Common::AbstractModel
|
1971
|
+
# @param ID: 消息 ID
|
1972
|
+
# @type ID: String
|
1973
|
+
# @param Object: 对象类型
|
1974
|
+
# @type Object: String
|
1975
|
+
# @param CreatedAt: 创建时间
|
1976
|
+
# @type CreatedAt: Integer
|
1977
|
+
# @param ThreadID: 会话 ID
|
1978
|
+
# @type ThreadID: String
|
1979
|
+
# @param Status: 状态,处理中 in_progress,已完成 completed,未完成 incomplete。
|
1980
|
+
# @type Status: String
|
1981
|
+
# @param InCompleteDetails: 未完成原因
|
1982
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1983
|
+
# @type InCompleteDetails: :class:`Tencentcloud::Hunyuan.v20230901.models.ThreadMessageInCompleteDetailsObject`
|
1984
|
+
# @param CompletedAt: 完成时间
|
1985
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1986
|
+
# @type CompletedAt: Integer
|
1987
|
+
# @param InCompleteAt: 未完成时间
|
1988
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1989
|
+
# @type InCompleteAt: Integer
|
1990
|
+
# @param Role: 角色
|
1991
|
+
# @type Role: String
|
1992
|
+
# @param Content: 内容
|
1993
|
+
# @type Content: String
|
1994
|
+
# @param AssistantID: 助手 ID
|
1995
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1996
|
+
# @type AssistantID: String
|
1997
|
+
# @param RunID: 运行 ID
|
1998
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
1999
|
+
# @type RunID: String
|
2000
|
+
# @param Attachments: 附件
|
2001
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2002
|
+
# @type Attachments: Array
|
2003
|
+
|
2004
|
+
attr_accessor :ID, :Object, :CreatedAt, :ThreadID, :Status, :InCompleteDetails, :CompletedAt, :InCompleteAt, :Role, :Content, :AssistantID, :RunID, :Attachments
|
2005
|
+
|
2006
|
+
def initialize(id=nil, object=nil, createdat=nil, threadid=nil, status=nil, incompletedetails=nil, completedat=nil, incompleteat=nil, role=nil, content=nil, assistantid=nil, runid=nil, attachments=nil)
|
2007
|
+
@ID = id
|
2008
|
+
@Object = object
|
2009
|
+
@CreatedAt = createdat
|
2010
|
+
@ThreadID = threadid
|
2011
|
+
@Status = status
|
2012
|
+
@InCompleteDetails = incompletedetails
|
2013
|
+
@CompletedAt = completedat
|
2014
|
+
@InCompleteAt = incompleteat
|
2015
|
+
@Role = role
|
2016
|
+
@Content = content
|
2017
|
+
@AssistantID = assistantid
|
2018
|
+
@RunID = runid
|
2019
|
+
@Attachments = attachments
|
2020
|
+
end
|
2021
|
+
|
2022
|
+
def deserialize(params)
|
2023
|
+
@ID = params['ID']
|
2024
|
+
@Object = params['Object']
|
2025
|
+
@CreatedAt = params['CreatedAt']
|
2026
|
+
@ThreadID = params['ThreadID']
|
2027
|
+
@Status = params['Status']
|
2028
|
+
unless params['InCompleteDetails'].nil?
|
2029
|
+
@InCompleteDetails = ThreadMessageInCompleteDetailsObject.new
|
2030
|
+
@InCompleteDetails.deserialize(params['InCompleteDetails'])
|
2031
|
+
end
|
2032
|
+
@CompletedAt = params['CompletedAt']
|
2033
|
+
@InCompleteAt = params['InCompleteAt']
|
2034
|
+
@Role = params['Role']
|
2035
|
+
@Content = params['Content']
|
2036
|
+
@AssistantID = params['AssistantID']
|
2037
|
+
@RunID = params['RunID']
|
2038
|
+
unless params['Attachments'].nil?
|
2039
|
+
@Attachments = []
|
2040
|
+
params['Attachments'].each do |i|
|
2041
|
+
threadmessageattachmentobject_tmp = ThreadMessageAttachmentObject.new
|
2042
|
+
threadmessageattachmentobject_tmp.deserialize(i)
|
2043
|
+
@Attachments << threadmessageattachmentobject_tmp
|
2044
|
+
end
|
2045
|
+
end
|
2046
|
+
end
|
2047
|
+
end
|
2048
|
+
|
2049
|
+
# 会话消息附件
|
2050
|
+
class ThreadMessageAttachmentObject < TencentCloud::Common::AbstractModel
|
2051
|
+
# @param FileID: 文件 ID
|
2052
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2053
|
+
# @type FileID: String
|
2054
|
+
|
2055
|
+
attr_accessor :FileID
|
2056
|
+
|
2057
|
+
def initialize(fileid=nil)
|
2058
|
+
@FileID = fileid
|
2059
|
+
end
|
2060
|
+
|
2061
|
+
def deserialize(params)
|
2062
|
+
@FileID = params['FileID']
|
2063
|
+
end
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
# 会话消息未完成原因
|
2067
|
+
class ThreadMessageInCompleteDetailsObject < TencentCloud::Common::AbstractModel
|
2068
|
+
# @param Reason: 会话消息未完成原因
|
2069
|
+
# @type Reason: String
|
2070
|
+
|
2071
|
+
attr_accessor :Reason
|
2072
|
+
|
2073
|
+
def initialize(reason=nil)
|
2074
|
+
@Reason = reason
|
2075
|
+
end
|
2076
|
+
|
2077
|
+
def deserialize(params)
|
2078
|
+
@Reason = params['Reason']
|
2079
|
+
end
|
2080
|
+
end
|
2081
|
+
|
2082
|
+
# 在会话中提供给助手工具的一系列资源。不同类型的工具会有各自对应的资源。比如代码解释器需要一个文件 ID 的列表,而文件搜索工具则需要一个向量存储 ID 的列表。
|
2083
|
+
class ThreadToolResources < TencentCloud::Common::AbstractModel
|
2084
|
+
# @param CodeInterpreter: 文件 ID 列表
|
2085
|
+
# @type CodeInterpreter: Array
|
2086
|
+
# @param VectorStoreIDs: 向量存储 ID 列表
|
2087
|
+
# @type VectorStoreIDs: Array
|
2088
|
+
|
2089
|
+
attr_accessor :CodeInterpreter, :VectorStoreIDs
|
2090
|
+
|
2091
|
+
def initialize(codeinterpreter=nil, vectorstoreids=nil)
|
2092
|
+
@CodeInterpreter = codeinterpreter
|
2093
|
+
@VectorStoreIDs = vectorstoreids
|
2094
|
+
end
|
2095
|
+
|
2096
|
+
def deserialize(params)
|
2097
|
+
@CodeInterpreter = params['CodeInterpreter']
|
2098
|
+
@VectorStoreIDs = params['VectorStoreIDs']
|
2099
|
+
end
|
2100
|
+
end
|
2101
|
+
|
2102
|
+
# 时间线
|
2103
|
+
class Timeline < TencentCloud::Common::AbstractModel
|
2104
|
+
# @param Title: 标题
|
2105
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2106
|
+
# @type Title: String
|
2107
|
+
# @param Datetime: 时间
|
2108
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2109
|
+
# @type Datetime: String
|
2110
|
+
# @param Url: 相关网页链接
|
2111
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
2112
|
+
# @type Url: String
|
2113
|
+
|
2114
|
+
attr_accessor :Title, :Datetime, :Url
|
2115
|
+
|
2116
|
+
def initialize(title=nil, datetime=nil, url=nil)
|
2117
|
+
@Title = title
|
2118
|
+
@Datetime = datetime
|
2119
|
+
@Url = url
|
2120
|
+
end
|
2121
|
+
|
2122
|
+
def deserialize(params)
|
2123
|
+
@Title = params['Title']
|
2124
|
+
@Datetime = params['Datetime']
|
2125
|
+
@Url = params['Url']
|
2126
|
+
end
|
2127
|
+
end
|
2128
|
+
|
1249
2129
|
# 用户指定模型使用的工具
|
1250
2130
|
class Tool < TencentCloud::Common::AbstractModel
|
1251
2131
|
# @param Type: 工具类型,当前只支持function
|