tencentcloud-sdk-nodejs-es 4.1.102 → 4.1.116
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
|
@@ -30,6 +30,18 @@ export interface ChatCompletionsRequest {
|
|
|
30
30
|
* 当 OnlineSearch 为 true 时,指定的搜索引擎,默认为 bing。
|
|
31
31
|
*/
|
|
32
32
|
OnlineSearchOptions?: OnlineSearchOptions;
|
|
33
|
+
/**
|
|
34
|
+
* 可调用的工具列表,当前支持模型:hunyuan-turbo, deepseek-v3。
|
|
35
|
+
*/
|
|
36
|
+
Tools?: Array<Tool>;
|
|
37
|
+
/**
|
|
38
|
+
* 工具使用选项,可选值包括 none、auto、custom。说明:1. 仅对 hunyuan-turbo、deepseek-v3 模型生效。2. none:不调用工具;auto:模型自行选择生成回复或调用工具;custom:强制模型调用指定的工具。3. 未设置时,默认值为auto
|
|
39
|
+
*/
|
|
40
|
+
ToolChoice?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 强制模型调用指定的工具,当参数ToolChoice为custom时,此参数为必填
|
|
43
|
+
*/
|
|
44
|
+
CustomTool?: Tool;
|
|
33
45
|
}
|
|
34
46
|
/**
|
|
35
47
|
* 文档切片用量
|
|
@@ -208,12 +220,20 @@ export interface ParseDocumentResponse {
|
|
|
208
220
|
*/
|
|
209
221
|
export interface Document {
|
|
210
222
|
/**
|
|
211
|
-
*
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
-
|
|
223
|
+
* 支持的文件类型:PDF、DOC、DOCX、PPT、PPTX、MD、TXT、XLS、
|
|
224
|
+
XLSX、CSV、PNG、JPG、JPEG、BMP、GIF、WEBP、HEIC、EPS、ICNS、
|
|
225
|
+
IM、PCX、PPM、TIFF、XBM、HEIF、JP2
|
|
226
|
+
|
|
227
|
+
文档解析支持的文件大小:
|
|
228
|
+
-PDF、DOC、DOCX、PPT、PPTX支持100M
|
|
229
|
+
-MD、TXT、XLS、XLSX、CSV支特10M
|
|
230
|
+
-其他支持20M
|
|
231
|
+
|
|
232
|
+
文本切片支持的文件大小:
|
|
233
|
+
-PDF最大300M
|
|
234
|
+
-D0CX、D0C、PPT、PPTX最大200M
|
|
235
|
+
-TXT、MD最大10M
|
|
236
|
+
-其他最大20M
|
|
217
237
|
*/
|
|
218
238
|
FileType: string;
|
|
219
239
|
/**
|
|
@@ -282,6 +302,19 @@ export interface ChunkDocumentResponse {
|
|
|
282
302
|
*/
|
|
283
303
|
RequestId?: string;
|
|
284
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* 用户指定模型使用的工具
|
|
307
|
+
*/
|
|
308
|
+
export interface Tool {
|
|
309
|
+
/**
|
|
310
|
+
* 工具类型,当前只支持function
|
|
311
|
+
*/
|
|
312
|
+
Type: string;
|
|
313
|
+
/**
|
|
314
|
+
* 具体要调用的function
|
|
315
|
+
*/
|
|
316
|
+
Function: ToolFunction;
|
|
317
|
+
}
|
|
285
318
|
/**
|
|
286
319
|
* GetDocumentParseResult返回参数结构体
|
|
287
320
|
*/
|
|
@@ -391,6 +424,36 @@ export interface ChunkConfig {
|
|
|
391
424
|
*/
|
|
392
425
|
ChunkOverlap?: number;
|
|
393
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* function定义
|
|
429
|
+
*/
|
|
430
|
+
export interface ToolFunction {
|
|
431
|
+
/**
|
|
432
|
+
* function名称,只能包含a-z,A-Z,0-9,_或-
|
|
433
|
+
*/
|
|
434
|
+
Name: string;
|
|
435
|
+
/**
|
|
436
|
+
* function参数,一般为json字符串
|
|
437
|
+
*/
|
|
438
|
+
Parameters: string;
|
|
439
|
+
/**
|
|
440
|
+
* function的简单描述
|
|
441
|
+
*/
|
|
442
|
+
Description?: string;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* 具体的function调用
|
|
446
|
+
*/
|
|
447
|
+
export interface ToolCallFunction {
|
|
448
|
+
/**
|
|
449
|
+
* function名称
|
|
450
|
+
*/
|
|
451
|
+
Name?: string;
|
|
452
|
+
/**
|
|
453
|
+
* function参数,一般为json字符串
|
|
454
|
+
*/
|
|
455
|
+
Arguments?: string;
|
|
456
|
+
}
|
|
394
457
|
/**
|
|
395
458
|
* 会话内容,按对话时间从旧到新在数组中排列,长度受模型窗口大小限制。
|
|
396
459
|
*/
|
|
@@ -407,18 +470,30 @@ export interface OutputMessage {
|
|
|
407
470
|
* 推理内容
|
|
408
471
|
*/
|
|
409
472
|
ReasoningContent?: string;
|
|
473
|
+
/**
|
|
474
|
+
* 模型生成的工具调用
|
|
475
|
+
*/
|
|
476
|
+
ToolCalls?: Array<ToolCall>;
|
|
410
477
|
}
|
|
411
478
|
/**
|
|
412
479
|
* 文档信息
|
|
413
480
|
*/
|
|
414
481
|
export interface ParseDocument {
|
|
415
482
|
/**
|
|
416
|
-
*
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
-
|
|
483
|
+
* 支持的文件类型:PDF、DOC、DOCX、PPT、PPTX、MD、TXT、XLS、
|
|
484
|
+
XLSX、CSV、PNG、JPG、JPEG、BMP、GIF、WEBP、HEIC、EPS、ICNS、
|
|
485
|
+
IM、PCX、PPM、TIFF、XBM、HEIF、JP2
|
|
486
|
+
|
|
487
|
+
文档解析支持的文件大小:
|
|
488
|
+
-PDF、DOC、DOCX、PPT、PPTX支持100M
|
|
489
|
+
-MD、TXT、XLS、XLSX、CSV支特10M
|
|
490
|
+
-其他支持20M
|
|
491
|
+
|
|
492
|
+
文本切片支持的文件大小:
|
|
493
|
+
-PDF最大300M
|
|
494
|
+
-D0CX、D0C、PPT、PPTX最大200M
|
|
495
|
+
-TXT、MD最大10M
|
|
496
|
+
-其他最大20M
|
|
422
497
|
*/
|
|
423
498
|
FileType: string;
|
|
424
499
|
/**
|
|
@@ -429,6 +504,7 @@ export interface ParseDocument {
|
|
|
429
504
|
* 文件的 base64 值,携带 MineType前缀信息。编码后的后的文件不超过 10M。
|
|
430
505
|
支持的文件大小:所下载文件经Base64编码后不超过 8M。文件下载时间不超过3秒。
|
|
431
506
|
支持的图片像素:单边介于20-10000px之间。
|
|
507
|
+
文件的 FileUrl、FileContent必须提供一个,如果都提供只使用 FileUrl。
|
|
432
508
|
*/
|
|
433
509
|
FileContent?: string;
|
|
434
510
|
/**
|
|
@@ -478,6 +554,27 @@ export interface ChunkDocumentAsyncResponse {
|
|
|
478
554
|
*/
|
|
479
555
|
RequestId?: string;
|
|
480
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* 模型生成的工具调用
|
|
559
|
+
*/
|
|
560
|
+
export interface ToolCall {
|
|
561
|
+
/**
|
|
562
|
+
* 工具调用id
|
|
563
|
+
*/
|
|
564
|
+
Id?: string;
|
|
565
|
+
/**
|
|
566
|
+
* 工具调用类型,当前只支持function
|
|
567
|
+
*/
|
|
568
|
+
Type?: string;
|
|
569
|
+
/**
|
|
570
|
+
* 具体的function调用
|
|
571
|
+
*/
|
|
572
|
+
Function?: ToolCallFunction;
|
|
573
|
+
/**
|
|
574
|
+
* 索引值
|
|
575
|
+
*/
|
|
576
|
+
Index?: number;
|
|
577
|
+
}
|
|
481
578
|
/**
|
|
482
579
|
* 联网搜索选项。
|
|
483
580
|
*/
|
|
@@ -587,13 +684,21 @@ export interface ChunkDocument {
|
|
|
587
684
|
*/
|
|
588
685
|
export interface Message {
|
|
589
686
|
/**
|
|
590
|
-
*
|
|
687
|
+
* 角色,可选值包括 system、user、assistant、 tool。
|
|
591
688
|
*/
|
|
592
689
|
Role?: string;
|
|
593
690
|
/**
|
|
594
691
|
* 具体文本内容
|
|
595
692
|
*/
|
|
596
693
|
Content?: string;
|
|
694
|
+
/**
|
|
695
|
+
* 当role为tool时传入,标识具体的函数调用
|
|
696
|
+
*/
|
|
697
|
+
ToolCallId?: string;
|
|
698
|
+
/**
|
|
699
|
+
* 模型生成的工具调用
|
|
700
|
+
*/
|
|
701
|
+
ToolCalls?: Array<ToolCall>;
|
|
597
702
|
}
|
|
598
703
|
/**
|
|
599
704
|
* ChatCompletions返回参数结构体
|