tencentcloud-sdk-nodejs-intl-en 3.0.1248 → 3.0.1249
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 +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/index.js +1 -0
- package/tencentcloud/lkeap/index.js +3 -0
- package/tencentcloud/lkeap/v20240522/index.js +4 -0
- package/tencentcloud/lkeap/v20240522/lkeap_client.js +121 -0
- package/tencentcloud/lkeap/v20240522/models.js +933 -0
- package/tencentcloud/ocr/v20181119/ocr_client.js +1 -1
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const sdkVersion = "3.0.
|
|
1
|
+
const sdkVersion = "3.0.1249";
|
|
2
2
|
module.exports = sdkVersion
|
package/tencentcloud/index.js
CHANGED
|
@@ -0,0 +1,121 @@
|
|
|
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 models = require("./models");
|
|
18
|
+
const AbstractClient = require('../../common/abstract_client')
|
|
19
|
+
const CreateSplitDocumentFlowRequest = models.CreateSplitDocumentFlowRequest;
|
|
20
|
+
const QueryRewriteRequest = models.QueryRewriteRequest;
|
|
21
|
+
const SplitDocumentFailedPage = models.SplitDocumentFailedPage;
|
|
22
|
+
const Usage = models.Usage;
|
|
23
|
+
const RunRerankRequest = models.RunRerankRequest;
|
|
24
|
+
const CreateReconstructDocumentFlowRequest = models.CreateReconstructDocumentFlowRequest;
|
|
25
|
+
const DocumentUsage = models.DocumentUsage;
|
|
26
|
+
const RunRerankResponse = models.RunRerankResponse;
|
|
27
|
+
const CreateReconstructDocumentFlowResponse = models.CreateReconstructDocumentFlowResponse;
|
|
28
|
+
const GetReconstructDocumentResultResponse = models.GetReconstructDocumentResultResponse;
|
|
29
|
+
const CreateReconstructDocumentFlowConfig = models.CreateReconstructDocumentFlowConfig;
|
|
30
|
+
const CreateSplitDocumentFlowConfig = models.CreateSplitDocumentFlowConfig;
|
|
31
|
+
const GetReconstructDocumentResultRequest = models.GetReconstructDocumentResultRequest;
|
|
32
|
+
const GetSplitDocumentResultRequest = models.GetSplitDocumentResultRequest;
|
|
33
|
+
const QueryRewriteResponse = models.QueryRewriteResponse;
|
|
34
|
+
const ReconstructDocumentFailedPage = models.ReconstructDocumentFailedPage;
|
|
35
|
+
const Message = models.Message;
|
|
36
|
+
const GetSplitDocumentResultResponse = models.GetSplitDocumentResultResponse;
|
|
37
|
+
const CreateSplitDocumentFlowResponse = models.CreateSplitDocumentFlowResponse;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* lkeap client
|
|
42
|
+
* @class
|
|
43
|
+
*/
|
|
44
|
+
class LkeapClient extends AbstractClient {
|
|
45
|
+
|
|
46
|
+
constructor(credential, region, profile) {
|
|
47
|
+
super("lkeap.intl.tencentcloudapi.com", "2024-05-22", credential, region, profile);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* This API is used to initiate requests for this asynchronous API, for initiating document parsing tasks.
|
|
52
|
+
Document parsing supports converting images or PDF files into Markdown format files, and can parse content elements including tables, formulas, images, headings, paragraphs, headers, and footers, and intelligently convert the content into reading order. Please refer to the input parameter list below for specific supported file types.
|
|
53
|
+
During the trial period, the QPS limit for a single account is only 1. If you need to access officially, please contact our R&D team.
|
|
54
|
+
* @param {CreateReconstructDocumentFlowRequest} req
|
|
55
|
+
* @param {function(string, CreateReconstructDocumentFlowResponse):void} cb
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
CreateReconstructDocumentFlow(req, cb) {
|
|
59
|
+
let resp = new CreateReconstructDocumentFlowResponse();
|
|
60
|
+
this.request("CreateReconstructDocumentFlow", req, resp, cb);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* This API is used to query the results of document splitting tasks.
|
|
65
|
+
* @param {GetSplitDocumentResultRequest} req
|
|
66
|
+
* @param {function(string, GetSplitDocumentResultResponse):void} cb
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
GetSplitDocumentResult(req, cb) {
|
|
70
|
+
let resp = new GetSplitDocumentResultResponse();
|
|
71
|
+
this.request("GetSplitDocumentResult", req, resp, cb);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* QueryRewrite is mainly used in multi-round conversations for reference resolution and ellipsis completion. Using this API, you don't need to input prompt descriptions. A more accurate user query can be generated based on the conversation history. In terms of application scenarios, this API can be applied to various scenarios such as intelligent Q&A and conversational search.
|
|
76
|
+
There is a call limit for single-account for this API. If you need to increase the concurrency limit, please contact us (https://cloud.tencent.com/act/event/Online_service).
|
|
77
|
+
* @param {QueryRewriteRequest} req
|
|
78
|
+
* @param {function(string, QueryRewriteResponse):void} cb
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
QueryRewrite(req, cb) {
|
|
82
|
+
let resp = new QueryRewriteResponse();
|
|
83
|
+
this.request("QueryRewrite", req, resp, cb);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* This API is used to reorder the results of multi-channel recall based on the rerank model of knowledge engine fine-tuning model technology, sort the segments according to the relevance between the query and the segment content from high to low score, and output the corresponding scoring results.
|
|
88
|
+
* @param {RunRerankRequest} req
|
|
89
|
+
* @param {function(string, RunRerankResponse):void} cb
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
RunRerank(req, cb) {
|
|
93
|
+
let resp = new RunRerankResponse();
|
|
94
|
+
this.request("RunRerank", req, resp, cb);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* This is an asynchronous API for querying results, which is used to obtain the result of document parsing.
|
|
99
|
+
* @param {GetReconstructDocumentResultRequest} req
|
|
100
|
+
* @param {function(string, GetReconstructDocumentResultResponse):void} cb
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
GetReconstructDocumentResult(req, cb) {
|
|
104
|
+
let resp = new GetReconstructDocumentResultResponse();
|
|
105
|
+
this.request("GetReconstructDocumentResult", req, resp, cb);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* This API is used to create document segmentation tasks, support various file types, possess mllm capacity, and can analyze and deeply understand the information in charts.
|
|
110
|
+
* @param {CreateSplitDocumentFlowRequest} req
|
|
111
|
+
* @param {function(string, CreateSplitDocumentFlowResponse):void} cb
|
|
112
|
+
* @public
|
|
113
|
+
*/
|
|
114
|
+
CreateSplitDocumentFlow(req, cb) {
|
|
115
|
+
let resp = new CreateSplitDocumentFlowResponse();
|
|
116
|
+
this.request("CreateSplitDocumentFlow", req, resp, cb);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
}
|
|
121
|
+
module.exports = LkeapClient;
|
|
@@ -0,0 +1,933 @@
|
|
|
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
|
+
* CreateSplitDocumentFlow request structure.
|
|
21
|
+
* @class
|
|
22
|
+
*/
|
|
23
|
+
class CreateSplitDocumentFlowRequest extends AbstractModel {
|
|
24
|
+
constructor(){
|
|
25
|
+
super();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* File type.
|
|
29
|
+
**Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB.
|
|
30
|
+
**Supported file sizes**:
|
|
31
|
+
- Max 500 MB for PDF.
|
|
32
|
+
- Max 200 MB for DOC, DOCX, PPT, and PPTX .
|
|
33
|
+
- Max 10 MB for MD, and TXT.
|
|
34
|
+
- Max 20 MB for others.
|
|
35
|
+
* @type {string || null}
|
|
36
|
+
*/
|
|
37
|
+
this.FileType = null;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* File URL. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability.
|
|
41
|
+
Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749).
|
|
42
|
+
* @type {string || null}
|
|
43
|
+
*/
|
|
44
|
+
this.FileUrl = null;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Filename. optional.
|
|
48
|
+
**The file type suffix shall be included**. This field is required to be specified when the file name cannot be obtained from the passed-in "FileUrl".
|
|
49
|
+
* @type {string || null}
|
|
50
|
+
*/
|
|
51
|
+
this.FileName = null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The base64 value of the file. File size limit: the downloaded file shall not exceed 8MB after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
|
|
55
|
+
* @type {string || null}
|
|
56
|
+
*/
|
|
57
|
+
this.FileBase64 = null;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The starting page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
|
|
61
|
+
* @type {number || null}
|
|
62
|
+
*/
|
|
63
|
+
this.FileStartPageNumber = null;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The end page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the end page number for recognition, including the current value.
|
|
67
|
+
* @type {number || null}
|
|
68
|
+
*/
|
|
69
|
+
this.FileEndPageNumber = null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Configuration message for document splitting task.
|
|
73
|
+
* @type {CreateSplitDocumentFlowConfig || null}
|
|
74
|
+
*/
|
|
75
|
+
this.Config = null;
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
deserialize(params) {
|
|
83
|
+
if (!params) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.FileType = 'FileType' in params ? params.FileType : null;
|
|
87
|
+
this.FileUrl = 'FileUrl' in params ? params.FileUrl : null;
|
|
88
|
+
this.FileName = 'FileName' in params ? params.FileName : null;
|
|
89
|
+
this.FileBase64 = 'FileBase64' in params ? params.FileBase64 : null;
|
|
90
|
+
this.FileStartPageNumber = 'FileStartPageNumber' in params ? params.FileStartPageNumber : null;
|
|
91
|
+
this.FileEndPageNumber = 'FileEndPageNumber' in params ? params.FileEndPageNumber : null;
|
|
92
|
+
|
|
93
|
+
if (params.Config) {
|
|
94
|
+
let obj = new CreateSplitDocumentFlowConfig();
|
|
95
|
+
obj.deserialize(params.Config)
|
|
96
|
+
this.Config = obj;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* QueryRewrite request structure.
|
|
104
|
+
* @class
|
|
105
|
+
*/
|
|
106
|
+
class QueryRewriteRequest extends AbstractModel {
|
|
107
|
+
constructor(){
|
|
108
|
+
super();
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The multi-round historical conversation that needs to be rewritten. Each round of historical conversation should include paired inputs of user (question) and assistant (answer). Due to the character limit of the model, a maximum of 4 rounds of conversations can be provided. The last round of conversation will be rewritten.
|
|
112
|
+
* @type {Array.<Message> || null}
|
|
113
|
+
*/
|
|
114
|
+
this.Messages = null;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Model name.
|
|
118
|
+
* @type {string || null}
|
|
119
|
+
*/
|
|
120
|
+
this.Model = null;
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
deserialize(params) {
|
|
128
|
+
if (!params) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (params.Messages) {
|
|
133
|
+
this.Messages = new Array();
|
|
134
|
+
for (let z in params.Messages) {
|
|
135
|
+
let obj = new Message();
|
|
136
|
+
obj.deserialize(params.Messages[z]);
|
|
137
|
+
this.Messages.push(obj);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
this.Model = 'Model' in params ? params.Model : null;
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Document parsing failure record.
|
|
147
|
+
* @class
|
|
148
|
+
*/
|
|
149
|
+
class SplitDocumentFailedPage extends AbstractModel {
|
|
150
|
+
constructor(){
|
|
151
|
+
super();
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Page number that failed to parse.
|
|
155
|
+
* @type {number || null}
|
|
156
|
+
*/
|
|
157
|
+
this.PageNumber = null;
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
164
|
+
deserialize(params) {
|
|
165
|
+
if (!params) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.PageNumber = 'PageNumber' in params ? params.PageNumber : null;
|
|
169
|
+
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Consumption.
|
|
175
|
+
* @class
|
|
176
|
+
*/
|
|
177
|
+
class Usage extends AbstractModel {
|
|
178
|
+
constructor(){
|
|
179
|
+
super();
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Number of document pages.
|
|
183
|
+
* @type {number || null}
|
|
184
|
+
*/
|
|
185
|
+
this.TotalPages = null;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Number of input tokens.
|
|
189
|
+
* @type {number || null}
|
|
190
|
+
*/
|
|
191
|
+
this.InputTokens = null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Number of output tokens.
|
|
195
|
+
* @type {number || null}
|
|
196
|
+
*/
|
|
197
|
+
this.OutputTokens = null;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Total number of tokens.
|
|
201
|
+
* @type {number || null}
|
|
202
|
+
*/
|
|
203
|
+
this.TotalTokens = null;
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @private
|
|
209
|
+
*/
|
|
210
|
+
deserialize(params) {
|
|
211
|
+
if (!params) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
this.TotalPages = 'TotalPages' in params ? params.TotalPages : null;
|
|
215
|
+
this.InputTokens = 'InputTokens' in params ? params.InputTokens : null;
|
|
216
|
+
this.OutputTokens = 'OutputTokens' in params ? params.OutputTokens : null;
|
|
217
|
+
this.TotalTokens = 'TotalTokens' in params ? params.TotalTokens : null;
|
|
218
|
+
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* RunRerank request structure.
|
|
224
|
+
* @class
|
|
225
|
+
*/
|
|
226
|
+
class RunRerankRequest extends AbstractModel {
|
|
227
|
+
constructor(){
|
|
228
|
+
super();
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Query content.
|
|
232
|
+
* @type {string || null}
|
|
233
|
+
*/
|
|
234
|
+
this.Query = null;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Document list, up to 20 documents.
|
|
238
|
+
* @type {Array.<string> || null}
|
|
239
|
+
*/
|
|
240
|
+
this.Docs = null;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Model name. Default: lke-reranker-base.
|
|
244
|
+
* @type {string || null}
|
|
245
|
+
*/
|
|
246
|
+
this.Model = null;
|
|
247
|
+
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @private
|
|
252
|
+
*/
|
|
253
|
+
deserialize(params) {
|
|
254
|
+
if (!params) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
this.Query = 'Query' in params ? params.Query : null;
|
|
258
|
+
this.Docs = 'Docs' in params ? params.Docs : null;
|
|
259
|
+
this.Model = 'Model' in params ? params.Model : null;
|
|
260
|
+
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* CreateReconstructDocumentFlow request structure.
|
|
266
|
+
* @class
|
|
267
|
+
*/
|
|
268
|
+
class CreateReconstructDocumentFlowRequest extends AbstractModel {
|
|
269
|
+
constructor(){
|
|
270
|
+
super();
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* File type.
|
|
274
|
+
**Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB, BMP, GIF, WEBP, HEIC, EPS, ICNS, IM, PCX, PPM, TIFF, XBM, HEIF, JP2.
|
|
275
|
+
**Supported file sizes**:
|
|
276
|
+
- Max 100 MB for PDF.
|
|
277
|
+
- Max 200 MB for DOC, DOCX, PPT, and PPTX .
|
|
278
|
+
- Max 10 MB for MD, and TXT.
|
|
279
|
+
- Max 20 MB for others.
|
|
280
|
+
* @type {string || null}
|
|
281
|
+
*/
|
|
282
|
+
this.FileType = null;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* File URL. It is recommended to store the file in Tencent Cloud as the URL where the file is stored in Tencent Cloud can ensure higher download speed and stability. External URL may affect the speed and stability. Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749)
|
|
286
|
+
* @type {string || null}
|
|
287
|
+
*/
|
|
288
|
+
this.FileUrl = null;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The base64 value of the file. Supported file types: PNG, JPG, JPEG, PDF, BMP, TIFF. File size limit: the downloaded file does not exceed 8MB after base64 encoding. File download time does not exceed 3 seconds. Supported image pixels: the length of a single side is between 20-10000px. Either FileUrl or FileBase64 of the file must be provided. If both are provided, only the FileUrl is used.
|
|
292
|
+
* @type {string || null}
|
|
293
|
+
*/
|
|
294
|
+
this.FileBase64 = null;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* The starting page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the starting page number for recognition, including the current value.
|
|
298
|
+
* @type {number || null}
|
|
299
|
+
*/
|
|
300
|
+
this.FileStartPageNumber = null;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The end page number of the file. When type of the uploaded file is pdf, doc, ppt, or pptx, it specifies the end page number for recognition, including the current value.
|
|
304
|
+
* @type {number || null}
|
|
305
|
+
*/
|
|
306
|
+
this.FileEndPageNumber = null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Creates task configuration information for document parsing.
|
|
310
|
+
* @type {CreateReconstructDocumentFlowConfig || null}
|
|
311
|
+
*/
|
|
312
|
+
this.Config = null;
|
|
313
|
+
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @private
|
|
318
|
+
*/
|
|
319
|
+
deserialize(params) {
|
|
320
|
+
if (!params) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
this.FileType = 'FileType' in params ? params.FileType : null;
|
|
324
|
+
this.FileUrl = 'FileUrl' in params ? params.FileUrl : null;
|
|
325
|
+
this.FileBase64 = 'FileBase64' in params ? params.FileBase64 : null;
|
|
326
|
+
this.FileStartPageNumber = 'FileStartPageNumber' in params ? params.FileStartPageNumber : null;
|
|
327
|
+
this.FileEndPageNumber = 'FileEndPageNumber' in params ? params.FileEndPageNumber : null;
|
|
328
|
+
|
|
329
|
+
if (params.Config) {
|
|
330
|
+
let obj = new CreateReconstructDocumentFlowConfig();
|
|
331
|
+
obj.deserialize(params.Config)
|
|
332
|
+
this.Config = obj;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The usage of document splitting task.
|
|
340
|
+
* @class
|
|
341
|
+
*/
|
|
342
|
+
class DocumentUsage extends AbstractModel {
|
|
343
|
+
constructor(){
|
|
344
|
+
super();
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Page number of the document splitting task.
|
|
348
|
+
* @type {number || null}
|
|
349
|
+
*/
|
|
350
|
+
this.PageNumber = null;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Total number of tokens consumed by the document splitting task.
|
|
354
|
+
* @type {number || null}
|
|
355
|
+
*/
|
|
356
|
+
this.TotalToken = null;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Total number of tokens consumed by the document splitting task.
|
|
360
|
+
* @type {number || null}
|
|
361
|
+
*/
|
|
362
|
+
this.TotalTokens = null;
|
|
363
|
+
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* @private
|
|
368
|
+
*/
|
|
369
|
+
deserialize(params) {
|
|
370
|
+
if (!params) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
this.PageNumber = 'PageNumber' in params ? params.PageNumber : null;
|
|
374
|
+
this.TotalToken = 'TotalToken' in params ? params.TotalToken : null;
|
|
375
|
+
this.TotalTokens = 'TotalTokens' in params ? params.TotalTokens : null;
|
|
376
|
+
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* RunRerank response structure.
|
|
382
|
+
* @class
|
|
383
|
+
*/
|
|
384
|
+
class RunRerankResponse extends AbstractModel {
|
|
385
|
+
constructor(){
|
|
386
|
+
super();
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Relevance. A higher numeric value indicates greater relevance.
|
|
390
|
+
* @type {Array.<number> || null}
|
|
391
|
+
*/
|
|
392
|
+
this.ScoreList = null;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Consumption. Only returns TotalToken.
|
|
396
|
+
* @type {Usage || null}
|
|
397
|
+
*/
|
|
398
|
+
this.Usage = null;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* 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.
|
|
402
|
+
* @type {string || null}
|
|
403
|
+
*/
|
|
404
|
+
this.RequestId = null;
|
|
405
|
+
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
deserialize(params) {
|
|
412
|
+
if (!params) {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
this.ScoreList = 'ScoreList' in params ? params.ScoreList : null;
|
|
416
|
+
|
|
417
|
+
if (params.Usage) {
|
|
418
|
+
let obj = new Usage();
|
|
419
|
+
obj.deserialize(params.Usage)
|
|
420
|
+
this.Usage = obj;
|
|
421
|
+
}
|
|
422
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
423
|
+
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* CreateReconstructDocumentFlow response structure.
|
|
429
|
+
* @class
|
|
430
|
+
*/
|
|
431
|
+
class CreateReconstructDocumentFlowResponse extends AbstractModel {
|
|
432
|
+
constructor(){
|
|
433
|
+
super();
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Unique task ID. The processing result corresponding to TaskId can be queried through the API [GetReconstructDocumentResult] within 30 days.
|
|
437
|
+
* @type {string || null}
|
|
438
|
+
*/
|
|
439
|
+
this.TaskId = null;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* 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.
|
|
443
|
+
* @type {string || null}
|
|
444
|
+
*/
|
|
445
|
+
this.RequestId = null;
|
|
446
|
+
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* @private
|
|
451
|
+
*/
|
|
452
|
+
deserialize(params) {
|
|
453
|
+
if (!params) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
this.TaskId = 'TaskId' in params ? params.TaskId : null;
|
|
457
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
458
|
+
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* GetReconstructDocumentResult response structure.
|
|
464
|
+
* @class
|
|
465
|
+
*/
|
|
466
|
+
class GetReconstructDocumentResultResponse extends AbstractModel {
|
|
467
|
+
constructor(){
|
|
468
|
+
super();
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Task status.
|
|
472
|
+
-Success: execution completed.
|
|
473
|
+
-Processing: executing.
|
|
474
|
+
-Pause: paused.
|
|
475
|
+
-Failed: execution failed.
|
|
476
|
+
-WaitExecute: pending execution.
|
|
477
|
+
* @type {string || null}
|
|
478
|
+
*/
|
|
479
|
+
this.Status = null;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Temporary download URL for the parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes.
|
|
483
|
+
* @type {string || null}
|
|
484
|
+
*/
|
|
485
|
+
this.DocumentRecognizeResultUrl = null;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Page number where document parsing fails.
|
|
489
|
+
* @type {Array.<ReconstructDocumentFailedPage> || null}
|
|
490
|
+
*/
|
|
491
|
+
this.FailedPages = null;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* 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.
|
|
495
|
+
* @type {string || null}
|
|
496
|
+
*/
|
|
497
|
+
this.RequestId = null;
|
|
498
|
+
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* @private
|
|
503
|
+
*/
|
|
504
|
+
deserialize(params) {
|
|
505
|
+
if (!params) {
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
this.Status = 'Status' in params ? params.Status : null;
|
|
509
|
+
this.DocumentRecognizeResultUrl = 'DocumentRecognizeResultUrl' in params ? params.DocumentRecognizeResultUrl : null;
|
|
510
|
+
|
|
511
|
+
if (params.FailedPages) {
|
|
512
|
+
this.FailedPages = new Array();
|
|
513
|
+
for (let z in params.FailedPages) {
|
|
514
|
+
let obj = new ReconstructDocumentFailedPage();
|
|
515
|
+
obj.deserialize(params.FailedPages[z]);
|
|
516
|
+
this.FailedPages.push(obj);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
520
|
+
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Configuration information for creating intelligent document parsing tasks.
|
|
526
|
+
* @class
|
|
527
|
+
*/
|
|
528
|
+
class CreateReconstructDocumentFlowConfig extends AbstractModel {
|
|
529
|
+
constructor(){
|
|
530
|
+
super();
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* The form in which tables in a Markdown file are returned.
|
|
534
|
+
- 0: returned as MD.
|
|
535
|
+
- 1: returned as HTML.
|
|
536
|
+
The default is 0.
|
|
537
|
+
* @type {string || null}
|
|
538
|
+
*/
|
|
539
|
+
this.TableResultType = null;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* The format of the returned results of intelligent document parsing.
|
|
543
|
+
- 0: only returns full-text MD.
|
|
544
|
+
- 1: only returns the OCR original Json for each page.
|
|
545
|
+
- 2: only returns the MD of each page.
|
|
546
|
+
- 3: returns the full-text MD and the original OCR Json of each page.
|
|
547
|
+
- 4: returns full-text MD and MD of each page.
|
|
548
|
+
The default value is 3 (returns the full-text MD and the original OCR Json of each page).
|
|
549
|
+
* @type {string || null}
|
|
550
|
+
*/
|
|
551
|
+
this.ResultType = null;
|
|
552
|
+
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* @private
|
|
557
|
+
*/
|
|
558
|
+
deserialize(params) {
|
|
559
|
+
if (!params) {
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
this.TableResultType = 'TableResultType' in params ? params.TableResultType : null;
|
|
563
|
+
this.ResultType = 'ResultType' in params ? params.ResultType : null;
|
|
564
|
+
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Configuration information for creating intelligent document splitting task.
|
|
570
|
+
* @class
|
|
571
|
+
*/
|
|
572
|
+
class CreateSplitDocumentFlowConfig extends AbstractModel {
|
|
573
|
+
constructor(){
|
|
574
|
+
super();
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* The form in which tables in a Markdown file are returned.
|
|
578
|
+
- 0: returned as MD.
|
|
579
|
+
- 1: returned as HTML.
|
|
580
|
+
* @type {string || null}
|
|
581
|
+
*/
|
|
582
|
+
this.TableResultType = null;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* The format of the returned results of intelligent document parsing.
|
|
586
|
+
- 0: only returns full-text MD.
|
|
587
|
+
- 1: only returns the OCR original Json for each page.
|
|
588
|
+
- 2: only returns the MD of each page.
|
|
589
|
+
- 3: returns the full-text MD and the original OCR Json of each page.
|
|
590
|
+
- 4: returns full-text MD and MD of each page.
|
|
591
|
+
The default value is 3 (returns the full-text MD and the original OCR Json of each page).
|
|
592
|
+
* @type {string || null}
|
|
593
|
+
*/
|
|
594
|
+
this.ResultType = null;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Whether to enable mllm.
|
|
598
|
+
* @type {boolean || null}
|
|
599
|
+
*/
|
|
600
|
+
this.EnableMllm = null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Max segment length.
|
|
604
|
+
* @type {number || null}
|
|
605
|
+
*/
|
|
606
|
+
this.MaxChunkSize = null;
|
|
607
|
+
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* @private
|
|
612
|
+
*/
|
|
613
|
+
deserialize(params) {
|
|
614
|
+
if (!params) {
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
this.TableResultType = 'TableResultType' in params ? params.TableResultType : null;
|
|
618
|
+
this.ResultType = 'ResultType' in params ? params.ResultType : null;
|
|
619
|
+
this.EnableMllm = 'EnableMllm' in params ? params.EnableMllm : null;
|
|
620
|
+
this.MaxChunkSize = 'MaxChunkSize' in params ? params.MaxChunkSize : null;
|
|
621
|
+
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* GetReconstructDocumentResult request structure.
|
|
627
|
+
* @class
|
|
628
|
+
*/
|
|
629
|
+
class GetReconstructDocumentResultRequest extends AbstractModel {
|
|
630
|
+
constructor(){
|
|
631
|
+
super();
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Parsing task ID.
|
|
635
|
+
* @type {string || null}
|
|
636
|
+
*/
|
|
637
|
+
this.TaskId = null;
|
|
638
|
+
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* @private
|
|
643
|
+
*/
|
|
644
|
+
deserialize(params) {
|
|
645
|
+
if (!params) {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
this.TaskId = 'TaskId' in params ? params.TaskId : null;
|
|
649
|
+
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* GetSplitDocumentResult request structure.
|
|
655
|
+
* @class
|
|
656
|
+
*/
|
|
657
|
+
class GetSplitDocumentResultRequest extends AbstractModel {
|
|
658
|
+
constructor(){
|
|
659
|
+
super();
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Splitting task ID.
|
|
663
|
+
* @type {string || null}
|
|
664
|
+
*/
|
|
665
|
+
this.TaskId = null;
|
|
666
|
+
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* @private
|
|
671
|
+
*/
|
|
672
|
+
deserialize(params) {
|
|
673
|
+
if (!params) {
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
this.TaskId = 'TaskId' in params ? params.TaskId : null;
|
|
677
|
+
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* QueryRewrite response structure.
|
|
683
|
+
* @class
|
|
684
|
+
*/
|
|
685
|
+
class QueryRewriteResponse extends AbstractModel {
|
|
686
|
+
constructor(){
|
|
687
|
+
super();
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Rewritten result.
|
|
691
|
+
* @type {string || null}
|
|
692
|
+
*/
|
|
693
|
+
this.Content = null;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Consumption. The numbers of input tokens, output tokens, and total tokens will be returned.
|
|
697
|
+
* @type {Usage || null}
|
|
698
|
+
*/
|
|
699
|
+
this.Usage = null;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* 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.
|
|
703
|
+
* @type {string || null}
|
|
704
|
+
*/
|
|
705
|
+
this.RequestId = null;
|
|
706
|
+
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* @private
|
|
711
|
+
*/
|
|
712
|
+
deserialize(params) {
|
|
713
|
+
if (!params) {
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
this.Content = 'Content' in params ? params.Content : null;
|
|
717
|
+
|
|
718
|
+
if (params.Usage) {
|
|
719
|
+
let obj = new Usage();
|
|
720
|
+
obj.deserialize(params.Usage)
|
|
721
|
+
this.Usage = obj;
|
|
722
|
+
}
|
|
723
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
724
|
+
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Document parsing failure record.
|
|
730
|
+
* @class
|
|
731
|
+
*/
|
|
732
|
+
class ReconstructDocumentFailedPage extends AbstractModel {
|
|
733
|
+
constructor(){
|
|
734
|
+
super();
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Page number that failed to parse.
|
|
738
|
+
* @type {number || null}
|
|
739
|
+
*/
|
|
740
|
+
this.PageNumber = null;
|
|
741
|
+
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* @private
|
|
746
|
+
*/
|
|
747
|
+
deserialize(params) {
|
|
748
|
+
if (!params) {
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
this.PageNumber = 'PageNumber' in params ? params.PageNumber : null;
|
|
752
|
+
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Session content.
|
|
758
|
+
* @class
|
|
759
|
+
*/
|
|
760
|
+
class Message extends AbstractModel {
|
|
761
|
+
constructor(){
|
|
762
|
+
super();
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Role.
|
|
766
|
+
* @type {string || null}
|
|
767
|
+
*/
|
|
768
|
+
this.Role = null;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Content.
|
|
772
|
+
* @type {string || null}
|
|
773
|
+
*/
|
|
774
|
+
this.Content = null;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Chain of thought content. The ReasoningConent parameter only supports output parameters, and is only returned by the deepseek-r1 model.
|
|
778
|
+
* @type {string || null}
|
|
779
|
+
*/
|
|
780
|
+
this.ReasoningContent = null;
|
|
781
|
+
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* @private
|
|
786
|
+
*/
|
|
787
|
+
deserialize(params) {
|
|
788
|
+
if (!params) {
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
this.Role = 'Role' in params ? params.Role : null;
|
|
792
|
+
this.Content = 'Content' in params ? params.Content : null;
|
|
793
|
+
this.ReasoningContent = 'ReasoningContent' in params ? params.ReasoningContent : null;
|
|
794
|
+
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* GetSplitDocumentResult response structure.
|
|
800
|
+
* @class
|
|
801
|
+
*/
|
|
802
|
+
class GetSplitDocumentResultResponse extends AbstractModel {
|
|
803
|
+
constructor(){
|
|
804
|
+
super();
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Task status:
|
|
808
|
+
-Success: execution completed.
|
|
809
|
+
-Processing: executing.
|
|
810
|
+
-Pause: paused.
|
|
811
|
+
-Failed: execution failed.
|
|
812
|
+
-WaitExecute: pending execution.
|
|
813
|
+
* @type {string || null}
|
|
814
|
+
*/
|
|
815
|
+
this.Status = null;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Temporary download URL for the splitting result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: \*.md, \*.jsonl, \*mllm.json, images.
|
|
819
|
+
>**jsonl** structure description:.
|
|
820
|
+
- page_content: Used to generate an embedding library for retrieval purposes. The images in this field will be replaced with placeholders.
|
|
821
|
+
- org_data: The minimum semantic integrity block corresponding to page_content, used for Q&A model processing.
|
|
822
|
+
- big_data: The maximum semantic integrity block corresponding to page_content, also used for Q&A model processing.
|
|
823
|
+
* @type {string || null}
|
|
824
|
+
*/
|
|
825
|
+
this.DocumentRecognizeResultUrl = null;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Page number where document splitting fails.
|
|
829
|
+
* @type {Array.<SplitDocumentFailedPage> || null}
|
|
830
|
+
*/
|
|
831
|
+
this.FailedPages = null;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Amount of the document split task.
|
|
835
|
+
* @type {DocumentUsage || null}
|
|
836
|
+
*/
|
|
837
|
+
this.Usage = null;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* 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.
|
|
841
|
+
* @type {string || null}
|
|
842
|
+
*/
|
|
843
|
+
this.RequestId = null;
|
|
844
|
+
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* @private
|
|
849
|
+
*/
|
|
850
|
+
deserialize(params) {
|
|
851
|
+
if (!params) {
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
this.Status = 'Status' in params ? params.Status : null;
|
|
855
|
+
this.DocumentRecognizeResultUrl = 'DocumentRecognizeResultUrl' in params ? params.DocumentRecognizeResultUrl : null;
|
|
856
|
+
|
|
857
|
+
if (params.FailedPages) {
|
|
858
|
+
this.FailedPages = new Array();
|
|
859
|
+
for (let z in params.FailedPages) {
|
|
860
|
+
let obj = new SplitDocumentFailedPage();
|
|
861
|
+
obj.deserialize(params.FailedPages[z]);
|
|
862
|
+
this.FailedPages.push(obj);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
if (params.Usage) {
|
|
867
|
+
let obj = new DocumentUsage();
|
|
868
|
+
obj.deserialize(params.Usage)
|
|
869
|
+
this.Usage = obj;
|
|
870
|
+
}
|
|
871
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
872
|
+
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* CreateSplitDocumentFlow response structure.
|
|
878
|
+
* @class
|
|
879
|
+
*/
|
|
880
|
+
class CreateSplitDocumentFlowResponse extends AbstractModel {
|
|
881
|
+
constructor(){
|
|
882
|
+
super();
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* The unique ID of the splitting task.
|
|
886
|
+
The splitting results corresponding to the TaskId can be queried through the [GetSplitDocumentResult] API within 30 days.
|
|
887
|
+
* @type {string || null}
|
|
888
|
+
*/
|
|
889
|
+
this.TaskId = null;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* 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.
|
|
893
|
+
* @type {string || null}
|
|
894
|
+
*/
|
|
895
|
+
this.RequestId = null;
|
|
896
|
+
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @private
|
|
901
|
+
*/
|
|
902
|
+
deserialize(params) {
|
|
903
|
+
if (!params) {
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
this.TaskId = 'TaskId' in params ? params.TaskId : null;
|
|
907
|
+
this.RequestId = 'RequestId' in params ? params.RequestId : null;
|
|
908
|
+
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
module.exports = {
|
|
913
|
+
CreateSplitDocumentFlowRequest: CreateSplitDocumentFlowRequest,
|
|
914
|
+
QueryRewriteRequest: QueryRewriteRequest,
|
|
915
|
+
SplitDocumentFailedPage: SplitDocumentFailedPage,
|
|
916
|
+
Usage: Usage,
|
|
917
|
+
RunRerankRequest: RunRerankRequest,
|
|
918
|
+
CreateReconstructDocumentFlowRequest: CreateReconstructDocumentFlowRequest,
|
|
919
|
+
DocumentUsage: DocumentUsage,
|
|
920
|
+
RunRerankResponse: RunRerankResponse,
|
|
921
|
+
CreateReconstructDocumentFlowResponse: CreateReconstructDocumentFlowResponse,
|
|
922
|
+
GetReconstructDocumentResultResponse: GetReconstructDocumentResultResponse,
|
|
923
|
+
CreateReconstructDocumentFlowConfig: CreateReconstructDocumentFlowConfig,
|
|
924
|
+
CreateSplitDocumentFlowConfig: CreateSplitDocumentFlowConfig,
|
|
925
|
+
GetReconstructDocumentResultRequest: GetReconstructDocumentResultRequest,
|
|
926
|
+
GetSplitDocumentResultRequest: GetSplitDocumentResultRequest,
|
|
927
|
+
QueryRewriteResponse: QueryRewriteResponse,
|
|
928
|
+
ReconstructDocumentFailedPage: ReconstructDocumentFailedPage,
|
|
929
|
+
Message: Message,
|
|
930
|
+
GetSplitDocumentResultResponse: GetSplitDocumentResultResponse,
|
|
931
|
+
CreateSplitDocumentFlowResponse: CreateSplitDocumentFlowResponse,
|
|
932
|
+
|
|
933
|
+
}
|
|
@@ -794,7 +794,7 @@ The invoice/ticket subtype (SubType), subtype description (TypeDescription), and
|
|
|
794
794
|
|
|
795
795
|
/**
|
|
796
796
|
* This interface supports the identification of all fields on the front and back of the second-generation ID card for mainland Chinese residents.Including name, gender, ethnicity, date of birth, address, citizen ID number, issuing authority, and validity period, the identification accuracy reaches more than 99%.In addition, this interface also supports a variety of value-added capabilities to meet the needs of different scenarios. Such as the cropping function of ID card photos and portrait photos, and also has 5 alarm functions.
|
|
797
|
-
As shown in the table below. <table style="width:650px"> <thead> <tr> <th width="150">Value-added ability</th> <th width="500">Ability items</th> </tr> </thead> <tbody> <tr> <td rowspan="9">Alarm function</td> </tr> <tr> <td>ID card
|
|
797
|
+
As shown in the table below. <table style="width:650px"> <thead> <tr> <th width="150">Value-added ability</th> <th width="500">Ability items</th> </tr> </thead> <tbody> <tr> <td rowspan="9">Alarm function</td> </tr> <tr> <td>ID card photocopy warning</td> </tr> <tr> <td>ID card on-screen display warning</td> </tr> <tr> <td>Alarm for occlusion in the ID card frame</td> </tr> <tr> <td>ID card reflective warning</td> </tr> <tr> <td>Blurry picture warning</td> </tr> </tbody> </table> Default interface request frequency limit: 20 times/second
|
|
798
798
|
* @param {RecognizeMainlandIDCardOCRRequest} req
|
|
799
799
|
* @param {function(string, RecognizeMainlandIDCardOCRResponse):void} cb
|
|
800
800
|
* @public
|