tccli 3.0.1219.1__py2.py3-none-any.whl → 3.0.1221.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/v20180419/api.json +1 -1
  3. tccli/services/cdb/v20170320/api.json +5 -5
  4. tccli/services/cdb/v20170320/examples.json +2 -2
  5. tccli/services/cdn/v20180606/api.json +3 -3
  6. tccli/services/cdwch/cdwch_client.py +53 -0
  7. tccli/services/cdwch/v20200915/api.json +100 -0
  8. tccli/services/cdwch/v20200915/examples.json +8 -0
  9. tccli/services/cdwdoris/v20211228/api.json +40 -0
  10. tccli/services/cfg/cfg_client.py +57 -4
  11. tccli/services/cfg/v20210820/api.json +113 -0
  12. tccli/services/cfg/v20210820/examples.json +8 -0
  13. tccli/services/cls/v20201016/api.json +14 -0
  14. tccli/services/cynosdb/v20190107/api.json +22 -2
  15. tccli/services/ess/v20201111/api.json +10 -1
  16. tccli/services/essbasic/v20210526/api.json +21 -3
  17. tccli/services/lke/lke_client.py +53 -0
  18. tccli/services/lke/v20231130/api.json +114 -0
  19. tccli/services/lke/v20231130/examples.json +8 -0
  20. tccli/services/market/v20191010/api.json +3 -3
  21. tccli/services/mps/mps_client.py +53 -0
  22. tccli/services/mps/v20190612/api.json +144 -0
  23. tccli/services/mps/v20190612/examples.json +8 -0
  24. tccli/services/ocr/v20181119/api.json +10 -0
  25. tccli/services/svp/v20240125/api.json +4 -4
  26. tccli/services/thpc/v20230321/api.json +2 -2
  27. tccli/services/trtc/v20190722/api.json +1 -1
  28. tccli/services/tse/v20201207/api.json +115 -98
  29. tccli/services/tse/v20201207/examples.json +44 -44
  30. tccli/services/vpc/v20170312/api.json +13 -16
  31. tccli/services/vpc/v20170312/examples.json +1 -1
  32. tccli/services/wedata/v20210820/api.json +47 -2
  33. tccli/services/wedata/v20210820/examples.json +1 -1
  34. {tccli-3.0.1219.1.dist-info → tccli-3.0.1221.1.dist-info}/METADATA +2 -2
  35. {tccli-3.0.1219.1.dist-info → tccli-3.0.1221.1.dist-info}/RECORD +38 -38
  36. {tccli-3.0.1219.1.dist-info → tccli-3.0.1221.1.dist-info}/WHEEL +0 -0
  37. {tccli-3.0.1219.1.dist-info → tccli-3.0.1221.1.dist-info}/entry_points.txt +0 -0
  38. {tccli-3.0.1219.1.dist-info → tccli-3.0.1221.1.dist-info}/license_files/LICENSE +0 -0
@@ -10537,6 +10537,7 @@
10537
10537
  "example": "json_log",
10538
10538
  "member": "string",
10539
10539
  "name": "RechargeType",
10540
+ "output_required": true,
10540
10541
  "required": true,
10541
10542
  "type": "string",
10542
10543
  "value_allowed_null": false
@@ -10547,6 +10548,7 @@
10547
10548
  "example": "0",
10548
10549
  "member": "uint64",
10549
10550
  "name": "EncodingFormat",
10551
+ "output_required": true,
10550
10552
  "required": true,
10551
10553
  "type": "int",
10552
10554
  "value_allowed_null": false
@@ -10557,6 +10559,7 @@
10557
10559
  "example": "true",
10558
10560
  "member": "bool",
10559
10561
  "name": "DefaultTimeSwitch",
10562
+ "output_required": true,
10560
10563
  "required": true,
10561
10564
  "type": "bool",
10562
10565
  "value_allowed_null": false
@@ -10567,6 +10570,7 @@
10567
10570
  "example": "无",
10568
10571
  "member": "string",
10569
10572
  "name": "LogRegex",
10573
+ "output_required": true,
10570
10574
  "required": false,
10571
10575
  "type": "string",
10572
10576
  "value_allowed_null": true
