tencentcloud-sdk-python-lkeap 3.1.86__tar.gz → 3.1.100__tar.gz
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_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/PKG-INFO +2 -2
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/setup.py +1 -1
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/__init__.py +1 -1
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/lkeap/v20240522/lkeap_client.py +0 -369
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/lkeap/v20240522/lkeap_client_async.py +0 -289
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/lkeap/v20240522/models.py +1058 -3756
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud_sdk_python_lkeap.egg-info/PKG-INFO +2 -2
- tencentcloud_sdk_python_lkeap-3.1.100/tencentcloud_sdk_python_lkeap.egg-info/requires.txt +1 -0
- tencentcloud_sdk_python_lkeap-3.1.86/tencentcloud_sdk_python_lkeap.egg-info/requires.txt +0 -1
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/README.rst +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/setup.cfg +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/lkeap/__init__.py +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/lkeap/v20240522/__init__.py +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud/lkeap/v20240522/errorcodes.py +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud_sdk_python_lkeap.egg-info/SOURCES.txt +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud_sdk_python_lkeap.egg-info/dependency_links.txt +0 -0
- {tencentcloud_sdk_python_lkeap-3.1.86 → tencentcloud_sdk_python_lkeap-3.1.100}/tencentcloud_sdk_python_lkeap.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tencentcloud-sdk-python-lkeap
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.100
|
|
4
4
|
Summary: Tencent Cloud Lkeap SDK for Python
|
|
5
5
|
Home-page: https://github.com/TencentCloud/tencentcloud-sdk-python
|
|
6
6
|
Author: Tencent Cloud
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 2.7
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
-
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.
|
|
18
|
+
Requires-Dist: tencentcloud-sdk-python-common<4.0.0,>=3.1.100
|
|
19
19
|
|
|
20
20
|
============================
|
|
21
21
|
Tencent Cloud SDK for Python
|
|
@@ -8,7 +8,7 @@ ROOT = os.path.dirname(__file__)
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name='tencentcloud-sdk-python-lkeap',
|
|
11
|
-
install_requires=["tencentcloud-sdk-python-common>=3.1.
|
|
11
|
+
install_requires=["tencentcloud-sdk-python-common>=3.1.100,<4.0.0"],
|
|
12
12
|
|
|
13
13
|
version=tencentcloud.__version__,
|
|
14
14
|
description='Tencent Cloud Lkeap SDK for Python',
|
|
@@ -177,75 +177,6 @@ class LkeapClient(AbstractClient):
|
|
|
177
177
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
178
178
|
|
|
179
179
|
|
|
180
|
-
def CreateAttributeLabel(self, request):
|
|
181
|
-
r"""用于为问答对创建属性标签,以便对内容进行分类和管理。 使用场景:当需要为问答对添加分类标签和属性标记时使用,比如为问答对添加“售后”标签。
|
|
182
|
-
|
|
183
|
-
:param request: Request instance for CreateAttributeLabel.
|
|
184
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.CreateAttributeLabelRequest`
|
|
185
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateAttributeLabelResponse`
|
|
186
|
-
|
|
187
|
-
"""
|
|
188
|
-
try:
|
|
189
|
-
params = request._serialize()
|
|
190
|
-
headers = request.headers
|
|
191
|
-
body = self.call("CreateAttributeLabel", params, headers=headers)
|
|
192
|
-
response = json.loads(body)
|
|
193
|
-
model = models.CreateAttributeLabelResponse()
|
|
194
|
-
model._deserialize(response["Response"])
|
|
195
|
-
return model
|
|
196
|
-
except Exception as e:
|
|
197
|
-
if isinstance(e, TencentCloudSDKException):
|
|
198
|
-
raise
|
|
199
|
-
else:
|
|
200
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
def CreateKnowledgeBase(self, request):
|
|
204
|
-
r"""用于在系统中创建一个新的知识库。知识库是一个用于存储和管理知识条目的集合,可以包括文档、问答对、属性标签等。创建知识库后,可以向其中添加各种知识条目,以便在后续的知识检索中使用。 使用场景:当需要在系统中建立一个新的知识库以存储和管理特定领域或项目的知识条目时使用。例如,一个用户可能需要创建一个知识库,以存储用户指南、常见问题解答和技术文档。体验用户最多可创建3个知识库,付费用户最多可创建100个知识库。
|
|
205
|
-
|
|
206
|
-
:param request: Request instance for CreateKnowledgeBase.
|
|
207
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.CreateKnowledgeBaseRequest`
|
|
208
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateKnowledgeBaseResponse`
|
|
209
|
-
|
|
210
|
-
"""
|
|
211
|
-
try:
|
|
212
|
-
params = request._serialize()
|
|
213
|
-
headers = request.headers
|
|
214
|
-
body = self.call("CreateKnowledgeBase", params, headers=headers)
|
|
215
|
-
response = json.loads(body)
|
|
216
|
-
model = models.CreateKnowledgeBaseResponse()
|
|
217
|
-
model._deserialize(response["Response"])
|
|
218
|
-
return model
|
|
219
|
-
except Exception as e:
|
|
220
|
-
if isinstance(e, TencentCloudSDKException):
|
|
221
|
-
raise
|
|
222
|
-
else:
|
|
223
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
def CreateQA(self, request):
|
|
227
|
-
r"""用于创建新的问答对。问答对可以在SearchKnowledge接口知识检索时提供匹配的答案。 使用场景:当需要添加新的知识点和对应的问答对时使用,比如为产品添加新的常见问题解答。
|
|
228
|
-
|
|
229
|
-
:param request: Request instance for CreateQA.
|
|
230
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.CreateQARequest`
|
|
231
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.CreateQAResponse`
|
|
232
|
-
|
|
233
|
-
"""
|
|
234
|
-
try:
|
|
235
|
-
params = request._serialize()
|
|
236
|
-
headers = request.headers
|
|
237
|
-
body = self.call("CreateQA", params, headers=headers)
|
|
238
|
-
response = json.loads(body)
|
|
239
|
-
model = models.CreateQAResponse()
|
|
240
|
-
model._deserialize(response["Response"])
|
|
241
|
-
return model
|
|
242
|
-
except Exception as e:
|
|
243
|
-
if isinstance(e, TencentCloudSDKException):
|
|
244
|
-
raise
|
|
245
|
-
else:
|
|
246
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
247
|
-
|
|
248
|
-
|
|
249
180
|
def CreateReconstructDocumentFlow(self, request):
|
|
250
181
|
r"""本接口为异步接口的发起请求接口,用于发起文档解析任务。
|
|
251
182
|
文档解析支持将图片或PDF、DOCX、PPTX、EXCEL等文件转换成Markdown格式文件,可解析包括表格、公式、图片、标题、段落、页眉、页脚等内容元素,并将内容智能转换成阅读顺序。具体支持文件类型请查看下方输入参数列表。
|
|
@@ -295,121 +226,6 @@ class LkeapClient(AbstractClient):
|
|
|
295
226
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
296
227
|
|
|
297
228
|
|
|
298
|
-
def DeleteAttributeLabels(self, request):
|
|
299
|
-
r"""用于删除不再需要的属性标签。 使用场景:当某个标签不再使用时,可以将其删除以保持标签系统的整洁。
|
|
300
|
-
|
|
301
|
-
:param request: Request instance for DeleteAttributeLabels.
|
|
302
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.DeleteAttributeLabelsRequest`
|
|
303
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.DeleteAttributeLabelsResponse`
|
|
304
|
-
|
|
305
|
-
"""
|
|
306
|
-
try:
|
|
307
|
-
params = request._serialize()
|
|
308
|
-
headers = request.headers
|
|
309
|
-
body = self.call("DeleteAttributeLabels", params, headers=headers)
|
|
310
|
-
response = json.loads(body)
|
|
311
|
-
model = models.DeleteAttributeLabelsResponse()
|
|
312
|
-
model._deserialize(response["Response"])
|
|
313
|
-
return model
|
|
314
|
-
except Exception as e:
|
|
315
|
-
if isinstance(e, TencentCloudSDKException):
|
|
316
|
-
raise
|
|
317
|
-
else:
|
|
318
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
def DeleteDocs(self, request):
|
|
322
|
-
r"""用于删除已有的文档。 使用场景:当某个文档不再需要时,可以将其删除以保持文档库的整洁。
|
|
323
|
-
|
|
324
|
-
:param request: Request instance for DeleteDocs.
|
|
325
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.DeleteDocsRequest`
|
|
326
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.DeleteDocsResponse`
|
|
327
|
-
|
|
328
|
-
"""
|
|
329
|
-
try:
|
|
330
|
-
params = request._serialize()
|
|
331
|
-
headers = request.headers
|
|
332
|
-
body = self.call("DeleteDocs", params, headers=headers)
|
|
333
|
-
response = json.loads(body)
|
|
334
|
-
model = models.DeleteDocsResponse()
|
|
335
|
-
model._deserialize(response["Response"])
|
|
336
|
-
return model
|
|
337
|
-
except Exception as e:
|
|
338
|
-
if isinstance(e, TencentCloudSDKException):
|
|
339
|
-
raise
|
|
340
|
-
else:
|
|
341
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
def DeleteKnowledgeBase(self, request):
|
|
345
|
-
r"""用于从系统中删除一个现有的知识库。删除知识库将移除该知识库及其所有关联的知识条目(如文档、问答对、属性标签等)。该操作是不可逆的,请在执行前确认是否需要删除。**使用场景**:当某个知识库不再需要时,可以使用此接口将其从系统中删除。例如,一个项目结束后,其相关的知识库可能不再需要存储,可以使用该接口进行删除。
|
|
346
|
-
|
|
347
|
-
:param request: Request instance for DeleteKnowledgeBase.
|
|
348
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.DeleteKnowledgeBaseRequest`
|
|
349
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.DeleteKnowledgeBaseResponse`
|
|
350
|
-
|
|
351
|
-
"""
|
|
352
|
-
try:
|
|
353
|
-
params = request._serialize()
|
|
354
|
-
headers = request.headers
|
|
355
|
-
body = self.call("DeleteKnowledgeBase", params, headers=headers)
|
|
356
|
-
response = json.loads(body)
|
|
357
|
-
model = models.DeleteKnowledgeBaseResponse()
|
|
358
|
-
model._deserialize(response["Response"])
|
|
359
|
-
return model
|
|
360
|
-
except Exception as e:
|
|
361
|
-
if isinstance(e, TencentCloudSDKException):
|
|
362
|
-
raise
|
|
363
|
-
else:
|
|
364
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
def DeleteQAs(self, request):
|
|
368
|
-
r"""用于删除已有的问答对。 使用场景:当某个问答对不再适用或需要移除时使用。
|
|
369
|
-
|
|
370
|
-
:param request: Request instance for DeleteQAs.
|
|
371
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.DeleteQAsRequest`
|
|
372
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.DeleteQAsResponse`
|
|
373
|
-
|
|
374
|
-
"""
|
|
375
|
-
try:
|
|
376
|
-
params = request._serialize()
|
|
377
|
-
headers = request.headers
|
|
378
|
-
body = self.call("DeleteQAs", params, headers=headers)
|
|
379
|
-
response = json.loads(body)
|
|
380
|
-
model = models.DeleteQAsResponse()
|
|
381
|
-
model._deserialize(response["Response"])
|
|
382
|
-
return model
|
|
383
|
-
except Exception as e:
|
|
384
|
-
if isinstance(e, TencentCloudSDKException):
|
|
385
|
-
raise
|
|
386
|
-
else:
|
|
387
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
def DescribeDoc(self, request):
|
|
391
|
-
r"""用于查询特定文档的详细信息。 使用场景:当需要查看某个文档的具体内容和属性时使用。
|
|
392
|
-
|
|
393
|
-
:param request: Request instance for DescribeDoc.
|
|
394
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.DescribeDocRequest`
|
|
395
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.DescribeDocResponse`
|
|
396
|
-
|
|
397
|
-
"""
|
|
398
|
-
try:
|
|
399
|
-
params = request._serialize()
|
|
400
|
-
headers = request.headers
|
|
401
|
-
body = self.call("DescribeDoc", params, headers=headers)
|
|
402
|
-
response = json.loads(body)
|
|
403
|
-
model = models.DescribeDocResponse()
|
|
404
|
-
model._deserialize(response["Response"])
|
|
405
|
-
return model
|
|
406
|
-
except Exception as e:
|
|
407
|
-
if isinstance(e, TencentCloudSDKException):
|
|
408
|
-
raise
|
|
409
|
-
else:
|
|
410
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
411
|
-
|
|
412
|
-
|
|
413
229
|
def GetCharacterUsage(self, request):
|
|
414
230
|
r"""获取字符使用量统计
|
|
415
231
|
|
|
@@ -503,144 +319,6 @@ class LkeapClient(AbstractClient):
|
|
|
503
319
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
504
320
|
|
|
505
321
|
|
|
506
|
-
def ImportQAs(self, request):
|
|
507
|
-
r"""用于批量导入问答对,最多支持50,000条数据导入。通过此接口,可以将多个问答对一次性导入系统中,以便在后续的知识检索中使用。导入的问答对可以来自外部系统、文件或其他数据源。使用场景:当需要一次性导入大量的问答对时使用。例如,一个公司可能需要将其产品的常见问题解答从一个文档或外部系统批量导入到知识库中,以便用户可以通过知识检索系统进行查询。
|
|
508
|
-
|
|
509
|
-
:param request: Request instance for ImportQAs.
|
|
510
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.ImportQAsRequest`
|
|
511
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.ImportQAsResponse`
|
|
512
|
-
|
|
513
|
-
"""
|
|
514
|
-
try:
|
|
515
|
-
params = request._serialize()
|
|
516
|
-
headers = request.headers
|
|
517
|
-
body = self.call("ImportQAs", params, headers=headers)
|
|
518
|
-
response = json.loads(body)
|
|
519
|
-
model = models.ImportQAsResponse()
|
|
520
|
-
model._deserialize(response["Response"])
|
|
521
|
-
return model
|
|
522
|
-
except Exception as e:
|
|
523
|
-
if isinstance(e, TencentCloudSDKException):
|
|
524
|
-
raise
|
|
525
|
-
else:
|
|
526
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
def ListAttributeLabels(self, request):
|
|
530
|
-
r"""用于获取所有属性标签的列表。 使用场景:用于查看当前系统中所有已有的属性标签,方便进行管理和维护。
|
|
531
|
-
|
|
532
|
-
:param request: Request instance for ListAttributeLabels.
|
|
533
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.ListAttributeLabelsRequest`
|
|
534
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.ListAttributeLabelsResponse`
|
|
535
|
-
|
|
536
|
-
"""
|
|
537
|
-
try:
|
|
538
|
-
params = request._serialize()
|
|
539
|
-
headers = request.headers
|
|
540
|
-
body = self.call("ListAttributeLabels", params, headers=headers)
|
|
541
|
-
response = json.loads(body)
|
|
542
|
-
model = models.ListAttributeLabelsResponse()
|
|
543
|
-
model._deserialize(response["Response"])
|
|
544
|
-
return model
|
|
545
|
-
except Exception as e:
|
|
546
|
-
if isinstance(e, TencentCloudSDKException):
|
|
547
|
-
raise
|
|
548
|
-
else:
|
|
549
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
def ListDocs(self, request):
|
|
553
|
-
r"""用于获取所有文档的列表。 使用场景:用于查看当前系统中所有已有的文档,方便进行管理和维护。
|
|
554
|
-
|
|
555
|
-
:param request: Request instance for ListDocs.
|
|
556
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.ListDocsRequest`
|
|
557
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.ListDocsResponse`
|
|
558
|
-
|
|
559
|
-
"""
|
|
560
|
-
try:
|
|
561
|
-
params = request._serialize()
|
|
562
|
-
headers = request.headers
|
|
563
|
-
body = self.call("ListDocs", params, headers=headers)
|
|
564
|
-
response = json.loads(body)
|
|
565
|
-
model = models.ListDocsResponse()
|
|
566
|
-
model._deserialize(response["Response"])
|
|
567
|
-
return model
|
|
568
|
-
except Exception as e:
|
|
569
|
-
if isinstance(e, TencentCloudSDKException):
|
|
570
|
-
raise
|
|
571
|
-
else:
|
|
572
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
def ListQAs(self, request):
|
|
576
|
-
r"""用于获取所有问答对的列表。 使用场景:用于查看当前系统中所有已有的问答对,方便进行管理和维护。
|
|
577
|
-
|
|
578
|
-
:param request: Request instance for ListQAs.
|
|
579
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.ListQAsRequest`
|
|
580
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.ListQAsResponse`
|
|
581
|
-
|
|
582
|
-
"""
|
|
583
|
-
try:
|
|
584
|
-
params = request._serialize()
|
|
585
|
-
headers = request.headers
|
|
586
|
-
body = self.call("ListQAs", params, headers=headers)
|
|
587
|
-
response = json.loads(body)
|
|
588
|
-
model = models.ListQAsResponse()
|
|
589
|
-
model._deserialize(response["Response"])
|
|
590
|
-
return model
|
|
591
|
-
except Exception as e:
|
|
592
|
-
if isinstance(e, TencentCloudSDKException):
|
|
593
|
-
raise
|
|
594
|
-
else:
|
|
595
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
def ModifyAttributeLabel(self, request):
|
|
599
|
-
r"""用于修改已有的属性标签。 使用场景:当需要更改属性标签的名称或描述时使用,比如将“售后”标签改为“售前”。
|
|
600
|
-
|
|
601
|
-
:param request: Request instance for ModifyAttributeLabel.
|
|
602
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.ModifyAttributeLabelRequest`
|
|
603
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.ModifyAttributeLabelResponse`
|
|
604
|
-
|
|
605
|
-
"""
|
|
606
|
-
try:
|
|
607
|
-
params = request._serialize()
|
|
608
|
-
headers = request.headers
|
|
609
|
-
body = self.call("ModifyAttributeLabel", params, headers=headers)
|
|
610
|
-
response = json.loads(body)
|
|
611
|
-
model = models.ModifyAttributeLabelResponse()
|
|
612
|
-
model._deserialize(response["Response"])
|
|
613
|
-
return model
|
|
614
|
-
except Exception as e:
|
|
615
|
-
if isinstance(e, TencentCloudSDKException):
|
|
616
|
-
raise
|
|
617
|
-
else:
|
|
618
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
def ModifyQA(self, request):
|
|
622
|
-
r"""用于修改已有的问答对。 使用场景:当需要更新问答对的内容或答案时使用。
|
|
623
|
-
|
|
624
|
-
:param request: Request instance for ModifyQA.
|
|
625
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.ModifyQARequest`
|
|
626
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.ModifyQAResponse`
|
|
627
|
-
|
|
628
|
-
"""
|
|
629
|
-
try:
|
|
630
|
-
params = request._serialize()
|
|
631
|
-
headers = request.headers
|
|
632
|
-
body = self.call("ModifyQA", params, headers=headers)
|
|
633
|
-
response = json.loads(body)
|
|
634
|
-
model = models.ModifyQAResponse()
|
|
635
|
-
model._deserialize(response["Response"])
|
|
636
|
-
return model
|
|
637
|
-
except Exception as e:
|
|
638
|
-
if isinstance(e, TencentCloudSDKException):
|
|
639
|
-
raise
|
|
640
|
-
else:
|
|
641
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
642
|
-
|
|
643
|
-
|
|
644
322
|
def QueryRewrite(self, request):
|
|
645
323
|
r"""多轮改写(QueryRewrite)主要用于多轮对话中,进行指代消解和省略补全。使用本接口,无需输入prompt描述,根据对话历史即可生成更精确的用户查询。在应用场景上,本接口可应用于智能问答、对话式搜索等多种场景。
|
|
646
324
|
开通[产品体验](https://lke.cloud.tencent.com/lke/#/trialProduct)后可获得50wtoken体验额度。本接口(QueryRewrite)有单账号调用上限控制,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。
|
|
@@ -686,29 +364,6 @@ class LkeapClient(AbstractClient):
|
|
|
686
364
|
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
687
365
|
|
|
688
366
|
|
|
689
|
-
def RetrieveKnowledge(self, request):
|
|
690
|
-
r"""用于检索知识库中的文档和问答对内容。 使用场景:适用于查询长期存储在知识库中的文档和问答对,比如产品手册、用户指南等内容的检索。
|
|
691
|
-
|
|
692
|
-
:param request: Request instance for RetrieveKnowledge.
|
|
693
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.RetrieveKnowledgeRequest`
|
|
694
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.RetrieveKnowledgeResponse`
|
|
695
|
-
|
|
696
|
-
"""
|
|
697
|
-
try:
|
|
698
|
-
params = request._serialize()
|
|
699
|
-
headers = request.headers
|
|
700
|
-
body = self.call("RetrieveKnowledge", params, headers=headers)
|
|
701
|
-
response = json.loads(body)
|
|
702
|
-
model = models.RetrieveKnowledgeResponse()
|
|
703
|
-
model._deserialize(response["Response"])
|
|
704
|
-
return model
|
|
705
|
-
except Exception as e:
|
|
706
|
-
if isinstance(e, TencentCloudSDKException):
|
|
707
|
-
raise
|
|
708
|
-
else:
|
|
709
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
710
|
-
|
|
711
|
-
|
|
712
367
|
def RunRerank(self, request):
|
|
713
368
|
r"""基于知识引擎精调模型技术的rerank模型,支持对多路召回的结果进行重排序,根据query与切片内容的相关性,按照顺序给出每一条结果和query的相关性分数。
|
|
714
369
|
|
|
@@ -725,30 +380,6 @@ class LkeapClient(AbstractClient):
|
|
|
725
380
|
model = models.RunRerankResponse()
|
|
726
381
|
model._deserialize(response["Response"])
|
|
727
382
|
return model
|
|
728
|
-
except Exception as e:
|
|
729
|
-
if isinstance(e, TencentCloudSDKException):
|
|
730
|
-
raise
|
|
731
|
-
else:
|
|
732
|
-
raise TencentCloudSDKException(type(e).__name__, str(e))
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
def UploadDoc(self, request):
|
|
736
|
-
r"""用于上传文档内容。上传的文档将存储在知识库中,可以通过RetrieveKnowledge[知识库内容检索接口](https://cloud.tencent.com/document/product/1772/115349)进行检索。
|
|
737
|
-
使用场景:适用于需要长期存储和检索的文档内容,如产品手册、用户指南等。
|
|
738
|
-
|
|
739
|
-
:param request: Request instance for UploadDoc.
|
|
740
|
-
:type request: :class:`tencentcloud.lkeap.v20240522.models.UploadDocRequest`
|
|
741
|
-
:rtype: :class:`tencentcloud.lkeap.v20240522.models.UploadDocResponse`
|
|
742
|
-
|
|
743
|
-
"""
|
|
744
|
-
try:
|
|
745
|
-
params = request._serialize()
|
|
746
|
-
headers = request.headers
|
|
747
|
-
body = self.call("UploadDoc", params, headers=headers)
|
|
748
|
-
response = json.loads(body)
|
|
749
|
-
model = models.UploadDocResponse()
|
|
750
|
-
model._deserialize(response["Response"])
|
|
751
|
-
return model
|
|
752
383
|
except Exception as e:
|
|
753
384
|
if isinstance(e, TencentCloudSDKException):
|
|
754
385
|
raise
|