tencentcloud-sdk-python-intl-en 3.0.1270__py2.py3-none-any.whl → 3.0.1272__py2.py3-none-any.whl

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,1361 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2025 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, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ import warnings
17
+
18
+ from tencentcloud.common.abstract_model import AbstractModel
19
+
20
+
21
+ class CreateReconstructDocumentFlowConfig(AbstractModel):
22
+ """Configuration information for creating intelligent document parsing tasks.
23
+
24
+ """
25
+
26
+ def __init__(self):
27
+ r"""
28
+ :param _TableResultType: The form in which tables in a Markdown file are returned.
29
+ - 0: returned as MD.
30
+ - 1: returned as HTML.
31
+ The default is 0.
32
+ :type TableResultType: str
33
+ :param _ResultType: The format of the returned results of intelligent document parsing.
34
+ - 0: only returns full-text MD.
35
+ - 1: only returns the OCR original Json for each page.
36
+ - 2: only returns the MD of each page.
37
+ - 3: returns the full-text MD and the original OCR Json of each page.
38
+ - 4: returns full-text MD and MD of each page.
39
+ The default value is 3 (returns the full-text MD and the original OCR Json of each page).
40
+ :type ResultType: str
41
+ """
42
+ self._TableResultType = None
43
+ self._ResultType = None
44
+
45
+ @property
46
+ def TableResultType(self):
47
+ """The form in which tables in a Markdown file are returned.
48
+ - 0: returned as MD.
49
+ - 1: returned as HTML.
50
+ The default is 0.
51
+ :rtype: str
52
+ """
53
+ return self._TableResultType
54
+
55
+ @TableResultType.setter
56
+ def TableResultType(self, TableResultType):
57
+ self._TableResultType = TableResultType
58
+
59
+ @property
60
+ def ResultType(self):
61
+ """The format of the returned results of intelligent document parsing.
62
+ - 0: only returns full-text MD.
63
+ - 1: only returns the OCR original Json for each page.
64
+ - 2: only returns the MD of each page.
65
+ - 3: returns the full-text MD and the original OCR Json of each page.
66
+ - 4: returns full-text MD and MD of each page.
67
+ The default value is 3 (returns the full-text MD and the original OCR Json of each page).
68
+ :rtype: str
69
+ """
70
+ return self._ResultType
71
+
72
+ @ResultType.setter
73
+ def ResultType(self, ResultType):
74
+ self._ResultType = ResultType
75
+
76
+
77
+ def _deserialize(self, params):
78
+ self._TableResultType = params.get("TableResultType")
79
+ self._ResultType = params.get("ResultType")
80
+ memeber_set = set(params.keys())
81
+ for name, value in vars(self).items():
82
+ property_name = name[1:]
83
+ if property_name in memeber_set:
84
+ memeber_set.remove(property_name)
85
+ if len(memeber_set) > 0:
86
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
87
+
88
+
89
+
90
+ class CreateReconstructDocumentFlowRequest(AbstractModel):
91
+ """CreateReconstructDocumentFlow request structure.
92
+
93
+ """
94
+
95
+ def __init__(self):
96
+ r"""
97
+ :param _FileType: File type.
98
+ **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.
99
+ **Supported file sizes**:
100
+ - Max 100 MB for PDF.
101
+ - Max 200 MB for DOC, DOCX, PPT, and PPTX .
102
+ - Max 10 MB for MD, and TXT.
103
+ - Max 20 MB for others.
104
+ :type FileType: str
105
+ :param _FileUrl: 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)
106
+ :type FileUrl: str
107
+ :param _FileBase64: 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.
108
+ :type FileBase64: str
109
+ :param _FileStartPageNumber: 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.
110
+ :type FileStartPageNumber: int
111
+ :param _FileEndPageNumber: 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.
112
+ :type FileEndPageNumber: int
113
+ :param _Config: Creates task configuration information for document parsing.
114
+ :type Config: :class:`tencentcloud.lkeap.v20240522.models.CreateReconstructDocumentFlowConfig`
115
+ """
116
+ self._FileType = None
117
+ self._FileUrl = None
118
+ self._FileBase64 = None
119
+ self._FileStartPageNumber = None
120
+ self._FileEndPageNumber = None
121
+ self._Config = None
122
+
123
+ @property
124
+ def FileType(self):
125
+ """File type.
126
+ **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.
127
+ **Supported file sizes**:
128
+ - Max 100 MB for PDF.
129
+ - Max 200 MB for DOC, DOCX, PPT, and PPTX .
130
+ - Max 10 MB for MD, and TXT.
131
+ - Max 20 MB for others.
132
+ :rtype: str
133
+ """
134
+ return self._FileType
135
+
136
+ @FileType.setter
137
+ def FileType(self, FileType):
138
+ self._FileType = FileType
139
+
140
+ @property
141
+ def FileUrl(self):
142
+ """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)
143
+ :rtype: str
144
+ """
145
+ return self._FileUrl
146
+
147
+ @FileUrl.setter
148
+ def FileUrl(self, FileUrl):
149
+ self._FileUrl = FileUrl
150
+
151
+ @property
152
+ def FileBase64(self):
153
+ """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.
154
+ :rtype: str
155
+ """
156
+ return self._FileBase64
157
+
158
+ @FileBase64.setter
159
+ def FileBase64(self, FileBase64):
160
+ self._FileBase64 = FileBase64
161
+
162
+ @property
163
+ def FileStartPageNumber(self):
164
+ """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.
165
+ :rtype: int
166
+ """
167
+ return self._FileStartPageNumber
168
+
169
+ @FileStartPageNumber.setter
170
+ def FileStartPageNumber(self, FileStartPageNumber):
171
+ self._FileStartPageNumber = FileStartPageNumber
172
+
173
+ @property
174
+ def FileEndPageNumber(self):
175
+ """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.
176
+ :rtype: int
177
+ """
178
+ return self._FileEndPageNumber
179
+
180
+ @FileEndPageNumber.setter
181
+ def FileEndPageNumber(self, FileEndPageNumber):
182
+ self._FileEndPageNumber = FileEndPageNumber
183
+
184
+ @property
185
+ def Config(self):
186
+ """Creates task configuration information for document parsing.
187
+ :rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateReconstructDocumentFlowConfig`
188
+ """
189
+ return self._Config
190
+
191
+ @Config.setter
192
+ def Config(self, Config):
193
+ self._Config = Config
194
+
195
+
196
+ def _deserialize(self, params):
197
+ self._FileType = params.get("FileType")
198
+ self._FileUrl = params.get("FileUrl")
199
+ self._FileBase64 = params.get("FileBase64")
200
+ self._FileStartPageNumber = params.get("FileStartPageNumber")
201
+ self._FileEndPageNumber = params.get("FileEndPageNumber")
202
+ if params.get("Config") is not None:
203
+ self._Config = CreateReconstructDocumentFlowConfig()
204
+ self._Config._deserialize(params.get("Config"))
205
+ memeber_set = set(params.keys())
206
+ for name, value in vars(self).items():
207
+ property_name = name[1:]
208
+ if property_name in memeber_set:
209
+ memeber_set.remove(property_name)
210
+ if len(memeber_set) > 0:
211
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
212
+
213
+
214
+
215
+ class CreateReconstructDocumentFlowResponse(AbstractModel):
216
+ """CreateReconstructDocumentFlow response structure.
217
+
218
+ """
219
+
220
+ def __init__(self):
221
+ r"""
222
+ :param _TaskId: Unique task ID. The processing result corresponding to TaskId can be queried through the API [GetReconstructDocumentResult] within 30 days.
223
+ :type TaskId: str
224
+ :param _RequestId: 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.
225
+ :type RequestId: str
226
+ """
227
+ self._TaskId = None
228
+ self._RequestId = None
229
+
230
+ @property
231
+ def TaskId(self):
232
+ """Unique task ID. The processing result corresponding to TaskId can be queried through the API [GetReconstructDocumentResult] within 30 days.
233
+ :rtype: str
234
+ """
235
+ return self._TaskId
236
+
237
+ @TaskId.setter
238
+ def TaskId(self, TaskId):
239
+ self._TaskId = TaskId
240
+
241
+ @property
242
+ def RequestId(self):
243
+ """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.
244
+ :rtype: str
245
+ """
246
+ return self._RequestId
247
+
248
+ @RequestId.setter
249
+ def RequestId(self, RequestId):
250
+ self._RequestId = RequestId
251
+
252
+
253
+ def _deserialize(self, params):
254
+ self._TaskId = params.get("TaskId")
255
+ self._RequestId = params.get("RequestId")
256
+
257
+
258
+ class CreateSplitDocumentFlowConfig(AbstractModel):
259
+ """Configuration information for creating intelligent document splitting task.
260
+
261
+ """
262
+
263
+ def __init__(self):
264
+ r"""
265
+ :param _TableResultType: The form in which tables in a Markdown file are returned.
266
+ - 0: returned as MD.
267
+ - 1: returned as HTML.
268
+ :type TableResultType: str
269
+ :param _ResultType: The format of the returned results of intelligent document parsing.
270
+ - 0: only returns full-text MD.
271
+ - 1: only returns the OCR original Json for each page.
272
+ - 2: only returns the MD of each page.
273
+ - 3: returns the full-text MD and the original OCR Json of each page.
274
+ - 4: returns full-text MD and MD of each page.
275
+ The default value is 3 (returns the full-text MD and the original OCR Json of each page).
276
+ :type ResultType: str
277
+ :param _EnableMllm: Whether to enable mllm.
278
+ :type EnableMllm: bool
279
+ :param _MaxChunkSize: Max segment length.
280
+ :type MaxChunkSize: int
281
+ """
282
+ self._TableResultType = None
283
+ self._ResultType = None
284
+ self._EnableMllm = None
285
+ self._MaxChunkSize = None
286
+
287
+ @property
288
+ def TableResultType(self):
289
+ warnings.warn("parameter `TableResultType` is deprecated", DeprecationWarning)
290
+
291
+ """The form in which tables in a Markdown file are returned.
292
+ - 0: returned as MD.
293
+ - 1: returned as HTML.
294
+ :rtype: str
295
+ """
296
+ return self._TableResultType
297
+
298
+ @TableResultType.setter
299
+ def TableResultType(self, TableResultType):
300
+ warnings.warn("parameter `TableResultType` is deprecated", DeprecationWarning)
301
+
302
+ self._TableResultType = TableResultType
303
+
304
+ @property
305
+ def ResultType(self):
306
+ warnings.warn("parameter `ResultType` is deprecated", DeprecationWarning)
307
+
308
+ """The format of the returned results of intelligent document parsing.
309
+ - 0: only returns full-text MD.
310
+ - 1: only returns the OCR original Json for each page.
311
+ - 2: only returns the MD of each page.
312
+ - 3: returns the full-text MD and the original OCR Json of each page.
313
+ - 4: returns full-text MD and MD of each page.
314
+ The default value is 3 (returns the full-text MD and the original OCR Json of each page).
315
+ :rtype: str
316
+ """
317
+ return self._ResultType
318
+
319
+ @ResultType.setter
320
+ def ResultType(self, ResultType):
321
+ warnings.warn("parameter `ResultType` is deprecated", DeprecationWarning)
322
+
323
+ self._ResultType = ResultType
324
+
325
+ @property
326
+ def EnableMllm(self):
327
+ """Whether to enable mllm.
328
+ :rtype: bool
329
+ """
330
+ return self._EnableMllm
331
+
332
+ @EnableMllm.setter
333
+ def EnableMllm(self, EnableMllm):
334
+ self._EnableMllm = EnableMllm
335
+
336
+ @property
337
+ def MaxChunkSize(self):
338
+ """Max segment length.
339
+ :rtype: int
340
+ """
341
+ return self._MaxChunkSize
342
+
343
+ @MaxChunkSize.setter
344
+ def MaxChunkSize(self, MaxChunkSize):
345
+ self._MaxChunkSize = MaxChunkSize
346
+
347
+
348
+ def _deserialize(self, params):
349
+ self._TableResultType = params.get("TableResultType")
350
+ self._ResultType = params.get("ResultType")
351
+ self._EnableMllm = params.get("EnableMllm")
352
+ self._MaxChunkSize = params.get("MaxChunkSize")
353
+ memeber_set = set(params.keys())
354
+ for name, value in vars(self).items():
355
+ property_name = name[1:]
356
+ if property_name in memeber_set:
357
+ memeber_set.remove(property_name)
358
+ if len(memeber_set) > 0:
359
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
360
+
361
+
362
+
363
+ class CreateSplitDocumentFlowRequest(AbstractModel):
364
+ """CreateSplitDocumentFlow request structure.
365
+
366
+ """
367
+
368
+ def __init__(self):
369
+ r"""
370
+ :param _FileType: File type.
371
+ **Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB.
372
+ **Supported file sizes**:
373
+ - Max 500 MB for PDF.
374
+ - Max 200 MB for DOC, DOCX, PPT, and PPTX .
375
+ - Max 10 MB for MD, and TXT.
376
+ - Max 20 MB for others.
377
+ :type FileType: str
378
+ :param _FileUrl: 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.
379
+ Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749).
380
+ :type FileUrl: str
381
+ :param _FileName: Filename. optional.
382
+ **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".
383
+ :type FileName: str
384
+ :param _FileBase64: 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.
385
+ :type FileBase64: str
386
+ :param _FileStartPageNumber: 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.
387
+ :type FileStartPageNumber: int
388
+ :param _FileEndPageNumber: 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.
389
+ :type FileEndPageNumber: int
390
+ :param _Config: Configuration message for document splitting task.
391
+ :type Config: :class:`tencentcloud.lkeap.v20240522.models.CreateSplitDocumentFlowConfig`
392
+ """
393
+ self._FileType = None
394
+ self._FileUrl = None
395
+ self._FileName = None
396
+ self._FileBase64 = None
397
+ self._FileStartPageNumber = None
398
+ self._FileEndPageNumber = None
399
+ self._Config = None
400
+
401
+ @property
402
+ def FileType(self):
403
+ """File type.
404
+ **Supported file types**: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MD, TXT, PNG, JPG, JPEG, CSV, HTML, EPUB.
405
+ **Supported file sizes**:
406
+ - Max 500 MB for PDF.
407
+ - Max 200 MB for DOC, DOCX, PPT, and PPTX .
408
+ - Max 10 MB for MD, and TXT.
409
+ - Max 20 MB for others.
410
+ :rtype: str
411
+ """
412
+ return self._FileType
413
+
414
+ @FileType.setter
415
+ def FileType(self, FileType):
416
+ self._FileType = FileType
417
+
418
+ @property
419
+ def FileUrl(self):
420
+ """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.
421
+ Refer to: [Tencent Cloud COS Documentation](https://cloud.tencent.com/document/product/436/7749).
422
+ :rtype: str
423
+ """
424
+ return self._FileUrl
425
+
426
+ @FileUrl.setter
427
+ def FileUrl(self, FileUrl):
428
+ self._FileUrl = FileUrl
429
+
430
+ @property
431
+ def FileName(self):
432
+ """Filename. optional.
433
+ **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".
434
+ :rtype: str
435
+ """
436
+ return self._FileName
437
+
438
+ @FileName.setter
439
+ def FileName(self, FileName):
440
+ self._FileName = FileName
441
+
442
+ @property
443
+ def FileBase64(self):
444
+ warnings.warn("parameter `FileBase64` is deprecated", DeprecationWarning)
445
+
446
+ """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.
447
+ :rtype: str
448
+ """
449
+ return self._FileBase64
450
+
451
+ @FileBase64.setter
452
+ def FileBase64(self, FileBase64):
453
+ warnings.warn("parameter `FileBase64` is deprecated", DeprecationWarning)
454
+
455
+ self._FileBase64 = FileBase64
456
+
457
+ @property
458
+ def FileStartPageNumber(self):
459
+ """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.
460
+ :rtype: int
461
+ """
462
+ return self._FileStartPageNumber
463
+
464
+ @FileStartPageNumber.setter
465
+ def FileStartPageNumber(self, FileStartPageNumber):
466
+ self._FileStartPageNumber = FileStartPageNumber
467
+
468
+ @property
469
+ def FileEndPageNumber(self):
470
+ """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.
471
+ :rtype: int
472
+ """
473
+ return self._FileEndPageNumber
474
+
475
+ @FileEndPageNumber.setter
476
+ def FileEndPageNumber(self, FileEndPageNumber):
477
+ self._FileEndPageNumber = FileEndPageNumber
478
+
479
+ @property
480
+ def Config(self):
481
+ """Configuration message for document splitting task.
482
+ :rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateSplitDocumentFlowConfig`
483
+ """
484
+ return self._Config
485
+
486
+ @Config.setter
487
+ def Config(self, Config):
488
+ self._Config = Config
489
+
490
+
491
+ def _deserialize(self, params):
492
+ self._FileType = params.get("FileType")
493
+ self._FileUrl = params.get("FileUrl")
494
+ self._FileName = params.get("FileName")
495
+ self._FileBase64 = params.get("FileBase64")
496
+ self._FileStartPageNumber = params.get("FileStartPageNumber")
497
+ self._FileEndPageNumber = params.get("FileEndPageNumber")
498
+ if params.get("Config") is not None:
499
+ self._Config = CreateSplitDocumentFlowConfig()
500
+ self._Config._deserialize(params.get("Config"))
501
+ memeber_set = set(params.keys())
502
+ for name, value in vars(self).items():
503
+ property_name = name[1:]
504
+ if property_name in memeber_set:
505
+ memeber_set.remove(property_name)
506
+ if len(memeber_set) > 0:
507
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
508
+
509
+
510
+
511
+ class CreateSplitDocumentFlowResponse(AbstractModel):
512
+ """CreateSplitDocumentFlow response structure.
513
+
514
+ """
515
+
516
+ def __init__(self):
517
+ r"""
518
+ :param _TaskId: The unique ID of the splitting task.
519
+ The splitting results corresponding to the TaskId can be queried through the [GetSplitDocumentResult] API within 30 days.
520
+ :type TaskId: str
521
+ :param _RequestId: 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.
522
+ :type RequestId: str
523
+ """
524
+ self._TaskId = None
525
+ self._RequestId = None
526
+
527
+ @property
528
+ def TaskId(self):
529
+ """The unique ID of the splitting task.
530
+ The splitting results corresponding to the TaskId can be queried through the [GetSplitDocumentResult] API within 30 days.
531
+ :rtype: str
532
+ """
533
+ return self._TaskId
534
+
535
+ @TaskId.setter
536
+ def TaskId(self, TaskId):
537
+ self._TaskId = TaskId
538
+
539
+ @property
540
+ def RequestId(self):
541
+ """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.
542
+ :rtype: str
543
+ """
544
+ return self._RequestId
545
+
546
+ @RequestId.setter
547
+ def RequestId(self, RequestId):
548
+ self._RequestId = RequestId
549
+
550
+
551
+ def _deserialize(self, params):
552
+ self._TaskId = params.get("TaskId")
553
+ self._RequestId = params.get("RequestId")
554
+
555
+
556
+ class DocumentUsage(AbstractModel):
557
+ """The usage of document splitting task.
558
+
559
+ """
560
+
561
+ def __init__(self):
562
+ r"""
563
+ :param _PageNumber: Page number of the document splitting task.
564
+ :type PageNumber: int
565
+ :param _TotalToken: Total number of tokens consumed by the document splitting task.
566
+ :type TotalToken: int
567
+ :param _TotalTokens: Total number of tokens consumed by the document splitting task.
568
+ :type TotalTokens: int
569
+ """
570
+ self._PageNumber = None
571
+ self._TotalToken = None
572
+ self._TotalTokens = None
573
+
574
+ @property
575
+ def PageNumber(self):
576
+ """Page number of the document splitting task.
577
+ :rtype: int
578
+ """
579
+ return self._PageNumber
580
+
581
+ @PageNumber.setter
582
+ def PageNumber(self, PageNumber):
583
+ self._PageNumber = PageNumber
584
+
585
+ @property
586
+ def TotalToken(self):
587
+ warnings.warn("parameter `TotalToken` is deprecated", DeprecationWarning)
588
+
589
+ """Total number of tokens consumed by the document splitting task.
590
+ :rtype: int
591
+ """
592
+ return self._TotalToken
593
+
594
+ @TotalToken.setter
595
+ def TotalToken(self, TotalToken):
596
+ warnings.warn("parameter `TotalToken` is deprecated", DeprecationWarning)
597
+
598
+ self._TotalToken = TotalToken
599
+
600
+ @property
601
+ def TotalTokens(self):
602
+ """Total number of tokens consumed by the document splitting task.
603
+ :rtype: int
604
+ """
605
+ return self._TotalTokens
606
+
607
+ @TotalTokens.setter
608
+ def TotalTokens(self, TotalTokens):
609
+ self._TotalTokens = TotalTokens
610
+
611
+
612
+ def _deserialize(self, params):
613
+ self._PageNumber = params.get("PageNumber")
614
+ self._TotalToken = params.get("TotalToken")
615
+ self._TotalTokens = params.get("TotalTokens")
616
+ memeber_set = set(params.keys())
617
+ for name, value in vars(self).items():
618
+ property_name = name[1:]
619
+ if property_name in memeber_set:
620
+ memeber_set.remove(property_name)
621
+ if len(memeber_set) > 0:
622
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
623
+
624
+
625
+
626
+ class GetReconstructDocumentResultRequest(AbstractModel):
627
+ """GetReconstructDocumentResult request structure.
628
+
629
+ """
630
+
631
+ def __init__(self):
632
+ r"""
633
+ :param _TaskId: Parsing task ID.
634
+ :type TaskId: str
635
+ """
636
+ self._TaskId = None
637
+
638
+ @property
639
+ def TaskId(self):
640
+ """Parsing task ID.
641
+ :rtype: str
642
+ """
643
+ return self._TaskId
644
+
645
+ @TaskId.setter
646
+ def TaskId(self, TaskId):
647
+ self._TaskId = TaskId
648
+
649
+
650
+ def _deserialize(self, params):
651
+ self._TaskId = params.get("TaskId")
652
+ memeber_set = set(params.keys())
653
+ for name, value in vars(self).items():
654
+ property_name = name[1:]
655
+ if property_name in memeber_set:
656
+ memeber_set.remove(property_name)
657
+ if len(memeber_set) > 0:
658
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
659
+
660
+
661
+
662
+ class GetReconstructDocumentResultResponse(AbstractModel):
663
+ """GetReconstructDocumentResult response structure.
664
+
665
+ """
666
+
667
+ def __init__(self):
668
+ r"""
669
+ :param _Status: Task status.
670
+ -Success: execution completed.
671
+ -Processing: executing.
672
+ -Pause: paused.
673
+ -Failed: execution failed.
674
+ -WaitExecute: pending execution.
675
+ :type Status: str
676
+ :param _DocumentRecognizeResultUrl: Temporary download URL for the parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes.
677
+ :type DocumentRecognizeResultUrl: str
678
+ :param _FailedPages: Page number where document parsing fails.
679
+ :type FailedPages: list of ReconstructDocumentFailedPage
680
+ :param _RequestId: 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.
681
+ :type RequestId: str
682
+ """
683
+ self._Status = None
684
+ self._DocumentRecognizeResultUrl = None
685
+ self._FailedPages = None
686
+ self._RequestId = None
687
+
688
+ @property
689
+ def Status(self):
690
+ """Task status.
691
+ -Success: execution completed.
692
+ -Processing: executing.
693
+ -Pause: paused.
694
+ -Failed: execution failed.
695
+ -WaitExecute: pending execution.
696
+ :rtype: str
697
+ """
698
+ return self._Status
699
+
700
+ @Status.setter
701
+ def Status(self, Status):
702
+ self._Status = Status
703
+
704
+ @property
705
+ def DocumentRecognizeResultUrl(self):
706
+ """Temporary download URL for the parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes.
707
+ :rtype: str
708
+ """
709
+ return self._DocumentRecognizeResultUrl
710
+
711
+ @DocumentRecognizeResultUrl.setter
712
+ def DocumentRecognizeResultUrl(self, DocumentRecognizeResultUrl):
713
+ self._DocumentRecognizeResultUrl = DocumentRecognizeResultUrl
714
+
715
+ @property
716
+ def FailedPages(self):
717
+ """Page number where document parsing fails.
718
+ :rtype: list of ReconstructDocumentFailedPage
719
+ """
720
+ return self._FailedPages
721
+
722
+ @FailedPages.setter
723
+ def FailedPages(self, FailedPages):
724
+ self._FailedPages = FailedPages
725
+
726
+ @property
727
+ def RequestId(self):
728
+ """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.
729
+ :rtype: str
730
+ """
731
+ return self._RequestId
732
+
733
+ @RequestId.setter
734
+ def RequestId(self, RequestId):
735
+ self._RequestId = RequestId
736
+
737
+
738
+ def _deserialize(self, params):
739
+ self._Status = params.get("Status")
740
+ self._DocumentRecognizeResultUrl = params.get("DocumentRecognizeResultUrl")
741
+ if params.get("FailedPages") is not None:
742
+ self._FailedPages = []
743
+ for item in params.get("FailedPages"):
744
+ obj = ReconstructDocumentFailedPage()
745
+ obj._deserialize(item)
746
+ self._FailedPages.append(obj)
747
+ self._RequestId = params.get("RequestId")
748
+
749
+
750
+ class GetSplitDocumentResultRequest(AbstractModel):
751
+ """GetSplitDocumentResult request structure.
752
+
753
+ """
754
+
755
+ def __init__(self):
756
+ r"""
757
+ :param _TaskId: Splitting task ID.
758
+ :type TaskId: str
759
+ """
760
+ self._TaskId = None
761
+
762
+ @property
763
+ def TaskId(self):
764
+ """Splitting task ID.
765
+ :rtype: str
766
+ """
767
+ return self._TaskId
768
+
769
+ @TaskId.setter
770
+ def TaskId(self, TaskId):
771
+ self._TaskId = TaskId
772
+
773
+
774
+ def _deserialize(self, params):
775
+ self._TaskId = params.get("TaskId")
776
+ memeber_set = set(params.keys())
777
+ for name, value in vars(self).items():
778
+ property_name = name[1:]
779
+ if property_name in memeber_set:
780
+ memeber_set.remove(property_name)
781
+ if len(memeber_set) > 0:
782
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
783
+
784
+
785
+
786
+ class GetSplitDocumentResultResponse(AbstractModel):
787
+ """GetSplitDocumentResult response structure.
788
+
789
+ """
790
+
791
+ def __init__(self):
792
+ r"""
793
+ :param _Status: Task status:
794
+ -Success: execution completed.
795
+ -Processing: executing.
796
+ -Pause: paused.
797
+ -Failed: execution failed.
798
+ -WaitExecute: pending execution.
799
+ :type Status: str
800
+ :param _DocumentRecognizeResultUrl: 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.
801
+ >**jsonl** structure description:.
802
+ - page_content: Used to generate an embedding library for retrieval purposes. The images in this field will be replaced with placeholders.
803
+ - org_data: The minimum semantic integrity block corresponding to page_content, used for Q&A model processing.
804
+ - big_data: The maximum semantic integrity block corresponding to page_content, also used for Q&A model processing.
805
+ :type DocumentRecognizeResultUrl: str
806
+ :param _FailedPages: Page number where document splitting fails.
807
+ :type FailedPages: list of SplitDocumentFailedPage
808
+ :param _Usage: Amount of the document split task.
809
+ :type Usage: :class:`tencentcloud.lkeap.v20240522.models.DocumentUsage`
810
+ :param _RequestId: 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.
811
+ :type RequestId: str
812
+ """
813
+ self._Status = None
814
+ self._DocumentRecognizeResultUrl = None
815
+ self._FailedPages = None
816
+ self._Usage = None
817
+ self._RequestId = None
818
+
819
+ @property
820
+ def Status(self):
821
+ """Task status:
822
+ -Success: execution completed.
823
+ -Processing: executing.
824
+ -Pause: paused.
825
+ -Failed: execution failed.
826
+ -WaitExecute: pending execution.
827
+ :rtype: str
828
+ """
829
+ return self._Status
830
+
831
+ @Status.setter
832
+ def Status(self, Status):
833
+ self._Status = Status
834
+
835
+ @property
836
+ def DocumentRecognizeResultUrl(self):
837
+ """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.
838
+ >**jsonl** structure description:.
839
+ - page_content: Used to generate an embedding library for retrieval purposes. The images in this field will be replaced with placeholders.
840
+ - org_data: The minimum semantic integrity block corresponding to page_content, used for Q&A model processing.
841
+ - big_data: The maximum semantic integrity block corresponding to page_content, also used for Q&A model processing.
842
+ :rtype: str
843
+ """
844
+ return self._DocumentRecognizeResultUrl
845
+
846
+ @DocumentRecognizeResultUrl.setter
847
+ def DocumentRecognizeResultUrl(self, DocumentRecognizeResultUrl):
848
+ self._DocumentRecognizeResultUrl = DocumentRecognizeResultUrl
849
+
850
+ @property
851
+ def FailedPages(self):
852
+ warnings.warn("parameter `FailedPages` is deprecated", DeprecationWarning)
853
+
854
+ """Page number where document splitting fails.
855
+ :rtype: list of SplitDocumentFailedPage
856
+ """
857
+ return self._FailedPages
858
+
859
+ @FailedPages.setter
860
+ def FailedPages(self, FailedPages):
861
+ warnings.warn("parameter `FailedPages` is deprecated", DeprecationWarning)
862
+
863
+ self._FailedPages = FailedPages
864
+
865
+ @property
866
+ def Usage(self):
867
+ """Amount of the document split task.
868
+ :rtype: :class:`tencentcloud.lkeap.v20240522.models.DocumentUsage`
869
+ """
870
+ return self._Usage
871
+
872
+ @Usage.setter
873
+ def Usage(self, Usage):
874
+ self._Usage = Usage
875
+
876
+ @property
877
+ def RequestId(self):
878
+ """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.
879
+ :rtype: str
880
+ """
881
+ return self._RequestId
882
+
883
+ @RequestId.setter
884
+ def RequestId(self, RequestId):
885
+ self._RequestId = RequestId
886
+
887
+
888
+ def _deserialize(self, params):
889
+ self._Status = params.get("Status")
890
+ self._DocumentRecognizeResultUrl = params.get("DocumentRecognizeResultUrl")
891
+ if params.get("FailedPages") is not None:
892
+ self._FailedPages = []
893
+ for item in params.get("FailedPages"):
894
+ obj = SplitDocumentFailedPage()
895
+ obj._deserialize(item)
896
+ self._FailedPages.append(obj)
897
+ if params.get("Usage") is not None:
898
+ self._Usage = DocumentUsage()
899
+ self._Usage._deserialize(params.get("Usage"))
900
+ self._RequestId = params.get("RequestId")
901
+
902
+
903
+ class Message(AbstractModel):
904
+ """Session content.
905
+
906
+ """
907
+
908
+ def __init__(self):
909
+ r"""
910
+ :param _Role: Role.
911
+ :type Role: str
912
+ :param _Content: Content.
913
+ :type Content: str
914
+ :param _ReasoningContent: Chain of thought content. The ReasoningConent parameter only supports output parameters, and is only returned by the deepseek-r1 model.
915
+ :type ReasoningContent: str
916
+ """
917
+ self._Role = None
918
+ self._Content = None
919
+ self._ReasoningContent = None
920
+
921
+ @property
922
+ def Role(self):
923
+ """Role.
924
+ :rtype: str
925
+ """
926
+ return self._Role
927
+
928
+ @Role.setter
929
+ def Role(self, Role):
930
+ self._Role = Role
931
+
932
+ @property
933
+ def Content(self):
934
+ """Content.
935
+ :rtype: str
936
+ """
937
+ return self._Content
938
+
939
+ @Content.setter
940
+ def Content(self, Content):
941
+ self._Content = Content
942
+
943
+ @property
944
+ def ReasoningContent(self):
945
+ """Chain of thought content. The ReasoningConent parameter only supports output parameters, and is only returned by the deepseek-r1 model.
946
+ :rtype: str
947
+ """
948
+ return self._ReasoningContent
949
+
950
+ @ReasoningContent.setter
951
+ def ReasoningContent(self, ReasoningContent):
952
+ self._ReasoningContent = ReasoningContent
953
+
954
+
955
+ def _deserialize(self, params):
956
+ self._Role = params.get("Role")
957
+ self._Content = params.get("Content")
958
+ self._ReasoningContent = params.get("ReasoningContent")
959
+ memeber_set = set(params.keys())
960
+ for name, value in vars(self).items():
961
+ property_name = name[1:]
962
+ if property_name in memeber_set:
963
+ memeber_set.remove(property_name)
964
+ if len(memeber_set) > 0:
965
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
966
+
967
+
968
+
969
+ class QueryRewriteRequest(AbstractModel):
970
+ """QueryRewrite request structure.
971
+
972
+ """
973
+
974
+ def __init__(self):
975
+ r"""
976
+ :param _Messages: 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.
977
+ :type Messages: list of Message
978
+ :param _Model: Model name.
979
+ :type Model: str
980
+ """
981
+ self._Messages = None
982
+ self._Model = None
983
+
984
+ @property
985
+ def Messages(self):
986
+ """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.
987
+ :rtype: list of Message
988
+ """
989
+ return self._Messages
990
+
991
+ @Messages.setter
992
+ def Messages(self, Messages):
993
+ self._Messages = Messages
994
+
995
+ @property
996
+ def Model(self):
997
+ """Model name.
998
+ :rtype: str
999
+ """
1000
+ return self._Model
1001
+
1002
+ @Model.setter
1003
+ def Model(self, Model):
1004
+ self._Model = Model
1005
+
1006
+
1007
+ def _deserialize(self, params):
1008
+ if params.get("Messages") is not None:
1009
+ self._Messages = []
1010
+ for item in params.get("Messages"):
1011
+ obj = Message()
1012
+ obj._deserialize(item)
1013
+ self._Messages.append(obj)
1014
+ self._Model = params.get("Model")
1015
+ memeber_set = set(params.keys())
1016
+ for name, value in vars(self).items():
1017
+ property_name = name[1:]
1018
+ if property_name in memeber_set:
1019
+ memeber_set.remove(property_name)
1020
+ if len(memeber_set) > 0:
1021
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1022
+
1023
+
1024
+
1025
+ class QueryRewriteResponse(AbstractModel):
1026
+ """QueryRewrite response structure.
1027
+
1028
+ """
1029
+
1030
+ def __init__(self):
1031
+ r"""
1032
+ :param _Content: Rewritten result.
1033
+ :type Content: str
1034
+ :param _Usage: Consumption. The numbers of input tokens, output tokens, and total tokens will be returned.
1035
+ :type Usage: :class:`tencentcloud.lkeap.v20240522.models.Usage`
1036
+ :param _RequestId: 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.
1037
+ :type RequestId: str
1038
+ """
1039
+ self._Content = None
1040
+ self._Usage = None
1041
+ self._RequestId = None
1042
+
1043
+ @property
1044
+ def Content(self):
1045
+ """Rewritten result.
1046
+ :rtype: str
1047
+ """
1048
+ return self._Content
1049
+
1050
+ @Content.setter
1051
+ def Content(self, Content):
1052
+ self._Content = Content
1053
+
1054
+ @property
1055
+ def Usage(self):
1056
+ """Consumption. The numbers of input tokens, output tokens, and total tokens will be returned.
1057
+ :rtype: :class:`tencentcloud.lkeap.v20240522.models.Usage`
1058
+ """
1059
+ return self._Usage
1060
+
1061
+ @Usage.setter
1062
+ def Usage(self, Usage):
1063
+ self._Usage = Usage
1064
+
1065
+ @property
1066
+ def RequestId(self):
1067
+ """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.
1068
+ :rtype: str
1069
+ """
1070
+ return self._RequestId
1071
+
1072
+ @RequestId.setter
1073
+ def RequestId(self, RequestId):
1074
+ self._RequestId = RequestId
1075
+
1076
+
1077
+ def _deserialize(self, params):
1078
+ self._Content = params.get("Content")
1079
+ if params.get("Usage") is not None:
1080
+ self._Usage = Usage()
1081
+ self._Usage._deserialize(params.get("Usage"))
1082
+ self._RequestId = params.get("RequestId")
1083
+
1084
+
1085
+ class ReconstructDocumentFailedPage(AbstractModel):
1086
+ """Document parsing failure record.
1087
+
1088
+ """
1089
+
1090
+ def __init__(self):
1091
+ r"""
1092
+ :param _PageNumber: Page number that failed to parse.
1093
+ :type PageNumber: int
1094
+ """
1095
+ self._PageNumber = None
1096
+
1097
+ @property
1098
+ def PageNumber(self):
1099
+ """Page number that failed to parse.
1100
+ :rtype: int
1101
+ """
1102
+ return self._PageNumber
1103
+
1104
+ @PageNumber.setter
1105
+ def PageNumber(self, PageNumber):
1106
+ self._PageNumber = PageNumber
1107
+
1108
+
1109
+ def _deserialize(self, params):
1110
+ self._PageNumber = params.get("PageNumber")
1111
+ memeber_set = set(params.keys())
1112
+ for name, value in vars(self).items():
1113
+ property_name = name[1:]
1114
+ if property_name in memeber_set:
1115
+ memeber_set.remove(property_name)
1116
+ if len(memeber_set) > 0:
1117
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1118
+
1119
+
1120
+
1121
+ class RunRerankRequest(AbstractModel):
1122
+ """RunRerank request structure.
1123
+
1124
+ """
1125
+
1126
+ def __init__(self):
1127
+ r"""
1128
+ :param _Query: Query content.
1129
+ :type Query: str
1130
+ :param _Docs: Document list, up to 20 documents.
1131
+ :type Docs: list of str
1132
+ :param _Model: Model name. Default: lke-reranker-base.
1133
+ :type Model: str
1134
+ """
1135
+ self._Query = None
1136
+ self._Docs = None
1137
+ self._Model = None
1138
+
1139
+ @property
1140
+ def Query(self):
1141
+ """Query content.
1142
+ :rtype: str
1143
+ """
1144
+ return self._Query
1145
+
1146
+ @Query.setter
1147
+ def Query(self, Query):
1148
+ self._Query = Query
1149
+
1150
+ @property
1151
+ def Docs(self):
1152
+ """Document list, up to 20 documents.
1153
+ :rtype: list of str
1154
+ """
1155
+ return self._Docs
1156
+
1157
+ @Docs.setter
1158
+ def Docs(self, Docs):
1159
+ self._Docs = Docs
1160
+
1161
+ @property
1162
+ def Model(self):
1163
+ """Model name. Default: lke-reranker-base.
1164
+ :rtype: str
1165
+ """
1166
+ return self._Model
1167
+
1168
+ @Model.setter
1169
+ def Model(self, Model):
1170
+ self._Model = Model
1171
+
1172
+
1173
+ def _deserialize(self, params):
1174
+ self._Query = params.get("Query")
1175
+ self._Docs = params.get("Docs")
1176
+ self._Model = params.get("Model")
1177
+ memeber_set = set(params.keys())
1178
+ for name, value in vars(self).items():
1179
+ property_name = name[1:]
1180
+ if property_name in memeber_set:
1181
+ memeber_set.remove(property_name)
1182
+ if len(memeber_set) > 0:
1183
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1184
+
1185
+
1186
+
1187
+ class RunRerankResponse(AbstractModel):
1188
+ """RunRerank response structure.
1189
+
1190
+ """
1191
+
1192
+ def __init__(self):
1193
+ r"""
1194
+ :param _ScoreList: Relevance. A higher numeric value indicates greater relevance.
1195
+ :type ScoreList: list of float
1196
+ :param _Usage: Consumption. Only returns TotalToken.
1197
+ :type Usage: :class:`tencentcloud.lkeap.v20240522.models.Usage`
1198
+ :param _RequestId: 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.
1199
+ :type RequestId: str
1200
+ """
1201
+ self._ScoreList = None
1202
+ self._Usage = None
1203
+ self._RequestId = None
1204
+
1205
+ @property
1206
+ def ScoreList(self):
1207
+ """Relevance. A higher numeric value indicates greater relevance.
1208
+ :rtype: list of float
1209
+ """
1210
+ return self._ScoreList
1211
+
1212
+ @ScoreList.setter
1213
+ def ScoreList(self, ScoreList):
1214
+ self._ScoreList = ScoreList
1215
+
1216
+ @property
1217
+ def Usage(self):
1218
+ """Consumption. Only returns TotalToken.
1219
+ :rtype: :class:`tencentcloud.lkeap.v20240522.models.Usage`
1220
+ """
1221
+ return self._Usage
1222
+
1223
+ @Usage.setter
1224
+ def Usage(self, Usage):
1225
+ self._Usage = Usage
1226
+
1227
+ @property
1228
+ def RequestId(self):
1229
+ """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.
1230
+ :rtype: str
1231
+ """
1232
+ return self._RequestId
1233
+
1234
+ @RequestId.setter
1235
+ def RequestId(self, RequestId):
1236
+ self._RequestId = RequestId
1237
+
1238
+
1239
+ def _deserialize(self, params):
1240
+ self._ScoreList = params.get("ScoreList")
1241
+ if params.get("Usage") is not None:
1242
+ self._Usage = Usage()
1243
+ self._Usage._deserialize(params.get("Usage"))
1244
+ self._RequestId = params.get("RequestId")
1245
+
1246
+
1247
+ class SplitDocumentFailedPage(AbstractModel):
1248
+ """Document parsing failure record.
1249
+
1250
+ """
1251
+
1252
+ def __init__(self):
1253
+ r"""
1254
+ :param _PageNumber: Page number that failed to parse.
1255
+ :type PageNumber: int
1256
+ """
1257
+ self._PageNumber = None
1258
+
1259
+ @property
1260
+ def PageNumber(self):
1261
+ """Page number that failed to parse.
1262
+ :rtype: int
1263
+ """
1264
+ return self._PageNumber
1265
+
1266
+ @PageNumber.setter
1267
+ def PageNumber(self, PageNumber):
1268
+ self._PageNumber = PageNumber
1269
+
1270
+
1271
+ def _deserialize(self, params):
1272
+ self._PageNumber = params.get("PageNumber")
1273
+ memeber_set = set(params.keys())
1274
+ for name, value in vars(self).items():
1275
+ property_name = name[1:]
1276
+ if property_name in memeber_set:
1277
+ memeber_set.remove(property_name)
1278
+ if len(memeber_set) > 0:
1279
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1280
+
1281
+
1282
+
1283
+ class Usage(AbstractModel):
1284
+ """Consumption.
1285
+
1286
+ """
1287
+
1288
+ def __init__(self):
1289
+ r"""
1290
+ :param _TotalPages: Number of document pages.
1291
+ :type TotalPages: int
1292
+ :param _InputTokens: Number of input tokens.
1293
+ :type InputTokens: int
1294
+ :param _OutputTokens: Number of output tokens.
1295
+ :type OutputTokens: int
1296
+ :param _TotalTokens: Total number of tokens.
1297
+ :type TotalTokens: int
1298
+ """
1299
+ self._TotalPages = None
1300
+ self._InputTokens = None
1301
+ self._OutputTokens = None
1302
+ self._TotalTokens = None
1303
+
1304
+ @property
1305
+ def TotalPages(self):
1306
+ """Number of document pages.
1307
+ :rtype: int
1308
+ """
1309
+ return self._TotalPages
1310
+
1311
+ @TotalPages.setter
1312
+ def TotalPages(self, TotalPages):
1313
+ self._TotalPages = TotalPages
1314
+
1315
+ @property
1316
+ def InputTokens(self):
1317
+ """Number of input tokens.
1318
+ :rtype: int
1319
+ """
1320
+ return self._InputTokens
1321
+
1322
+ @InputTokens.setter
1323
+ def InputTokens(self, InputTokens):
1324
+ self._InputTokens = InputTokens
1325
+
1326
+ @property
1327
+ def OutputTokens(self):
1328
+ """Number of output tokens.
1329
+ :rtype: int
1330
+ """
1331
+ return self._OutputTokens
1332
+
1333
+ @OutputTokens.setter
1334
+ def OutputTokens(self, OutputTokens):
1335
+ self._OutputTokens = OutputTokens
1336
+
1337
+ @property
1338
+ def TotalTokens(self):
1339
+ """Total number of tokens.
1340
+ :rtype: int
1341
+ """
1342
+ return self._TotalTokens
1343
+
1344
+ @TotalTokens.setter
1345
+ def TotalTokens(self, TotalTokens):
1346
+ self._TotalTokens = TotalTokens
1347
+
1348
+
1349
+ def _deserialize(self, params):
1350
+ self._TotalPages = params.get("TotalPages")
1351
+ self._InputTokens = params.get("InputTokens")
1352
+ self._OutputTokens = params.get("OutputTokens")
1353
+ self._TotalTokens = params.get("TotalTokens")
1354
+ memeber_set = set(params.keys())
1355
+ for name, value in vars(self).items():
1356
+ property_name = name[1:]
1357
+ if property_name in memeber_set:
1358
+ memeber_set.remove(property_name)
1359
+ if len(memeber_set) > 0:
1360
+ warnings.warn("%s fileds are useless." % ",".join(memeber_set))
1361
+