@@ -10577,6 +10581,7 @@
10577
10581
  "example": "true",
10578
10582
  "member": "bool",
10579
10583
  "name": "UnMatchLogSwitch",
10584
+ "output_required": true,
10580
10585
  "required": false,
10581
10586
  "type": "bool",
10582
10587
  "value_allowed_null": false
@@ -10587,6 +10592,7 @@
10587
10592
  "example": "LogParseFailure",
10588
10593
  "member": "string",
10589
10594
  "name": "UnMatchLogKey",
10595
+ "output_required": true,
10590
10596
  "required": false,
10591
10597
  "type": "string",
10592
10598
  "value_allowed_null": true
@@ -10597,6 +10603,7 @@
10597
10603
  "example": "无",
10598
10604
  "member": "uint64",
10599
10605
  "name": "UnMatchLogTimeSrc",
10606
+ "output_required": true,
10600
10607
  "required": false,
10601
10608
  "type": "int",
10602
10609
  "value_allowed_null": true
@@ -10607,6 +10614,7 @@
10607
10614
  "example": "0",
10608
10615
  "member": "uint64",
10609
10616
  "name": "DefaultTimeSrc",
10617
+ "output_required": true,
10610
10618
  "required": false,
10611
10619
  "type": "int",
10612
10620
  "value_allowed_null": true
@@ -10617,6 +10625,7 @@
10617
10625
  "example": "无",
10618
10626
  "member": "string",
10619
10627
  "name": "TimeKey",
10628
+ "output_required": true,
10620
10629
  "required": false,
10621
10630
  "type": "string",
10622
10631
  "value_allowed_null": true
@@ -10627,6 +10636,7 @@
10627
10636
  "example": "无",
10628
10637
  "member": "string",
10629
10638
  "name": "TimeRegex",
10639
+ "output_required": true,
10630
10640
  "required": false,
10631
10641
  "type": "string",
10632
10642
  "value_allowed_null": true
@@ -10637,6 +10647,7 @@
10637
10647
  "example": "无",
10638
10648
  "member": "string",
10639
10649
  "name": "TimeFormat",
10650
+ "output_required": true,
10640
10651
  "required": false,
10641
10652
  "type": "string",
10642
10653
  "value_allowed_null": true
@@ -10647,6 +10658,7 @@
10647
10658
  "example": "无",
10648
10659
  "member": "string",
10649
10660
  "name": "TimeZone",
10661
+ "output_required": true,
10650
10662
  "required": false,
10651
10663
  "type": "string",
10652
10664
  "value_allowed_null": true
@@ -10657,6 +10669,7 @@
10657
10669
  "example": "无",
10658
10670
  "member": "string",
10659
10671
  "name": "Metadata",
10672
+ "output_required": true,
10660
10673
  "required": false,
10661
10674
  "type": "list",
10662
10675
  "value_allowed_null": true
@@ -10667,6 +10680,7 @@
10667
10680
  "example": "无",
10668
10681
  "member": "string",
10669
10682
  "name": "Keys",
10683
+ "output_required": true,
10670
10684
  "required": false,
10671
10685
  "type": "list",
10672
10686
  "value_allowed_null": true
@@ -3424,6 +3424,16 @@
3424
3424
  "output_required": false,
3425
3425
  "type": "string",
3426
3426
  "value_allowed_null": true
3427
+ },
3428
+ {
3429
+ "disabled": false,
3430
+ "document": "数据库类型",
3431
+ "example": "无",
3432
+ "member": "string",
3433
+ "name": "DbMode",
3434
+ "output_required": false,
3435
+ "type": "string",
3436
+ "value_allowed_null": false
3427
3437
  }
3428
3438
  ],
3429
3439
  "usage": "out"
@@ -5786,8 +5796,8 @@
5786
5796
  },
