tencentcloud-sdk-nodejs-intl-en 3.0.1400 → 3.0.1401

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.
@@ -0,0 +1,1348 @@
1
+ /*
2
+ * Copyright (c) 2018 Tencent. All Rights Reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing,
11
+ * software distributed under the License is distributed on an
12
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
+ * KIND, either express or implied. See the License for the
14
+ * specific language governing permissions and limitations
15
+ * under the License.
16
+ */
17
+ const AbstractModel = require("../../common/abstract_model");
18
+
19
+ /**
20
+ * Document slice amount
21
+ * @class
22
+ */
23
+ class DocumentChunkUsage extends AbstractModel {
24
+ constructor(){
25
+ super();
26
+
27
+ /**
28
+ * Parse page count
29
+ * @type {number || null}
30
+ */
31
+ this.PageNumber = null;
32
+
33
+ /**
34
+ * token consumption
35
+ * @type {number || null}
36
+ */
37
+ this.TotalTokens = null;
38
+
39
+ }
40
+
41
+ /**
42
+ * @private
43
+ */
44
+ deserialize(params) {
45
+ if (!params) {
46
+ return;
47
+ }
48
+ this.PageNumber = 'PageNumber' in params ? params.PageNumber : null;
49
+ this.TotalTokens = 'TotalTokens' in params ? params.TotalTokens : null;
50
+
51
+ }
52
+ }
53
+
54
+ /**
55
+ * ChunkDocumentAsync request structure.
56
+ * @class
57
+ */
58
+ class ChunkDocumentAsyncRequest extends AbstractModel {
59
+ constructor(){
60
+ super();
61
+
62
+ /**
63
+ * File information.
64
+ * @type {Document || null}
65
+ */
66
+ this.Document = null;
67
+
68
+ /**
69
+ * Model name, selectable model list: doc-tree-chunk.
70
+ * @type {string || null}
71
+ */
72
+ this.ModelName = null;
73
+
74
+ /**
75
+ * File slice configuration.
76
+ * @type {ChunkConfigAsync || null}
77
+ */
78
+ this.Config = null;
79
+
80
+ }
81
+
82
+ /**
83
+ * @private
84
+ */
85
+ deserialize(params) {
86
+ if (!params) {
87
+ return;
88
+ }
89
+
90
+ if (params.Document) {
91
+ let obj = new Document();
92
+ obj.deserialize(params.Document)
93
+ this.Document = obj;
94
+ }
95
+ this.ModelName = 'ModelName' in params ? params.ModelName : null;
96
+
97
+ if (params.Config) {
98
+ let obj = new ChunkConfigAsync();
99
+ obj.deserialize(params.Config)
100
+ this.Config = obj;
101
+ }
102
+
103
+ }
104
+ }
105
+
106
+ /**
107
+ * ChunkDocument request structure.
108
+ * @class
109
+ */
110
+ class ChunkDocumentRequest extends AbstractModel {
111
+ constructor(){
112
+ super();
113
+
114
+ /**
115
+ * Slice file info.
116
+ * @type {ChunkDocument || null}
117
+ */
118
+ this.Document = null;
119
+
120
+ /**
121
+ * Model name, selectable model list: doc-chunk.
122
+ * @type {string || null}
123
+ */
124
+ this.ModelName = null;
125
+
126
+ /**
127
+ * File slice configuration.
128
+ * @type {ChunkConfig || null}
129
+ */
130
+ this.Config = null;
131
+
132
+ }
133
+
134
+ /**
135
+ * @private
136
+ */
137
+ deserialize(params) {
138
+ if (!params) {
139
+ return;
140
+ }
141
+
142
+ if (params.Document) {
143
+ let obj = new ChunkDocument();
144
+ obj.deserialize(params.Document)
145
+ this.Document = obj;
146
+ }
147
+ this.ModelName = 'ModelName' in params ? params.ModelName : null;
148
+
149
+ if (params.Config) {
150
+ let obj = new ChunkConfig();
151
+ obj.deserialize(params.Config)
152
+ this.Config = obj;
153
+ }
154
+
155
+ }
156
+ }
157
+
158
+ /**
159
+ * GetDocumentChunkResult request structure.
160
+ * @class
161
+ */
162
+ class GetDocumentChunkResultRequest extends AbstractModel {
163
+ constructor(){
164
+ super();
165
+
166
+ /**
167
+ * Task ID
168
+ * @type {string || null}
169
+ */
170
+ this.TaskId = null;
171
+
172
+ }
173
+
174
+ /**
175
+ * @private
176
+ */
177
+ deserialize(params) {
178
+ if (!params) {
179
+ return;
180
+ }
181
+ this.TaskId = 'TaskId' in params ? params.TaskId : null;
182
+
183
+ }
184
+ }
185
+
186
+ /**
187
+ * Output result
188
+ * @class
189
+ */
190
+ class RerankResult extends AbstractModel {
191
+ constructor(){
192
+ super();
193
+
194
+ /**
195
+ * Location index value of the corresponding doc in the array of candidate docs
196
+ Note: This field may return null, indicating that no valid values can be obtained.
197
+ * @type {number || null}
198
+ */
199
+ this.Index = null;
200
+
201
+ /**
202
+ * Similarity score
203
+ Note: This field may return null, indicating that no valid values can be obtained.
204
+ * @type {number || null}
205
+ */
206
+ this.RelevanceScore = null;
207
+
208
+ /**
209
+ * Document content
210
+ Note: This field may return null, indicating that no valid values can be obtained.
211
+ * @type {string || null}
212
+ */
213
+ this.Document = null;
214
+
215
+ }
216
+
217
+ /**
218
+ * @private
219
+ */
220
+ deserialize(params) {
221
+ if (!params) {
222
+ return;
223
+ }
224
+ this.Index = 'Index' in params ? params.Index : null;
225
+ this.RelevanceScore = 'RelevanceScore' in params ? params.RelevanceScore : null;
226
+ this.Document = 'Document' in params ? params.Document : null;
227
+
228
+ }
229
+ }
230
+
231
+ /**
232
+ * GetDocumentParseResult request structure.
233
+ * @class
234
+ */
235
+ class GetDocumentParseResultRequest extends AbstractModel {
236
+ constructor(){
237
+ super();
238
+
239
+ /**
240
+ * Task ID.
241
+ * @type {string || null}
242
+ */
243
+ this.TaskId = null;
244
+
245
+ }
246
+
247
+ /**
248
+ * @private
249
+ */
250
+ deserialize(params) {
251
+ if (!params) {
252
+ return;
253
+ }
254
+ this.TaskId = 'TaskId' in params ? params.TaskId : null;
255
+
256
+ }
257
+ }
258
+
259
+ /**
260
+ * Page number consumption
261
+ * @class
262
+ */
263
+ class PageUsage extends AbstractModel {
264
+ constructor(){
265
+ super();
266
+
267
+ /**
268
+ * Total number of pages consumed
269
+ * @type {number || null}
270
+ */
271
+ this.TotalPages = null;
272
+
273
+ }
274
+
275
+ /**
276
+ * @private
277
+ */
278
+ deserialize(params) {
279
+ if (!params) {
280
+ return;
281
+ }
282
+ this.TotalPages = 'TotalPages' in params ? params.TotalPages : null;
283
+
284
+ }
285
+ }
286
+
287
+ /**
288
+ * token consumption total count
289
+ * @class
290
+ */
291
+ class Usage extends AbstractModel {
292
+ constructor(){
293
+ super();
294
+
295
+ /**
296
+ * Total number of tokens
297
+ Note: This field may return null, indicating that no valid values can be obtained.
298
+ * @type {number || null}
299
+ */
300
+ this.TotalTokens = null;
301
+
302
+ }
303
+
304
+ /**
305
+ * @private
306
+ */
307
+ deserialize(params) {
308
+ if (!params) {
309
+ return;
310
+ }
311
+ this.TotalTokens = 'TotalTokens' in params ? params.TotalTokens : null;
312
+
313
+ }
314
+ }
315
+
316
+ /**
317
+ * Document parsing configuration
318
+ * @class
319
+ */
320
+ class DocumentParseConfig extends AbstractModel {
321
+ constructor(){
322
+ super();
323
+
324
+ /**
325
+ * 0: Images are returned in link format
326
+ 1:Return the text content extracted from the image
327
+ * @type {number || null}
328
+ */
329
+ this.ImageResponseType = null;
330
+
331
+ }
332
+
333
+ /**
334
+ * @private
335
+ */
336
+ deserialize(params) {
337
+ if (!params) {
338
+ return;
339
+ }
340
+ this.ImageResponseType = 'ImageResponseType' in params ? params.ImageResponseType : null;
341
+
342
+ }
343
+ }
344
+
345
+ /**
346
+ * ParseDocument response structure.
347
+ * @class
348
+ */
349
+ class ParseDocumentResponse extends AbstractModel {
350
+ constructor(){
351
+ super();
352
+
353
+ /**
354
+ * Progress: 0-100.
355
+ * @type {string || null}
356
+ */
357
+ this.Progress = null;
358
+
359
+ /**
360
+ * File parsing result.
361
+ * @type {string || null}
362
+ */
363
+ this.DocumentParseResultUrl = null;
364
+
365
+ /**
366
+ * Page number of the failure.
367
+ * @type {Array.<number> || null}
368
+ */
369
+ this.FailedPages = null;
370
+
371
+ /**
372
+ * Page number consumption
373
+ * @type {PageUsage || null}
374
+ */
375
+ this.Usage = null;
376
+
377
+ /**
378
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. As a streaming response API, when the request is successfully completed, the RequestId will be placed in the Header "X-TC-RequestId" of the HTTP response.
379
+ * @type {string || null}
380
+ */
381
+ this.RequestId = null;
382
+
383
+ }
384
+
385
+ /**
386
+ * @private
387
+ */
388
+ deserialize(params) {
389
+ if (!params) {
390
+ return;
391
+ }
392
+ this.Progress = 'Progress' in params ? params.Progress : null;
393
+ this.DocumentParseResultUrl = 'DocumentParseResultUrl' in params ? params.DocumentParseResultUrl : null;
394
+ this.FailedPages = 'FailedPages' in params ? params.FailedPages : null;
395
+
396
+ if (params.Usage) {
397
+ let obj = new PageUsage();
398
+ obj.deserialize(params.Usage)
399
+ this.Usage = obj;
400
+ }
401
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
402
+
403
+ }
404
+ }
405
+
406
+ /**
407
+ * Document Information
408
+ * @class
409
+ */
410
+ class Document extends AbstractModel {
411
+ constructor(){
412
+ super();
413
+
414
+ /**
415
+ * Supported file types: PDF, DOC, DOCX, PPT, PPTX, MD, TXT, XLS.
416
+ XLSX,CSV,PNG,JPG,JPEG,BMP,GIF,WEBP,HEIC,EPS,ICNS,
417
+ IM,PCX,PPM,TIFF,XBM,HEIF,JP2
418
+
419
+ Supported file size for document parsing:
420
+ -PDF, DOC, DOCX, PPT, PPTX support 100M.
421
+ -MD, TXT, XLS, XLSX, CSV support 10M.
422
+ -Other supports 20M
423
+
424
+ Supported file size for text slicing:
425
+ -Maximum PDF size: 300 MB
426
+ -D0CX, D0C, PPT, PPTX maximum 200M
427
+ -Maximum 10M for TXT, MD
428
+ -Another maximum of 20M
429
+ * @type {string || null}
430
+ */
431
+ this.FileType = null;
432
+
433
+ /**
434
+ * File storage on Tencent Cloud's URL ensures higher download speed and stability by using Tencent Cloud COS file address.
435
+ * @type {string || null}
436
+ */
437
+ this.FileUrl = null;
438
+
439
+ /**
440
+ * base64 value of the file, carrying the MineType prefix information. The encoded file is no more than 10M.
441
+ Supported file size: The downloaded file is no more than 8M after Base64 encoding. File download time is not more than 3 seconds.
442
+ Supported image pixel: Unilateral between 20-10000px.
443
+ * @type {string || null}
444
+ */
445
+ this.FileContent = null;
446
+
447
+ /**
448
+ * File name, used when uploading with base64.
449
+ * @type {string || null}
450
+ */
451
+ this.FileName = null;
452
+
453
+ /**
454
+ * Starting page number of the document
455
+ * @type {number || null}
456
+ */
457
+ this.FileStartPageNumber = null;
458
+
459
+ /**
460
+ * End page number of the document
461
+ * @type {number || null}
462
+ */
463
+ this.FileEndPageNumber = null;
464
+
465
+ }
466
+
467
+ /**
468
+ * @private
469
+ */
470
+ deserialize(params) {
471
+ if (!params) {
472
+ return;
473
+ }
474
+ this.FileType = 'FileType' in params ? params.FileType : null;
475
+ this.FileUrl = 'FileUrl' in params ? params.FileUrl : null;
476
+ this.FileContent = 'FileContent' in params ? params.FileContent : null;
477
+ this.FileName = 'FileName' in params ? params.FileName : null;
478
+ this.FileStartPageNumber = 'FileStartPageNumber' in params ? params.FileStartPageNumber : null;
479
+ this.FileEndPageNumber = 'FileEndPageNumber' in params ? params.FileEndPageNumber : null;
480
+
481
+ }
482
+ }
483
+
484
+ /**
485
+ * GetTextEmbedding request structure.
486
+ * @class
487
+ */
488
+ class GetTextEmbeddingRequest extends AbstractModel {
489
+ constructor(){
490
+ super();
491
+
492
+ /**
493
+ * Model name, selectable model list: bge-base-zh-v1.5, bge-large-zh-v1.5, Conan-embedding-v1, bge-m3, KaLM-embedding-multilingual-mini-v1, Qwen3-Embedding-0.6B.
494
+ * @type {string || null}
495
+ */
496
+ this.ModelName = null;
497
+
498
+ /**
499
+ * Text set to be vectorized.
500
+ * @type {Array.<string> || null}
501
+ */
502
+ this.Texts = null;
503
+
504
+ }
505
+
506
+ /**
507
+ * @private
508
+ */
509
+ deserialize(params) {
510
+ if (!params) {
511
+ return;
512
+ }
513
+ this.ModelName = 'ModelName' in params ? params.ModelName : null;
514
+ this.Texts = 'Texts' in params ? params.Texts : null;
515
+
516
+ }
517
+ }
518
+
519
+ /**
520
+ * ParseDocumentAsync response structure.
521
+ * @class
522
+ */
523
+ class ParseDocumentAsyncResponse extends AbstractModel {
524
+ constructor(){
525
+ super();
526
+
527
+ /**
528
+ * Task ID
529
+ * @type {string || null}
530
+ */
531
+ this.TaskId = null;
532
+
533
+ /**
534
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
535
+ * @type {string || null}
536
+ */
537
+ this.RequestId = null;
538
+
539
+ }
540
+
541
+ /**
542
+ * @private
543
+ */
544
+ deserialize(params) {
545
+ if (!params) {
546
+ return;
547
+ }
548
+ this.TaskId = 'TaskId' in params ? params.TaskId : null;
549
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
550
+
551
+ }
552
+ }
553
+
554
+ /**
555
+ * ChunkDocument response structure.
556
+ * @class
557
+ */
558
+ class ChunkDocumentResponse extends AbstractModel {
559
+ constructor(){
560
+ super();
561
+
562
+ /**
563
+ * None.
564
+ * @type {Array.<Chunk> || null}
565
+ */
566
+ this.Chunks = null;
567
+
568
+ /**
569
+ * token consumption
570
+ * @type {Usage || null}
571
+ */
572
+ this.Usage = null;
573
+
574
+ /**
575
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
576
+ * @type {string || null}
577
+ */
578
+ this.RequestId = null;
579
+
580
+ }
581
+
582
+ /**
583
+ * @private
584
+ */
585
+ deserialize(params) {
586
+ if (!params) {
587
+ return;
588
+ }
589
+
590
+ if (params.Chunks) {
591
+ this.Chunks = new Array();
592
+ for (let z in params.Chunks) {
593
+ let obj = new Chunk();
594
+ obj.deserialize(params.Chunks[z]);
595
+ this.Chunks.push(obj);
596
+ }
597
+ }
598
+
599
+ if (params.Usage) {
600
+ let obj = new Usage();
601
+ obj.deserialize(params.Usage)
602
+ this.Usage = obj;
603
+ }
604
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
605
+
606
+ }
607
+ }
608
+
609
+ /**
610
+ * GetDocumentParseResult response structure.
611
+ * @class
612
+ */
613
+ class GetDocumentParseResultResponse extends AbstractModel {
614
+ constructor(){
615
+ super();
616
+
617
+ /**
618
+ * Task status, -1: failure, 0: running, 1: success.
619
+ * @type {number || null}
620
+ */
621
+ this.Status = null;
622
+
623
+ /**
624
+ * Result file.
625
+ * @type {string || null}
626
+ */
627
+ this.DocumentParseResultUrl = null;
628
+
629
+ /**
630
+ * Failed page number.
631
+ Note: This field may return null, indicating that no valid values can be obtained.
632
+ * @type {Array.<number> || null}
633
+ */
634
+ this.FailedPages = null;
635
+
636
+ /**
637
+ * Page number consumption
638
+ * @type {PageUsage || null}
639
+ */
640
+ this.Usage = null;
641
+
642
+ /**
643
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
644
+ * @type {string || null}
645
+ */
646
+ this.RequestId = null;
647
+
648
+ }
649
+
650
+ /**
651
+ * @private
652
+ */
653
+ deserialize(params) {
654
+ if (!params) {
655
+ return;
656
+ }
657
+ this.Status = 'Status' in params ? params.Status : null;
658
+ this.DocumentParseResultUrl = 'DocumentParseResultUrl' in params ? params.DocumentParseResultUrl : null;
659
+ this.FailedPages = 'FailedPages' in params ? params.FailedPages : null;
660
+
661
+ if (params.Usage) {
662
+ let obj = new PageUsage();
663
+ obj.deserialize(params.Usage)
664
+ this.Usage = obj;
665
+ }
666
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
667
+
668
+ }
669
+ }
670
+
671
+ /**
672
+ * RunRerank request structure.
673
+ * @class
674
+ */
675
+ class RunRerankRequest extends AbstractModel {
676
+ constructor(){
677
+ super();
678
+
679
+ /**
680
+ * Model name, selectable model list: bge-reranker-large, bge-reranker-v2-m3.
681
+ * @type {string || null}
682
+ */
683
+ this.ModelName = null;
684
+
685
+ /**
686
+ * Query text.
687
+ * @type {string || null}
688
+ */
689
+ this.Query = null;
690
+
691
+ /**
692
+ * List of candidate docs to sort.
693
+ * @type {Array.<string> || null}
694
+ */
695
+ this.Documents = null;
696
+
697
+ /**
698
+ * Number of top documents returned in sorting order. If not specified, return all candidate docs. If the specified top_n value is larger than the number of input candidate docs, return all docs.
699
+ * @type {number || null}
700
+ */
701
+ this.TopN = null;
702
+
703
+ /**
704
+ * Whether to return the original document for each sorting result inside the result list. Default value: False.
705
+ * @type {boolean || null}
706
+ */
707
+ this.ReturnDocuments = null;
708
+
709
+ }
710
+
711
+ /**
712
+ * @private
713
+ */
714
+ deserialize(params) {
715
+ if (!params) {
716
+ return;
717
+ }
718
+ this.ModelName = 'ModelName' in params ? params.ModelName : null;
719
+ this.Query = 'Query' in params ? params.Query : null;
720
+ this.Documents = 'Documents' in params ? params.Documents : null;
721
+ this.TopN = 'TopN' in params ? params.TopN : null;
722
+ this.ReturnDocuments = 'ReturnDocuments' in params ? params.ReturnDocuments : null;
723
+
724
+ }
725
+ }
726
+
727
+ /**
728
+ * Vector content
729
+ * @class
730
+ */
731
+ class EmbeddingData extends AbstractModel {
732
+ constructor(){
733
+ super();
734
+
735
+ /**
736
+ * embedding content
737
+ Note: This field may return null, indicating that no valid values can be obtained.
738
+ * @type {Array.<number> || null}
739
+ */
740
+ this.Embedding = null;
741
+
742
+ /**
743
+ * Index serial number
744
+ Note: This field may return null, indicating that no valid values can be obtained.
745
+ * @type {number || null}
746
+ */
747
+ this.Index = null;
748
+
749
+ }
750
+
751
+ /**
752
+ * @private
753
+ */
754
+ deserialize(params) {
755
+ if (!params) {
756
+ return;
757
+ }
758
+ this.Embedding = 'Embedding' in params ? params.Embedding : null;
759
+ this.Index = 'Index' in params ? params.Index : null;
760
+
761
+ }
762
+ }
763
+
764
+ /**
765
+ * Document sharding configuration
766
+ * @class
767
+ */
768
+ class ChunkConfig extends AbstractModel {
769
+ constructor(){
770
+ super();
771
+
772
+ /**
773
+ * After splitting by the separator, the fragment length is validated. If it exceeds the maximum fragment length, it is split using the next-level separator. If there is no next-level separator, the original length is retained. Default value: 1000.
774
+ * @type {number || null}
775
+ */
776
+ this.MaxChunkSize = null;
777
+
778
+ /**
779
+ * Separator list, separators positioned towards the front take precedence; when the file type is TXT, default value: ["\n\n", "\n", ".", ".", "?", ",", ""].
780
+ * @type {Array.<string> || null}
781
+ */
782
+ this.Delimiters = null;
783
+
784
+ /**
785
+ * The number of overlapping characters between adjacent fragments must be less than the fragment length. Fragments that form completely redundant slices are automatically filtered. Default value: 0.2*MaxChunkSize
786
+ * @type {number || null}
787
+ */
788
+ this.ChunkOverlap = null;
789
+
790
+ }
791
+
792
+ /**
793
+ * @private
794
+ */
795
+ deserialize(params) {
796
+ if (!params) {
797
+ return;
798
+ }
799
+ this.MaxChunkSize = 'MaxChunkSize' in params ? params.MaxChunkSize : null;
800
+ this.Delimiters = 'Delimiters' in params ? params.Delimiters : null;
801
+ this.ChunkOverlap = 'ChunkOverlap' in params ? params.ChunkOverlap : null;
802
+
803
+ }
804
+ }
805
+
806
+ /**
807
+ * Document Information
808
+ * @class
809
+ */
810
+ class ParseDocument extends AbstractModel {
811
+ constructor(){
812
+ super();
813
+
814
+ /**
815
+ * Supported file types: PDF, DOC, DOCX, PPT, PPTX, MD, TXT, XLS.
816
+ XLSX,CSV,PNG,JPG,JPEG,BMP,GIF,WEBP,HEIC,EPS,ICNS,
817
+ IM,PCX,PPM,TIFF,XBM,HEIF,JP2
818
+
819
+ Supported file size for document parsing:
820
+ -PDF, DOC, DOCX, PPT, PPTX support 100M.
821
+ -MD, TXT, XLS, XLSX, CSV support 10M.
822
+ -Another supports 20M
823
+
824
+ Supported file size for text slicing:
825
+ -Maximum PDF size: 300 MB
826
+ -D0CX, D0C, PPT, PPTX maximum 200M
827
+ -Maximum 10M for TXT, MD
828
+ -Other maximum 20M
829
+ * @type {string || null}
830
+ */
831
+ this.FileType = null;
832
+
833
+ /**
834
+ * File storage on Tencent Cloud's URL ensures higher download speed and stability by using Tencent Cloud COS file address.
835
+ * @type {string || null}
836
+ */
837
+ this.FileUrl = null;
838
+
839
+ /**
840
+ * base64 value of the file, carrying the MineType prefix information. The encoded file is no more than 10M.
841
+ Supported file size: The downloaded file is no more than 8M after Base64 encoding. File download time is no more than 3 seconds.
842
+ Supported image pixel: Unilateral between 20-10000px.
843
+ Either FileUrl or FileContent of the file must be provided. If both are provided, only FileUrl is used.
844
+ * @type {string || null}
845
+ */
846
+ this.FileContent = null;
847
+
848
+ /**
849
+ * Document parsing configuration
850
+ * @type {DocumentParseConfig || null}
851
+ */
852
+ this.DocumentParseConfig = null;
853
+
854
+ /**
855
+ * Starting page number of the document
856
+ * @type {number || null}
857
+ */
858
+ this.FileStartPageNumber = null;
859
+
860
+ /**
861
+ * End page number of the document
862
+ * @type {number || null}
863
+ */
864
+ this.FileEndPageNumber = null;
865
+
866
+ }
867
+
868
+ /**
869
+ * @private
870
+ */
871
+ deserialize(params) {
872
+ if (!params) {
873
+ return;
874
+ }
875
+ this.FileType = 'FileType' in params ? params.FileType : null;
876
+ this.FileUrl = 'FileUrl' in params ? params.FileUrl : null;
877
+ this.FileContent = 'FileContent' in params ? params.FileContent : null;
878
+
879
+ if (params.DocumentParseConfig) {
880
+ let obj = new DocumentParseConfig();
881
+ obj.deserialize(params.DocumentParseConfig)
882
+ this.DocumentParseConfig = obj;
883
+ }
884
+ this.FileStartPageNumber = 'FileStartPageNumber' in params ? params.FileStartPageNumber : null;
885
+ this.FileEndPageNumber = 'FileEndPageNumber' in params ? params.FileEndPageNumber : null;
886
+
887
+ }
888
+ }
889
+
890
+ /**
891
+ * GetDocumentChunkResult response structure.
892
+ * @class
893
+ */
894
+ class GetDocumentChunkResultResponse extends AbstractModel {
895
+ constructor(){
896
+ super();
897
+
898
+ /**
899
+ * Task status, -1: failure, 0: running, 1: success.
900
+ * @type {number || null}
901
+ */
902
+ this.Status = null;
903
+
904
+ /**
905
+ * Document slice result file.
906
+ * @type {string || null}
907
+ */
908
+ this.DocumentChunkResultUrl = null;
909
+
910
+ /**
911
+ * Token amount.
912
+ * @type {DocumentChunkUsage || null}
913
+ */
914
+ this.Usage = null;
915
+
916
+ /**
917
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
918
+ * @type {string || null}
919
+ */
920
+ this.RequestId = null;
921
+
922
+ }
923
+
924
+ /**
925
+ * @private
926
+ */
927
+ deserialize(params) {
928
+ if (!params) {
929
+ return;
930
+ }
931
+ this.Status = 'Status' in params ? params.Status : null;
932
+ this.DocumentChunkResultUrl = 'DocumentChunkResultUrl' in params ? params.DocumentChunkResultUrl : null;
933
+
934
+ if (params.Usage) {
935
+ let obj = new DocumentChunkUsage();
936
+ obj.deserialize(params.Usage)
937
+ this.Usage = obj;
938
+ }
939
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
940
+
941
+ }
942
+ }
943
+
944
+ /**
945
+ * ChunkDocumentAsync response structure.
946
+ * @class
947
+ */
948
+ class ChunkDocumentAsyncResponse extends AbstractModel {
949
+ constructor(){
950
+ super();
951
+
952
+ /**
953
+ * Task ID
954
+ * @type {string || null}
955
+ */
956
+ this.TaskId = null;
957
+
958
+ /**
959
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
960
+ * @type {string || null}
961
+ */
962
+ this.RequestId = null;
963
+
964
+ }
965
+
966
+ /**
967
+ * @private
968
+ */
969
+ deserialize(params) {
970
+ if (!params) {
971
+ return;
972
+ }
973
+ this.TaskId = 'TaskId' in params ? params.TaskId : null;
974
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
975
+
976
+ }
977
+ }
978
+
979
+ /**
980
+ * GetMultiModalEmbedding response structure.
981
+ * @class
982
+ */
983
+ class GetMultiModalEmbeddingResponse extends AbstractModel {
984
+ constructor(){
985
+ super();
986
+
987
+ /**
988
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
989
+ * @type {string || null}
990
+ */
991
+ this.RequestId = null;
992
+
993
+ }
994
+
995
+ /**
996
+ * @private
997
+ */
998
+ deserialize(params) {
999
+ if (!params) {
1000
+ return;
1001
+ }
1002
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
1003
+
1004
+ }
1005
+ }
1006
+
1007
+ /**
1008
+ * GetMultiModalEmbedding request structure.
1009
+ * @class
1010
+ */
1011
+ class GetMultiModalEmbeddingRequest extends AbstractModel {
1012
+ constructor(){
1013
+ super();
1014
+
1015
+ }
1016
+
1017
+ /**
1018
+ * @private
1019
+ */
1020
+ deserialize(params) {
1021
+ if (!params) {
1022
+ return;
1023
+ }
1024
+
1025
+ }
1026
+ }
1027
+
1028
+ /**
1029
+ * ParseDocument request structure.
1030
+ * @class
1031
+ */
1032
+ class ParseDocumentRequest extends AbstractModel {
1033
+ constructor(){
1034
+ super();
1035
+
1036
+ /**
1037
+ * File Information
1038
+ * @type {ParseDocument || null}
1039
+ */
1040
+ this.Document = null;
1041
+
1042
+ /**
1043
+ * Model name, doc-llm.
1044
+ * @type {string || null}
1045
+ */
1046
+ this.ModelName = null;
1047
+
1048
+ }
1049
+
1050
+ /**
1051
+ * @private
1052
+ */
1053
+ deserialize(params) {
1054
+ if (!params) {
1055
+ return;
1056
+ }
1057
+
1058
+ if (params.Document) {
1059
+ let obj = new ParseDocument();
1060
+ obj.deserialize(params.Document)
1061
+ this.Document = obj;
1062
+ }
1063
+ this.ModelName = 'ModelName' in params ? params.ModelName : null;
1064
+
1065
+ }
1066
+ }
1067
+
1068
+ /**
1069
+ * Slice object information
1070
+ * @class
1071
+ */
1072
+ class Chunk extends AbstractModel {
1073
+ constructor(){
1074
+ super();
1075
+
1076
+ /**
1077
+ * chunk index. Slice sequence id.
1078
+ * @type {number || null}
1079
+ */
1080
+ this.Index = null;
1081
+
1082
+ /**
1083
+ * chunk content.
1084
+ * @type {string || null}
1085
+ */
1086
+ this.Content = null;
1087
+
1088
+ }
1089
+
1090
+ /**
1091
+ * @private
1092
+ */
1093
+ deserialize(params) {
1094
+ if (!params) {
1095
+ return;
1096
+ }
1097
+ this.Index = 'Index' in params ? params.Index : null;
1098
+ this.Content = 'Content' in params ? params.Content : null;
1099
+
1100
+ }
1101
+ }
1102
+
1103
+ /**
1104
+ * Document slicing async task
1105
+ * @class
1106
+ */
1107
+ class ChunkConfigAsync extends AbstractModel {
1108
+ constructor(){
1109
+ super();
1110
+
1111
+ /**
1112
+ * Maximum fragment length
1113
+ * @type {number || null}
1114
+ */
1115
+ this.MaxChunkSize = null;
1116
+
1117
+ }
1118
+
1119
+ /**
1120
+ * @private
1121
+ */
1122
+ deserialize(params) {
1123
+ if (!params) {
1124
+ return;
1125
+ }
1126
+ this.MaxChunkSize = 'MaxChunkSize' in params ? params.MaxChunkSize : null;
1127
+
1128
+ }
1129
+ }
1130
+
1131
+ /**
1132
+ * GetTextEmbedding response structure.
1133
+ * @class
1134
+ */
1135
+ class GetTextEmbeddingResponse extends AbstractModel {
1136
+ constructor(){
1137
+ super();
1138
+
1139
+ /**
1140
+ * Result set.
1141
+ * @type {Array.<EmbeddingData> || null}
1142
+ */
1143
+ this.Data = null;
1144
+
1145
+ /**
1146
+ * token consumption for vectorization.
1147
+ * @type {Usage || null}
1148
+ */
1149
+ this.Usage = null;
1150
+
1151
+ /**
1152
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
1153
+ * @type {string || null}
1154
+ */
1155
+ this.RequestId = null;
1156
+
1157
+ }
1158
+
1159
+ /**
1160
+ * @private
1161
+ */
1162
+ deserialize(params) {
1163
+ if (!params) {
1164
+ return;
1165
+ }
1166
+
1167
+ if (params.Data) {
1168
+ this.Data = new Array();
1169
+ for (let z in params.Data) {
1170
+ let obj = new EmbeddingData();
1171
+ obj.deserialize(params.Data[z]);
1172
+ this.Data.push(obj);
1173
+ }
1174
+ }
1175
+
1176
+ if (params.Usage) {
1177
+ let obj = new Usage();
1178
+ obj.deserialize(params.Usage)
1179
+ this.Usage = obj;
1180
+ }
1181
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
1182
+
1183
+ }
1184
+ }
1185
+
1186
+ /**
1187
+ * ParseDocumentAsync request structure.
1188
+ * @class
1189
+ */
1190
+ class ParseDocumentAsyncRequest extends AbstractModel {
1191
+ constructor(){
1192
+ super();
1193
+
1194
+ /**
1195
+ * File information.
1196
+ * @type {Document || null}
1197
+ */
1198
+ this.Document = null;
1199
+
1200
+ /**
1201
+ * Model name, selectable model list: doc-llm.
1202
+ * @type {string || null}
1203
+ */
1204
+ this.ModelName = null;
1205
+
1206
+ }
1207
+
1208
+ /**
1209
+ * @private
1210
+ */
1211
+ deserialize(params) {
1212
+ if (!params) {
1213
+ return;
1214
+ }
1215
+
1216
+ if (params.Document) {
1217
+ let obj = new Document();
1218
+ obj.deserialize(params.Document)
1219
+ this.Document = obj;
1220
+ }
1221
+ this.ModelName = 'ModelName' in params ? params.ModelName : null;
1222
+
1223
+ }
1224
+ }
1225
+
1226
+ /**
1227
+ * Document slice information
1228
+ * @class
1229
+ */
1230
+ class ChunkDocument extends AbstractModel {
1231
+ constructor(){
1232
+ super();
1233
+
1234
+ /**
1235
+ * File type, supports MD and TXT formats.
1236
+ * @type {string || null}
1237
+ */
1238
+ this.FileType = null;
1239
+
1240
+ /**
1241
+ * Text original, use string format input.
1242
+ * @type {string || null}
1243
+ */
1244
+ this.FileContent = null;
1245
+
1246
+ }
1247
+
1248
+ /**
1249
+ * @private
1250
+ */
1251
+ deserialize(params) {
1252
+ if (!params) {
1253
+ return;
1254
+ }
1255
+ this.FileType = 'FileType' in params ? params.FileType : null;
1256
+ this.FileContent = 'FileContent' in params ? params.FileContent : null;
1257
+
1258
+ }
1259
+ }
1260
+
1261
+ /**
1262
+ * RunRerank response structure.
1263
+ * @class
1264
+ */
1265
+ class RunRerankResponse extends AbstractModel {
1266
+ constructor(){
1267
+ super();
1268
+
1269
+ /**
1270
+ * Output result set.
1271
+ * @type {Array.<RerankResult> || null}
1272
+ */
1273
+ this.Data = null;
1274
+
1275
+ /**
1276
+ * token consumption.
1277
+ * @type {Usage || null}
1278
+ */
1279
+ this.Usage = null;
1280
+
1281
+ /**
1282
+ * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
1283
+ * @type {string || null}
1284
+ */
1285
+ this.RequestId = null;
1286
+
1287
+ }
1288
+
1289
+ /**
1290
+ * @private
1291
+ */
1292
+ deserialize(params) {
1293
+ if (!params) {
1294
+ return;
1295
+ }
1296
+
1297
+ if (params.Data) {
1298
+ this.Data = new Array();
1299
+ for (let z in params.Data) {
1300
+ let obj = new RerankResult();
1301
+ obj.deserialize(params.Data[z]);
1302
+ this.Data.push(obj);
1303
+ }
1304
+ }
1305
+
1306
+ if (params.Usage) {
1307
+ let obj = new Usage();
1308
+ obj.deserialize(params.Usage)
1309
+ this.Usage = obj;
1310
+ }
1311
+ this.RequestId = 'RequestId' in params ? params.RequestId : null;
1312
+
1313
+ }
1314
+ }
1315
+
1316
+ module.exports = {
1317
+ DocumentChunkUsage: DocumentChunkUsage,
1318
+ ChunkDocumentAsyncRequest: ChunkDocumentAsyncRequest,
1319
+ ChunkDocumentRequest: ChunkDocumentRequest,
1320
+ GetDocumentChunkResultRequest: GetDocumentChunkResultRequest,
1321
+ RerankResult: RerankResult,
1322
+ GetDocumentParseResultRequest: GetDocumentParseResultRequest,
1323
+ PageUsage: PageUsage,
1324
+ Usage: Usage,
1325
+ DocumentParseConfig: DocumentParseConfig,
1326
+ ParseDocumentResponse: ParseDocumentResponse,
1327
+ Document: Document,
1328
+ GetTextEmbeddingRequest: GetTextEmbeddingRequest,
1329
+ ParseDocumentAsyncResponse: ParseDocumentAsyncResponse,
1330
+ ChunkDocumentResponse: ChunkDocumentResponse,
1331
+ GetDocumentParseResultResponse: GetDocumentParseResultResponse,
1332
+ RunRerankRequest: RunRerankRequest,
1333
+ EmbeddingData: EmbeddingData,
1334
+ ChunkConfig: ChunkConfig,
1335
+ ParseDocument: ParseDocument,
1336
+ GetDocumentChunkResultResponse: GetDocumentChunkResultResponse,
1337
+ ChunkDocumentAsyncResponse: ChunkDocumentAsyncResponse,
1338
+ GetMultiModalEmbeddingResponse: GetMultiModalEmbeddingResponse,
1339
+ GetMultiModalEmbeddingRequest: GetMultiModalEmbeddingRequest,
1340
+ ParseDocumentRequest: ParseDocumentRequest,
1341
+ Chunk: Chunk,
1342
+ ChunkConfigAsync: ChunkConfigAsync,
1343
+ GetTextEmbeddingResponse: GetTextEmbeddingResponse,
1344
+ ParseDocumentAsyncRequest: ParseDocumentAsyncRequest,
1345
+ ChunkDocument: ChunkDocument,
1346
+ RunRerankResponse: RunRerankResponse,
1347
+
1348
+ }