tencentcloud-sdk-python-intl-en 3.0.1271__py2.py3-none-any.whl → 3.0.1273__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.
- tencentcloud/__init__.py +1 -1
- tencentcloud/lkeap/__init__.py +0 -0
- tencentcloud/lkeap/v20240522/__init__.py +0 -0
- tencentcloud/lkeap/v20240522/errorcodes.py +57 -0
- tencentcloud/lkeap/v20240522/lkeap_client.py +167 -0
- tencentcloud/lkeap/v20240522/models.py +1361 -0
- tencentcloud/ocr/v20181119/ocr_client.py +1 -1
- {tencentcloud_sdk_python_intl_en-3.0.1271.dist-info → tencentcloud_sdk_python_intl_en-3.0.1273.dist-info}/METADATA +1 -1
- {tencentcloud_sdk_python_intl_en-3.0.1271.dist-info → tencentcloud_sdk_python_intl_en-3.0.1273.dist-info}/RECORD +11 -6
- {tencentcloud_sdk_python_intl_en-3.0.1271.dist-info → tencentcloud_sdk_python_intl_en-3.0.1273.dist-info}/WHEEL +0 -0
- {tencentcloud_sdk_python_intl_en-3.0.1271.dist-info → tencentcloud_sdk_python_intl_en-3.0.1273.dist-info}/top_level.txt +0 -0
tencentcloud/__init__.py
CHANGED
File without changes
|
File without changes
|
@@ -0,0 +1,57 @@
|
|
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
|
+
|
17
|
+
# Operation failed.
|
18
|
+
FAILEDOPERATION = 'FailedOperation'
|
19
|
+
|
20
|
+
#
|
21
|
+
FAILEDOPERATION_FILEPARSEERROR = 'FailedOperation.FileParseError'
|
22
|
+
|
23
|
+
#
|
24
|
+
FAILEDOPERATION_FILEPARSETIMEOUT = 'FailedOperation.FileParseTimeout'
|
25
|
+
|
26
|
+
#
|
27
|
+
FAILEDOPERATION_INTERNALERROR = 'FailedOperation.InternalError'
|
28
|
+
|
29
|
+
# Internal error.
|
30
|
+
INTERNALERROR = 'InternalError'
|
31
|
+
|
32
|
+
# Parameter error.
|
33
|
+
INVALIDPARAMETER = 'InvalidParameter'
|
34
|
+
|
35
|
+
#
|
36
|
+
INVALIDPARAMETER_FILEURLINVALID = 'InvalidParameter.FileURLInvalid'
|
37
|
+
|
38
|
+
#
|
39
|
+
INVALIDPARAMETER_INVALIDFILEFORMAT = 'InvalidParameter.InvalidFileFormat'
|
40
|
+
|
41
|
+
#
|
42
|
+
INVALIDPARAMETER_INVALIDFILETYPE = 'InvalidParameter.InvalidFileType'
|
43
|
+
|
44
|
+
# Exceeds the maximum file page limit.
|
45
|
+
LIMITEXCEEDED_EXCEEDEDMAXPAGESERROR = 'LimitExceeded.ExceededMaxPagesError'
|
46
|
+
|
47
|
+
# File too large.
|
48
|
+
LIMITEXCEEDED_TOOLARGEFILEERROR = 'LimitExceeded.TooLargeFileError'
|
49
|
+
|
50
|
+
# Too many and frequent requests.
|
51
|
+
REQUESTLIMITEXCEEDED = 'RequestLimitExceeded'
|
52
|
+
|
53
|
+
# The account resource package is exhausted.
|
54
|
+
RESOURCEUNAVAILABLE_RESOURCEPACKAGERUNOUT = 'ResourceUnavailable.ResourcePackageRunOut'
|
55
|
+
|
56
|
+
# The billing status is abnormal.
|
57
|
+
RESOURCESSOLDOUT_CHARGESTATUSEXCEPTION = 'ResourcesSoldOut.ChargeStatusException'
|
@@ -0,0 +1,167 @@
|
|
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 json
|
17
|
+
|
18
|
+
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
|
19
|
+
from tencentcloud.common.abstract_client import AbstractClient
|
20
|
+
from tencentcloud.lkeap.v20240522 import models
|
21
|
+
|
22
|
+
|
23
|
+
class LkeapClient(AbstractClient):
|
24
|
+
_apiVersion = '2024-05-22'
|
25
|
+
_endpoint = 'lkeap.intl.tencentcloudapi.com'
|
26
|
+
_service = 'lkeap'
|
27
|
+
|
28
|
+
|
29
|
+
def CreateReconstructDocumentFlow(self, request):
|
30
|
+
"""This API is used to initiate requests for this asynchronous API, for initiating document parsing tasks.
|
31
|
+
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.
|
32
|
+
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.
|
33
|
+
|
34
|
+
:param request: Request instance for CreateReconstructDocumentFlow.
|
35
|
+
:type request: :class:`tencentcloud.lkeap.v20240522.models.CreateReconstructDocumentFlowRequest`
|
36
|
+
:rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateReconstructDocumentFlowResponse`
|
37
|
+
|
38
|
+
"""
|
39
|
+
try:
|
40
|
+
params = request._serialize()
|
41
|
+
headers = request.headers
|
42
|
+
body = self.call("CreateReconstructDocumentFlow", params, headers=headers)
|
43
|
+
response = json.loads(body)
|
44
|
+
model = models.CreateReconstructDocumentFlowResponse()
|
45
|
+
model._deserialize(response["Response"])
|
46
|
+
return model
|
47
|
+
except Exception as e:
|
48
|
+
if isinstance(e, TencentCloudSDKException):
|
49
|
+
raise
|
50
|
+
else:
|
51
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
52
|
+
|
53
|
+
|
54
|
+
def CreateSplitDocumentFlow(self, request):
|
55
|
+
"""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.
|
56
|
+
|
57
|
+
:param request: Request instance for CreateSplitDocumentFlow.
|
58
|
+
:type request: :class:`tencentcloud.lkeap.v20240522.models.CreateSplitDocumentFlowRequest`
|
59
|
+
:rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateSplitDocumentFlowResponse`
|
60
|
+
|
61
|
+
"""
|
62
|
+
try:
|
63
|
+
params = request._serialize()
|
64
|
+
headers = request.headers
|
65
|
+
body = self.call("CreateSplitDocumentFlow", params, headers=headers)
|
66
|
+
response = json.loads(body)
|
67
|
+
model = models.CreateSplitDocumentFlowResponse()
|
68
|
+
model._deserialize(response["Response"])
|
69
|
+
return model
|
70
|
+
except Exception as e:
|
71
|
+
if isinstance(e, TencentCloudSDKException):
|
72
|
+
raise
|
73
|
+
else:
|
74
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
75
|
+
|
76
|
+
|
77
|
+
def GetReconstructDocumentResult(self, request):
|
78
|
+
"""This is an asynchronous API for querying results, which is used to obtain the result of document parsing.
|
79
|
+
|
80
|
+
:param request: Request instance for GetReconstructDocumentResult.
|
81
|
+
:type request: :class:`tencentcloud.lkeap.v20240522.models.GetReconstructDocumentResultRequest`
|
82
|
+
:rtype: :class:`tencentcloud.lkeap.v20240522.models.GetReconstructDocumentResultResponse`
|
83
|
+
|
84
|
+
"""
|
85
|
+
try:
|
86
|
+
params = request._serialize()
|
87
|
+
headers = request.headers
|
88
|
+
body = self.call("GetReconstructDocumentResult", params, headers=headers)
|
89
|
+
response = json.loads(body)
|
90
|
+
model = models.GetReconstructDocumentResultResponse()
|
91
|
+
model._deserialize(response["Response"])
|
92
|
+
return model
|
93
|
+
except Exception as e:
|
94
|
+
if isinstance(e, TencentCloudSDKException):
|
95
|
+
raise
|
96
|
+
else:
|
97
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
98
|
+
|
99
|
+
|
100
|
+
def GetSplitDocumentResult(self, request):
|
101
|
+
"""This API is used to query the results of document splitting tasks.
|
102
|
+
|
103
|
+
:param request: Request instance for GetSplitDocumentResult.
|
104
|
+
:type request: :class:`tencentcloud.lkeap.v20240522.models.GetSplitDocumentResultRequest`
|
105
|
+
:rtype: :class:`tencentcloud.lkeap.v20240522.models.GetSplitDocumentResultResponse`
|
106
|
+
|
107
|
+
"""
|
108
|
+
try:
|
109
|
+
params = request._serialize()
|
110
|
+
headers = request.headers
|
111
|
+
body = self.call("GetSplitDocumentResult", params, headers=headers)
|
112
|
+
response = json.loads(body)
|
113
|
+
model = models.GetSplitDocumentResultResponse()
|
114
|
+
model._deserialize(response["Response"])
|
115
|
+
return model
|
116
|
+
except Exception as e:
|
117
|
+
if isinstance(e, TencentCloudSDKException):
|
118
|
+
raise
|
119
|
+
else:
|
120
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
121
|
+
|
122
|
+
|
123
|
+
def QueryRewrite(self, request):
|
124
|
+
"""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.
|
125
|
+
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).
|
126
|
+
|
127
|
+
:param request: Request instance for QueryRewrite.
|
128
|
+
:type request: :class:`tencentcloud.lkeap.v20240522.models.QueryRewriteRequest`
|
129
|
+
:rtype: :class:`tencentcloud.lkeap.v20240522.models.QueryRewriteResponse`
|
130
|
+
|
131
|
+
"""
|
132
|
+
try:
|
133
|
+
params = request._serialize()
|
134
|
+
headers = request.headers
|
135
|
+
body = self.call("QueryRewrite", params, headers=headers)
|
136
|
+
response = json.loads(body)
|
137
|
+
model = models.QueryRewriteResponse()
|
138
|
+
model._deserialize(response["Response"])
|
139
|
+
return model
|
140
|
+
except Exception as e:
|
141
|
+
if isinstance(e, TencentCloudSDKException):
|
142
|
+
raise
|
143
|
+
else:
|
144
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|
145
|
+
|
146
|
+
|
147
|
+
def RunRerank(self, request):
|
148
|
+
"""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.
|
149
|
+
|
150
|
+
:param request: Request instance for RunRerank.
|
151
|
+
:type request: :class:`tencentcloud.lkeap.v20240522.models.RunRerankRequest`
|
152
|
+
:rtype: :class:`tencentcloud.lkeap.v20240522.models.RunRerankResponse`
|
153
|
+
|
154
|
+
"""
|
155
|
+
try:
|
156
|
+
params = request._serialize()
|
157
|
+
headers = request.headers
|
158
|
+
body = self.call("RunRerank", params, headers=headers)
|
159
|
+
response = json.loads(body)
|
160
|
+
model = models.RunRerankResponse()
|
161
|
+
model._deserialize(response["Response"])
|
162
|
+
return model
|
163
|
+
except Exception as e:
|
164
|
+
if isinstance(e, TencentCloudSDKException):
|
165
|
+
raise
|
166
|
+
else:
|
167
|
+
raise TencentCloudSDKException(type(e).__name__, str(e))
|