5787
5797
  {
5788
5798
  "disabled": false,
5789
- "document": "数据库类型,normal,serverless\n注意:此字段可能返回 null,表示取不到有效值。",
5790
- "example": "normal",
5799
+ "document": "Db类型:<li>NORMAL</li><li>SERVERLESS</li>\n注意:此字段可能返回 null,表示取不到有效值。",
5800
+ "example": "NORMAL",
5791
5801
  "member": "string",
5792
5802
  "name": "DbMode",
5793
5803
  "output_required": true,
@@ -7031,6 +7041,16 @@
7031
7041
  "output_required": true,
7032
7042
  "type": "float",
7033
7043
  "value_allowed_null": false
7044
+ },
7045
+ {
7046
+ "disabled": false,
7047
+ "document": "Db类型:<li>NORMAL</li><li>SERVERLESS</li>\n注意:此字段可能返回 null,表示取不到有效值。",
7048
+ "example": "NORMAL",
7049
+ "member": "string",
7050
+ "name": "DbMode",
7051
+ "output_required": false,
7052
+ "type": "string",
7053
+ "value_allowed_null": true
7034
7054
  }
7035
7055
  ],
7036
7056
  "usage": "out"
@@ -2324,7 +2324,7 @@
2324
2324
  },
2325
2325
  {
2326
2326
  "disabled": false,
2327
- "document": "初始化操作类型\n<ul><li>CREATE_SEAL : 创建印章</li>\n<li>AUTH_JOIN_ORGANIZATION_GROUP : 加入集团企业</li>\n<li>OPEN_AUTO_SIGN :开通企业自动签署</li></ul>",
2327
+ "document": "初始化操作类型\n<ul>\n<li>CREATE_SEAL : 创建印章</li>\n<li>AUTH_JOIN_ORGANIZATION_GROUP : 加入集团企业</li>\n<li>OPEN_AUTO_SIGN :开通企业自动签署</li>\n<li>PARTNER_AUTO_SIGN_AUTH :合作方企业授权自动签</li>\n</ul>",
2328
2328
  "example": "无",
2329
2329
  "member": "string",
2330
2330
  "name": "OperateTypes",
@@ -2348,6 +2348,15 @@
2348
2348
  "name": "Agent",
2349
2349
  "required": false,
2350
2350
  "type": "object"
2351
+ },
2352
+ {
2353
+ "disabled": false,
2354
+ "document": "被授权的合作方企业在电子签的企业电子签账号,当操作类型包含 PARTNER_AUTO_SIGN_AUTH (合作方企业授权自动签)时必传。\n\n企业电子签账号可在[电子签的网页端](https://qian.tencent.com/console/company-settings/company-center) ,于企业设置-企业信息菜单栏下复制获取。\n\n![企业电子签账号](https://qcloudimg.tencent-cloud.cn/raw/4e6b30ee92f00671f7f1c5bd127c27db.png)",
2355
+ "example": "无",
2356
+ "member": "string",
2357
+ "name": "AuthorizedOrganizationId",
2358
+ "required": false,
2359
+ "type": "string"
2351
2360
  }
2352
2361
  ],
2353
2362
  "type": "object"
@@ -246,7 +246,7 @@
246
246
  "status": "online"
247
247
  },
