-
Notifications
You must be signed in to change notification settings - Fork 251
/
lke_client.py
2103 lines (1737 loc) · 78.9 KB
/
lke_client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.common.abstract_client import AbstractClient
from tencentcloud.lke.v20231130 import models
class LkeClient(AbstractClient):
_apiVersion = '2023-11-30'
_endpoint = 'lke.tencentcloudapi.com'
_service = 'lke'
def CheckAttributeLabelExist(self, request):
"""检查属性下的标签名是否存在
:param request: Request instance for CheckAttributeLabelExist.
:type request: :class:`tencentcloud.lke.v20231130.models.CheckAttributeLabelExistRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CheckAttributeLabelExistResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CheckAttributeLabelExist", params, headers=headers)
response = json.loads(body)
model = models.CheckAttributeLabelExistResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CheckAttributeLabelRefer(self, request):
"""检查属性标签引用
:param request: Request instance for CheckAttributeLabelRefer.
:type request: :class:`tencentcloud.lke.v20231130.models.CheckAttributeLabelReferRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CheckAttributeLabelReferResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CheckAttributeLabelRefer", params, headers=headers)
response = json.loads(body)
model = models.CheckAttributeLabelReferResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ConvertDocument(self, request):
"""接口支持图片和PDF转可编辑word格式文件,将文件中的图片、文本、表格等元素识别,并根据位置进行还原。
:param request: Request instance for ConvertDocument.
:type request: :class:`tencentcloud.lke.v20231130.models.ConvertDocumentRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.ConvertDocumentResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ConvertDocument", params, headers=headers)
response = json.loads(body)
model = models.ConvertDocumentResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateApp(self, request):
"""创建知识引擎应用。
:param request: Request instance for CreateApp.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateAppRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateAppResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateApp", params, headers=headers)
response = json.loads(body)
model = models.CreateAppResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateAttributeLabel(self, request):
"""创建属性
:param request: Request instance for CreateAttributeLabel.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateAttributeLabelRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateAttributeLabelResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateAttributeLabel", params, headers=headers)
response = json.loads(body)
model = models.CreateAttributeLabelResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateCorp(self, request):
"""创建企业
:param request: Request instance for CreateCorp.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateCorpRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateCorpResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateCorp", params, headers=headers)
response = json.loads(body)
model = models.CreateCorpResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateQA(self, request):
"""录入问答
:param request: Request instance for CreateQA.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateQARequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateQAResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateQA", params, headers=headers)
response = json.loads(body)
model = models.CreateQAResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateQACate(self, request):
"""创建QA分类
:param request: Request instance for CreateQACate.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateQACateRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateQACateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateQACate", params, headers=headers)
response = json.loads(body)
model = models.CreateQACateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateReconstructDocumentFlow(self, request):
"""本接口为异步接口的发起请求接口,用于发起文档解析任务。
文档解析支持将图片或PDF文件转换成Markdown格式文件,可解析包括表格、公式、图片、标题、段落、页眉、页脚等内容元素,并将内容智能转换成阅读顺序。
体验期间单账号限制qps仅为1,若有正式接入需要请与产研团队沟通开放。
:param request: Request instance for CreateReconstructDocumentFlow.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateReconstructDocumentFlowRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateReconstructDocumentFlowResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateReconstructDocumentFlow", params, headers=headers)
response = json.loads(body)
model = models.CreateReconstructDocumentFlowResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateRejectedQuestion(self, request):
"""创建拒答问题
:param request: Request instance for CreateRejectedQuestion.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateRejectedQuestionRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateRejectedQuestionResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateRejectedQuestion", params, headers=headers)
response = json.loads(body)
model = models.CreateRejectedQuestionResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateRelease(self, request):
"""创建发布
:param request: Request instance for CreateRelease.
:type request: :class:`tencentcloud.lke.v20231130.models.CreateReleaseRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.CreateReleaseResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateRelease", params, headers=headers)
response = json.loads(body)
model = models.CreateReleaseResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteApp(self, request):
"""删除应用
:param request: Request instance for DeleteApp.
:type request: :class:`tencentcloud.lke.v20231130.models.DeleteAppRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DeleteAppResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteApp", params, headers=headers)
response = json.loads(body)
model = models.DeleteAppResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteAttributeLabel(self, request):
"""删除属性标签
:param request: Request instance for DeleteAttributeLabel.
:type request: :class:`tencentcloud.lke.v20231130.models.DeleteAttributeLabelRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DeleteAttributeLabelResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteAttributeLabel", params, headers=headers)
response = json.loads(body)
model = models.DeleteAttributeLabelResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteDoc(self, request):
"""删除文档
:param request: Request instance for DeleteDoc.
:type request: :class:`tencentcloud.lke.v20231130.models.DeleteDocRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DeleteDocResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteDoc", params, headers=headers)
response = json.loads(body)
model = models.DeleteDocResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteQA(self, request):
"""删除问答
:param request: Request instance for DeleteQA.
:type request: :class:`tencentcloud.lke.v20231130.models.DeleteQARequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DeleteQAResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteQA", params, headers=headers)
response = json.loads(body)
model = models.DeleteQAResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteQACate(self, request):
"""分类删除
:param request: Request instance for DeleteQACate.
:type request: :class:`tencentcloud.lke.v20231130.models.DeleteQACateRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DeleteQACateResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteQACate", params, headers=headers)
response = json.loads(body)
model = models.DeleteQACateResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DeleteRejectedQuestion(self, request):
"""删除拒答问题
:param request: Request instance for DeleteRejectedQuestion.
:type request: :class:`tencentcloud.lke.v20231130.models.DeleteRejectedQuestionRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DeleteRejectedQuestionResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DeleteRejectedQuestion", params, headers=headers)
response = json.loads(body)
model = models.DeleteRejectedQuestionResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeApp(self, request):
"""获取企业下应用详情
:param request: Request instance for DescribeApp.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeAppRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeAppResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeApp", params, headers=headers)
response = json.loads(body)
model = models.DescribeAppResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeAttributeLabel(self, request):
"""查询属性标签详情
:param request: Request instance for DescribeAttributeLabel.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeAttributeLabelRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeAttributeLabelResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeAttributeLabel", params, headers=headers)
response = json.loads(body)
model = models.DescribeAttributeLabelResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCallStatsGraph(self, request):
"""接口调用折线图
:param request: Request instance for DescribeCallStatsGraph.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeCallStatsGraphRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeCallStatsGraphResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCallStatsGraph", params, headers=headers)
response = json.loads(body)
model = models.DescribeCallStatsGraphResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeConcurrencyUsage(self, request):
"""并发调用响应
:param request: Request instance for DescribeConcurrencyUsage.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeConcurrencyUsageRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeConcurrencyUsageResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeConcurrencyUsage", params, headers=headers)
response = json.loads(body)
model = models.DescribeConcurrencyUsageResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeConcurrencyUsageGraph(self, request):
"""并发调用折线图
:param request: Request instance for DescribeConcurrencyUsageGraph.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeConcurrencyUsageGraphRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeConcurrencyUsageGraphResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeConcurrencyUsageGraph", params, headers=headers)
response = json.loads(body)
model = models.DescribeConcurrencyUsageGraphResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeCorp(self, request):
"""企业详情
:param request: Request instance for DescribeCorp.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeCorpRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeCorpResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeCorp", params, headers=headers)
response = json.loads(body)
model = models.DescribeCorpResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeDoc(self, request):
"""文档详情
:param request: Request instance for DescribeDoc.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeDocRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeDocResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeDoc", params, headers=headers)
response = json.loads(body)
model = models.DescribeDocResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeKnowledgeUsage(self, request):
"""查询知识库用量
:param request: Request instance for DescribeKnowledgeUsage.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeKnowledgeUsageRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeKnowledgeUsageResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeKnowledgeUsage", params, headers=headers)
response = json.loads(body)
model = models.DescribeKnowledgeUsageResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeKnowledgeUsagePieGraph(self, request):
"""查询企业知识库容量饼图
:param request: Request instance for DescribeKnowledgeUsagePieGraph.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeKnowledgeUsagePieGraphRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeKnowledgeUsagePieGraphResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeKnowledgeUsagePieGraph", params, headers=headers)
response = json.loads(body)
model = models.DescribeKnowledgeUsagePieGraphResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeQA(self, request):
"""问答详情
:param request: Request instance for DescribeQA.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeQARequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeQAResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeQA", params, headers=headers)
response = json.loads(body)
model = models.DescribeQAResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeRefer(self, request):
"""获取来源详情列表
:param request: Request instance for DescribeRefer.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeReferRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeReferResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeRefer", params, headers=headers)
response = json.loads(body)
model = models.DescribeReferResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeRelease(self, request):
"""发布详情
:param request: Request instance for DescribeRelease.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeReleaseRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeReleaseResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeRelease", params, headers=headers)
response = json.loads(body)
model = models.DescribeReleaseResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeReleaseInfo(self, request):
"""拉取发布按钮状态、最后发布时间
:param request: Request instance for DescribeReleaseInfo.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeReleaseInfoRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeReleaseInfoResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeReleaseInfo", params, headers=headers)
response = json.loads(body)
model = models.DescribeReleaseInfoResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeRobotBizIDByAppKey(self, request):
"""通过appKey获取应用业务ID
:param request: Request instance for DescribeRobotBizIDByAppKey.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeRobotBizIDByAppKeyRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeRobotBizIDByAppKeyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeRobotBizIDByAppKey", params, headers=headers)
response = json.loads(body)
model = models.DescribeRobotBizIDByAppKeyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeSearchStatsGraph(self, request):
"""查询搜索服务调用折线图
:param request: Request instance for DescribeSearchStatsGraph.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeSearchStatsGraphRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeSearchStatsGraphResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeSearchStatsGraph", params, headers=headers)
response = json.loads(body)
model = models.DescribeSearchStatsGraphResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeSegments(self, request):
"""获取片段详情
:param request: Request instance for DescribeSegments.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeSegmentsRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeSegmentsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeSegments", params, headers=headers)
response = json.loads(body)
model = models.DescribeSegmentsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeStorageCredential(self, request):
"""获取文件上传临时密钥
:param request: Request instance for DescribeStorageCredential.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeStorageCredentialRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeStorageCredentialResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeStorageCredential", params, headers=headers)
response = json.loads(body)
model = models.DescribeStorageCredentialResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeTokenUsage(self, request):
"""接口调用token详情
:param request: Request instance for DescribeTokenUsage.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeTokenUsageRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeTokenUsageResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeTokenUsage", params, headers=headers)
response = json.loads(body)
model = models.DescribeTokenUsageResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeTokenUsageGraph(self, request):
"""接口调用token折线图
:param request: Request instance for DescribeTokenUsageGraph.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeTokenUsageGraphRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeTokenUsageGraphResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeTokenUsageGraph", params, headers=headers)
response = json.loads(body)
model = models.DescribeTokenUsageGraphResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeUnsatisfiedReplyContext(self, request):
"""获取不满意回复上下文
:param request: Request instance for DescribeUnsatisfiedReplyContext.
:type request: :class:`tencentcloud.lke.v20231130.models.DescribeUnsatisfiedReplyContextRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.DescribeUnsatisfiedReplyContextResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeUnsatisfiedReplyContext", params, headers=headers)
response = json.loads(body)
model = models.DescribeUnsatisfiedReplyContextResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ExportAttributeLabel(self, request):
"""导出属性标签
:param request: Request instance for ExportAttributeLabel.
:type request: :class:`tencentcloud.lke.v20231130.models.ExportAttributeLabelRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.ExportAttributeLabelResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ExportAttributeLabel", params, headers=headers)
response = json.loads(body)
model = models.ExportAttributeLabelResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ExportQAList(self, request):
"""导出QA列表
:param request: Request instance for ExportQAList.
:type request: :class:`tencentcloud.lke.v20231130.models.ExportQAListRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.ExportQAListResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ExportQAList", params, headers=headers)
response = json.loads(body)
model = models.ExportQAListResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ExportUnsatisfiedReply(self, request):
"""导出不满意回复
:param request: Request instance for ExportUnsatisfiedReply.
:type request: :class:`tencentcloud.lke.v20231130.models.ExportUnsatisfiedReplyRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.ExportUnsatisfiedReplyResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ExportUnsatisfiedReply", params, headers=headers)
response = json.loads(body)
model = models.ExportUnsatisfiedReplyResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def GenerateQA(self, request):
"""文档生成问答
:param request: Request instance for GenerateQA.
:type request: :class:`tencentcloud.lke.v20231130.models.GenerateQARequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.GenerateQAResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("GenerateQA", params, headers=headers)
response = json.loads(body)
model = models.GenerateQAResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def GetAnswerTypeDataCount(self, request):
"""回答类型数据统计
:param request: Request instance for GetAnswerTypeDataCount.
:type request: :class:`tencentcloud.lke.v20231130.models.GetAnswerTypeDataCountRequest`
:rtype: :class:`tencentcloud.lke.v20231130.models.GetAnswerTypeDataCountResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("GetAnswerTypeDataCount", params, headers=headers)
response = json.loads(body)
model = models.GetAnswerTypeDataCountResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def GetAppKnowledgeCount(self, request):
"""获取模型列表