248
248
  "ChannelDescribeFlowComponents": {
249
- "document": "您可以通过合同流程ID查询相关的<font color=\"red\"><b>填写控件</b></font>信息及其内容。这包括控件的归属方、控件的填写状态(是否已填写)以及具体的填写内容。\n\n无论是<font color=\"red\"><b>发起方还是签署方</b></font>填写的控件,均包含在查询结果中。\n\n![image](https://qcloudimg.tencent-cloud.cn/raw/08f6ea50d3ae88b51c280c2b17c2a126.png)\n### 2. 那些控件会出现在结果里边? \n**A.不返回的控件类型:**\n- 动态表格\n- 附件控件\n- 水印控件\n\n**B.返回的控件类型:**\n- 单行文本\n- 多行文本\n- 勾选框控件\n- 数字控件\n- 日期控件\n- 图片控件(图片下载地址)\n- 邮箱控件\n- 地址控件\n- 学历控件\n- 性别控件\n- 省市区控件\n\n### 3.怎么授权? \n\n此接口需要授权, 有两种开通权限的途径\n\n**第一种**: 需第三方应用的子企业登录控制台进行授权, 授权在**企业中心**的**授权管理**区域, 界面如下图\n授权过程需要**子企业超管**扫描跳转到电子签小程序签署<<渠道端下载渠道子客合同功能授权委托书>>\n\n![image](https://qcloudimg.tencent-cloud.cn/raw/8b483dfebdeafac85051279406944048.png)\n\n**第二种**: 第三方应用的配置接口打开全第三个应用下的所有自己起开通, 需要**渠道方企业的超管**扫描二维码跳转到电子签小程序签署 <<渠道端下载渠道子客合同功能开通知情同意书>>\n![image](https://qcloudimg.tencent-cloud.cn/raw/238979ef51dd381ccbdbc755a593debc/channel_DescribeResourceUrlsByFlows_appilications2.png)",
249
+ "document": "您可以通过合同流程ID查询相关的<font color=\"red\"><b>填写控件</b></font>信息及其内容。这包括控件的归属方、控件的填写状态(是否已填写)以及具体的填写内容。\n\n无论是<font color=\"red\"><b>发起方还是签署方</b></font>填写的控件,均包含在查询结果中。\n\n![image](https://qcloudimg.tencent-cloud.cn/raw/08f6ea50d3ae88b51c280c2b17c2a126.png)\n### 2. 哪些控件会出现在结果里边? \n**A.不返回的控件类型:**\n- 动态表格\n- 附件控件\n- 水印控件\n\n**B.返回的控件类型:**\n- 单行文本\n- 多行文本\n- 勾选框控件\n- 数字控件\n- 日期控件\n- 图片控件(图片下载地址)\n- 邮箱控件\n- 地址控件\n- 学历控件\n- 性别控件\n- 省市区控件\n\n### 3.怎么授权? \n\n此接口需要授权, 有两种开通权限的途径\n\n**第一种**: 需第三方应用的子企业登录控制台进行授权, 授权在**企业中心**的**授权管理**区域, 界面如下图\n授权过程需要**子企业超管**扫描跳转到电子签小程序签署<<渠道端下载渠道子客合同功能授权委托书>>\n\n![image](https://qcloudimg.tencent-cloud.cn/raw/8b483dfebdeafac85051279406944048.png)\n\n**第二种**: 第三方应用的配置接口打开全第三个应用下的所有自己起开通, 需要**渠道方企业的超管**扫描二维码跳转到电子签小程序签署 <<渠道端下载渠道子客合同功能开通知情同意书>>\n![image](https://qcloudimg.tencent-cloud.cn/raw/238979ef51dd381ccbdbc755a593debc/channel_DescribeResourceUrlsByFlows_appilications2.png)",
250
250
  "input": "ChannelDescribeFlowComponentsRequest",
251
251
  "name": "获取合同填写控件内容",
252
252
  "output": "ChannelDescribeFlowComponentsResponse",
@@ -6074,7 +6074,7 @@
6074
6074
  },
6075
6075
  {
6076
6076
  "disabled": false,
6077
- "document": "初始化操作类型\n<ul><li>CREATE_SEAL : 创建印章</li>\n<li>OPEN_AUTO_SIGN :开通企业自动签署</li></ul>",
6077
+ "document": "初始化操作类型\n<ul>\n<li>CREATE_SEAL : 创建印章</li>\n<li>OPEN_AUTO_SIGN :开通企业自动签署</li>\n<li>PARTNER_AUTO_SIGN_AUTH :合作方企业或应用平台方授权自动签</li>\n</ul>",
6078
6078
  "example": "无",
6079
6079
  "member": "string",
6080
6080
  "name": "OperateTypes",
@@ -6089,6 +6089,24 @@
6089
6089
  "name": "ProxyOrganizationOpenIds",
6090
6090
  "required": true,
6091
6091
  "type": "list"
6092
+ },
6093
+ {
6094
+ "disabled": false,
6095
+ "document": "当操作类型包含 PARTNER_AUTO_SIGN_AUTH 且是给应用平台方授权自动签时传true。\n![image](https://qcloudimg.tencent-cloud.cn/raw/f9aba7c999a6d79ada20b4384520e120.png)",
6096
+ "example": "无",
6097
+ "member": "bool",
6098
+ "name": "IsAuthorizePlatformApplication",
6099
+ "required": false,
6100
+ "type": "bool"
6101
+ },
6102
+ {
6103
+ "disabled": false,
6104
+ "document": "被授权的合作方企业在第三方平台子客企业标识,即ProxyOrganizationOpenId,当操作类型包含 PARTNER_AUTO_SIGN_AUTH 且要进行合作方企业授权自动签时必传。\n\n\n",
6105
+ "example": "无",
6106
+ "member": "string",
6107
+ "name": "AuthorizedProxyOrganizationOpenId",
6108
+ "required": false,
6109
+ "type": "string"
6092
6110
  }
6093
6111
  ],
6094
6112
  "type": "object"
@@ -8522,7 +8540,7 @@
8522
8540
  },
8523
8541
  {
8524
8542
  "disabled": false,
8525
- "document": "是否获取模板的PDF文件链接。\n\n<ul><li>**false**:不获取(默认)</li>\n<li>**true**:获取</li></ul>\n\n设置为true之后, 返回参数PdfUrl,为模板PDF文件链接,有效期5分钟, 可以用于将PDF文件下载到本地\n\n注: `此功能为白名单功能,使用前请联系对接的客户经理沟通。`",
8543
+ "document": "是否获取模板的PDF文件链接。\n\n<ul><li>**false**:不获取(默认)</li>\n<li>**true**:获取</li></ul>\n\n设置为true之后, 返回参数PdfUrl,为模板PDF文件链接,有效期5分钟, 可以用于将PDF文件下载到本地\n\n注: `此功能需要开通功能白名单【第三方应用集成企业获取模版PDF下载链接】,使用前请联系对接的客户经理沟通。`",
8526
8544
  "example": "无",
8527
8545
  "member": "bool",
8528
8546
  "name": "WithPdfUrl",
@@ -745,6 +745,58 @@ def doListRejectedQuestionPreview(args, parsed_globals):
745
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
746
 
747
747
 
748
+ def doRunReRank(args, parsed_globals):
749
+ g_param = parse_global_arg(parsed_globals)
750
+
751
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
752
+ cred = credential.CVMRoleCredential()
753
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
754
+ cred = credential.STSAssumeRoleCredential(
755
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
756
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
757
+ )
758
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
759
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
760
+ else:
761
+ cred = credential.Credential(
762
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
763
+ )
764
+ http_profile = HttpProfile(
765
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
766
+ reqMethod="POST",
767
+ endpoint=g_param[OptionsDefine.Endpoint],
768
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
769
+ )
770
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
771
+ if g_param[OptionsDefine.Language]:
772
+ profile.language = g_param[OptionsDefine.Language]
773
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
774
+ client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
775
+ client._sdkVersion += ("_CLI_" + __version__)
776
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
+ model = models.RunReRankRequest()
778
+ model.from_json_string(json.dumps(args))
779
+ start_time = time.time()
780
+ while True:
781
+ rsp = client.RunReRank(model)
782
+ result = rsp.to_json_string()
783
+ try:
784
+ json_obj = json.loads(result)
785
+ except TypeError as e:
786
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
787
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
788
+ break
789
+ cur_time = time.time()
790
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
791
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
792
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
793
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
794
+ else:
795
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
796
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
797
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
798
+
799
+
748
800
  def doRetryDocParse(args, parsed_globals):
749
801
  g_param = parse_global_arg(parsed_globals)
750
802
 
@@ -4722,6 +4774,7 @@ ACTION_MAP = {
4722
4774
  "GenerateQA": doGenerateQA,
4723
4775
  "DescribeAttributeLabel": doDescribeAttributeLabel,
4724
4776
  "ListRejectedQuestionPreview": doListRejectedQuestionPreview,
4777
+ "RunReRank": doRunReRank,
4725
4778
  "RetryDocParse": doRetryDocParse,
4726
4779
  "CreateQA": doCreateQA,
4727
4780
  "DescribeTokenUsageGraph": doDescribeTokenUsageGraph,
@@ -602,6 +602,13 @@
602
602
  "output": "RetryReleaseResponse",
603
603
  "status": "online"
604
604
  },
605
+ "RunReRank": {
606
+ "document": "重排序",
607
+ "input": "RunReRankRequest",
608
+ "name": "重排序",
609
+ "output": "RunReRankResponse",
610
+ "status": "online"
611
+ },
605
612
  "SaveDoc": {
606
613
  "document": "保存文档",
607
614
  "input": "SaveDocRequest",
@@ -10500,6 +10507,30 @@
10500
10507
  ],
10501
10508
  "type": "object"
10502
10509
  },
10510
+ "ReRankDataObject": {
10511
+ "document": "重排数据, 计算2段内容的关联性",
10512
+ "members": [
10513
+ {
10514
+ "disabled": false,
10515
+ "document": "第一段内容",
10516
+ "example": "hello",
10517
+ "member": "string",
10518
+ "name": "PromptA",
10519
+ "required": true,
10520
+ "type": "string"
10521
+ },
10522
+ {
10523
+ "disabled": false,
10524
+ "document": "第二段内容",
10525
+ "example": "world",
10526
+ "member": "string",
10527
+ "name": "PromptB",
10528
+ "required": true,
10529
+ "type": "string"
10530
+ }
10531
+ ],
10532
+ "usage": "in"
10533
+ },
10503
10534
  "ReconstructDocumentConfig": {
10504
10535
  "document": "ReconstructDocument配置选项",
10505
10536
  "members": [
@@ -11394,6 +11425,89 @@
11394
11425
  ],
11395
11426
  "usage": "both"
11396
11427
  },
11428
+ "RunReRankRequest": {
11429
+ "document": "RunReRank请求参数结构体",
11430
+ "members": [
11431
+ {
11432
+ "disabled": false,
11433
+ "document": "模型名称, 必填,默认: lke-reranker-base",
11434
+ "example": "lke-reranker-base",
11435
+ "member": "string",
11436
+ "name": "Query",
11437
+ "required": false,
11438
+ "type": "string"
11439
+ },
11440
+ {
11441
+ "disabled": false,
11442
+ "document": "文档列表,必填,最多20个",
11443
+ "example": "[\"腾讯知识引擎\",\"知识引擎大模型\"]",
11444
+ "member": "string",
11445
+ "name": "Docs",
11446
+ "required": false,
11447
+ "type": "list"
11448
+ },
11449
+ {
11450
+ "disabled": false,
11451
+ "document": "模型名称, 非必填,默认: lke-reranker-base",
11452
+ "example": "lke-reranker-base",
11453
+ "member": "string",
11454
+ "name": "Model",
11455
+ "required": false,
11456
+ "type": "string"
11457
+ },
11458
+ {
11459
+ "disabled": true,
11460
+ "document": "需要计算关联性的2段内容",
11461
+ "example": "[{\"PromptA\":\"hello\",\"PromptB\":\"world\"},{\"PromptA\":\"hello\",\"PromptB\":\"世界\"}]",
11462
+ "member": "ReRankDataObject",
11463
+ "name": "DataList",
11464
+ "required": false,
11465
+ "type": "list"
11466
+ },
11467
+ {
11468
+ "disabled": true,
11469
+ "document": "是否在线, 后台异步任务使用离线, 实时任务使用在线, 默认值: false",
11470
+ "example": "false",
11471
+ "member": "bool",
11472
+ "name": "Online",
11473
+ "required": false,
11474
+ "type": "bool"
11475
+ }
11476
+ ],
11477
+ "type": "object"
11478
+ },
11479
+ "RunReRankResponse": {
11480
+ "document": "RunReRank返回参数结构体",
11481
+ "members": [
11482
+ {
11483
+ "disabled": false,
11484
+ "document": "相关性, 数值越大越相关",
11485
+ "example": "[-19.681953, -19.414124]",
11486
+ "member": "float",
11487
+ "name": "ScoreList",
11488
+ "output_required": true,
11489
+ "type": "list",
11490
+ "value_allowed_null": false
11491
+ },
11492
+ {
11493
+ "disabled": false,
11494
+ "document": "消耗量,仅返回TotalToken",
11495
+ "example": "{\"TotalTokens\":3}",
11496
+ "member": "Usage",
11497
+ "name": "Usage",
11498
+ "output_required": false,
11499
+ "type": "object",
11500
+ "value_allowed_null": false
11501
+ },
11502
+ {
11503
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
11504
+ "member": "string",
11505
+ "name": "RequestId",
11506
+ "type": "string"
11507
+ }
11508
+ ],
11509
+ "type": "object"
11510
+ },
11397
11511
  "SaveDocRequest": {
11398
11512
  "document": "SaveDoc请求参数结构体",
11399
11513
  "members": [
@@ -700,6 +700,14 @@
700
700
  "title": "发布重试"
701
701
  }
702
702
  ],
703
+ "RunReRank": [
704
+ {
705
+ "document": "重排",
706
+ "input": "POST / HTTP/1.1\nHost: lke.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RunReRank\n<公共请求参数>\n\n{\n \"Query\": \"知识引擎大模型\",\n \"Docs\": [\n \"混元大模型\",\n \"腾讯知识引擎\"\n ]\n}",
707
+ "output": "{\n \"Response\": {\n \"RequestId\": \"766383fd-5219-4d13-aa1a-7ae00766640c\",\n \"ScoreList\": [\n -9.006162,\n 2.8577538\n ],\n \"Usage\": {\n \"TotalTokens\": 27\n }\n }\n}",
708
+ "title": "重排"
709
+ }
710
+ ],
703
711
  "SaveDoc": [
704
712
  {
705
713
  "document": "",
@@ -107,13 +107,13 @@
107
107
  },
108
108
  {
109
109
  "disabled": false,
110
- "document": "消息\n注意:此字段可能返回 null,表示取不到有效值。",
111
- "example": "",
110
+ "document": "消息",
111
+ "example": "流量已经用尽",
112
112
  "member": "string",
113
113
  "name": "Info",
114
114
  "output_required": true,
115
115
  "type": "string",
116
- "value_allowed_null": true
116
+ "value_allowed_null": false
117
117
  },
118
118
  {
119
119
  "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
@@ -2357,6 +2357,58 @@ def doStartStreamLinkFlow(args, parsed_globals):
2357
2357
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2358
2358
 
2359
2359
 
2360
+ def doProcessImage(args, parsed_globals):
2361
+ g_param = parse_global_arg(parsed_globals)
2362
+
2363
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2364
+ cred = credential.CVMRoleCredential()
2365
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2366
+ cred = credential.STSAssumeRoleCredential(
2367
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2368
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2369
+ )
2370
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2371
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2372
+ else:
2373
+ cred = credential.Credential(
2374
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2375
+ )
2376
+ http_profile = HttpProfile(
2377
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2378
+ reqMethod="POST",
2379
+ endpoint=g_param[OptionsDefine.Endpoint],
2380
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2381
+ )
2382
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2383
+ if g_param[OptionsDefine.Language]:
2384
+ profile.language = g_param[OptionsDefine.Language]
2385
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2386
+ client = mod.MpsClient(cred, g_param[OptionsDefine.Region], profile)
2387
+ client._sdkVersion += ("_CLI_" + __version__)
2388
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2389
+ model = models.ProcessImageRequest()
2390
+ model.from_json_string(json.dumps(args))
2391
+ start_time = time.time()
2392
+ while True:
2393
+ rsp = client.ProcessImage(model)
2394
+ result = rsp.to_json_string()
2395
+ try:
2396
+ json_obj = json.loads(result)
2397
+ except TypeError as e:
2398
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2399
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2400
+ break
2401
+ cur_time = time.time()
2402
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2403
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2404
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2405
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2406
+ else:
2407
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2408
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2409
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
+
2411
+
2360
2412
  def doModifyStreamLinkInput(args, parsed_globals):
2361
2413
  g_param = parse_global_arg(parsed_globals)
2362
2414
 
@@ -5689,6 +5741,7 @@ ACTION_MAP = {
5689
5741
  "DescribeTranscodeTemplates": doDescribeTranscodeTemplates,
5690
5742
  "DeleteStreamLinkFlow": doDeleteStreamLinkFlow,
5691
5743
  "StartStreamLinkFlow": doStartStreamLinkFlow,
5744
+ "ProcessImage": doProcessImage,
5692
5745
  "ModifyStreamLinkInput": doModifyStreamLinkInput,
5693
5746
  "DescribeStreamLinkRegions": doDescribeStreamLinkRegions,
5694
5747
  "DescribeSchedules": doDescribeSchedules,