tccli 3.0.1316.1__py2.py3-none-any.whl → 3.0.1317.1__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.
- tccli/__init__.py +1 -1
- tccli/services/batch/v20170312/api.json +1 -1
- tccli/services/cbs/v20170312/api.json +57 -58
- tccli/services/cbs/v20170312/examples.json +5 -5
- tccli/services/cdb/v20170320/api.json +9 -9
- tccli/services/cdb/v20170320/examples.json +12 -0
- tccli/services/cvm/v20170312/api.json +13 -13
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +24 -2
- tccli/services/dnspod/v20210323/api.json +85 -65
- tccli/services/dnspod/v20210323/examples.json +28 -28
- tccli/services/domain/v20180808/api.json +10 -10
- tccli/services/domain/v20180808/examples.json +1 -1
- tccli/services/es/v20180416/api.json +49 -0
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +82 -0
- tccli/services/ess/v20201111/examples.json +8 -0
- tccli/services/essbasic/v20210526/api.json +2 -2
- tccli/services/essbasic/v20210526/examples.json +9 -3
- tccli/services/hai/v20230812/api.json +1 -1
- tccli/services/lke/v20231130/api.json +11 -11
- tccli/services/lkeap/lkeap_client.py +53 -53
- tccli/services/lkeap/v20240522/api.json +90 -70
- tccli/services/lkeap/v20240522/examples.json +8 -8
- tccli/services/mps/v20190612/api.json +163 -0
- tccli/services/mps/v20190612/examples.json +1 -1
- tccli/services/mrs/v20200910/api.json +30 -0
- tccli/services/postgres/postgres_client.py +8 -61
- tccli/services/postgres/v20170312/api.json +0 -71
- tccli/services/postgres/v20170312/examples.json +0 -14
- tccli/services/privatedns/v20201028/api.json +2 -2
- tccli/services/tbaas/v20180416/api.json +3 -3
- tccli/services/tbaas/v20180416/examples.json +1 -1
- tccli/services/tcbr/v20220217/api.json +16 -16
- tccli/services/teo/v20220901/api.json +34 -6
- tccli/services/teo/v20220901/examples.json +1 -1
- tccli/services/tke/v20180525/api.json +6 -6
- tccli/services/tke/v20220501/api.json +61 -1
- tccli/services/tke/v20220501/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/waf/v20180125/api.json +78 -22
- {tccli-3.0.1316.1.dist-info → tccli-3.0.1317.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1316.1.dist-info → tccli-3.0.1317.1.dist-info}/RECORD +46 -46
- {tccli-3.0.1316.1.dist-info → tccli-3.0.1317.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1316.1.dist-info → tccli-3.0.1317.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1316.1.dist-info → tccli-3.0.1317.1.dist-info}/license_files/LICENSE +0 -0
@@ -385,6 +385,13 @@
|
|
385
385
|
"output": "CreateUserMobileChangeUrlResponse",
|
386
386
|
"status": "online"
|
387
387
|
},
|
388
|
+
"CreateUserNameChangeUrl": {
|
389
|
+
"document": "生成个人用户实名更名链接,个人用户点击此链接进入更名流程(若用户未完成实名认证,则直接进入实名页面实名后再进行更名)。此链接为通用链接,任何点击生成链接的用户将会被引导至小程序个人更名页面完成更名。\n\n注: 调用此接口需要购买<font color=\"red\"><b>单独的实名套餐包</b></font>。使用前请联系对接的客户经理沟通。",
|
390
|
+
"input": "CreateUserNameChangeUrlRequest",
|
391
|
+
"name": "生成个人更名链接",
|
392
|
+
"output": "CreateUserNameChangeUrlResponse",
|
393
|
+
"status": "online"
|
394
|
+
},
|
388
395
|
"CreateUserVerifyUrl": {
|
389
396
|
"document": "生成个人用户实名认证链接,个人用户点击此链接进入实名流程(若用户已完成实名认证,则直接进入成功页面)。\n\n注: 调用此接口需要购买<font color=\"red\"><b>单独的实名套餐包</b></font>。使用前请联系对接的客户经理沟通。",
|
390
397
|
"input": "CreateUserVerifyUrlRequest",
|
@@ -7951,6 +7958,81 @@
|
|
7951
7958
|
],
|
7952
7959
|
"type": "object"
|
7953
7960
|
},
|
7961
|
+
"CreateUserNameChangeUrlRequest": {
|
7962
|
+
"document": "CreateUserNameChangeUrl请求参数结构体",
|
7963
|
+
"members": [
|
7964
|
+
{
|
7965
|
+
"disabled": false,
|
7966
|
+
"document": "操作人信息",
|
7967
|
+
"example": "无",
|
7968
|
+
"member": "UserInfo",
|
7969
|
+
"name": "Operator",
|
7970
|
+
"required": true,
|
7971
|
+
"type": "object"
|
7972
|
+
},
|
7973
|
+
{
|
7974
|
+
"disabled": false,
|
7975
|
+
"document": "要跳转的链接类型\n\n<ul>\n<li><strong>HTTP</strong>:适用于短信通知或H5跳转的电子签小程序HTTP长链接</li>\n<li><strong>HTTP_SHORT_URL</strong>:适用于短信通知或H5跳转的电子签小程序HTTP短链接</li>\n<li><strong>APP</strong>:(默认类型)适用于第三方APP或小程序跳转的电子签小程序路径</li>\n</ul>\n\n注:如果不传递,默认值是 <font color=\"red\"> HTTP </font>",
|
7976
|
+
"example": "APP",
|
7977
|
+
"member": "string",
|
7978
|
+
"name": "Endpoint",
|
7979
|
+
"required": false,
|
7980
|
+
"type": "string"
|
7981
|
+
},
|
7982
|
+
{
|
7983
|
+
"disabled": false,
|
7984
|
+
"document": "在用户完成改名后,其自定义数据将通过[企业引导个人更名后回调](https://qian.tencent.com/developers/company/callback_types_staffs#%E5%8D%81%E5%85%AB-%E4%BC%81%E4%B8%9A%E5%BC%95%E5%AF%BC%E4%B8%AA%E4%BA%BA%E6%9B%B4%E5%90%8D%E5%90%8E%E5%9B%9E%E8%B0%83)返回,以便用户确认其个人数据信息。请注意,自定义数据的字符长度上限为1000,且必须采用base64编码格式。",
|
7985
|
+
"example": "MTIzNDU2Nzg5",
|
7986
|
+
"member": "string",
|
7987
|
+
"name": "UserData",
|
7988
|
+
"required": false,
|
7989
|
+
"type": "string"
|
7990
|
+
}
|
7991
|
+
],
|
7992
|
+
"type": "object"
|
7993
|
+
},
|
7994
|
+
"CreateUserNameChangeUrlResponse": {
|
7995
|
+
"document": "CreateUserNameChangeUrl返回参数结构体",
|
7996
|
+
"members": [
|
7997
|
+
{
|
7998
|
+
"disabled": false,
|
7999
|
+
"document": "腾讯电子签小程序的个人更名链接。\n如果没有传递,默认值是 HTTP。 链接的有效期均是 7 天。\n\n<strong>1.如果EndPoint是APP</strong>:\n得到的链接类似于<a href=\"\">pages/guide/index?to=MP_PERSONAL_VERIFY&shortKey=yDCZHUyOcExAlcOvNod0</a>, 用法可以参考描述中的\"跳转到小程序的实现\"\n\n<strong>2.如果EndPoint是HTTP</strong>:\n得到的链接类似于 <a href=\"\">https://res.ess.tencent.cn/cdn/h5-activity/jump-mp.html?to=TAG_VERIFY&shortKey=yDCZHUyOcChrfpaswT0d</a>,点击后会跳转到腾讯电子签小程序进行签署\n\n<strong>3.如果EndPoint是HTTP_SHORT_URL</strong>:\n得到的链接类似于<a href=\"\">https://essurl.cn/2n**42Nd</a>,点击后会跳转到腾讯电子签小程序进行签署\n\n\n`注:` <font color=\"red\">生成的链路后面不能再增加参数,防止出错重复参数覆盖原有的参数</font>",
|
8000
|
+
"example": "https://essurl.cn/2n**42Nd",
|
8001
|
+
"member": "string",
|
8002
|
+
"name": "UserVerifyUrl",
|
8003
|
+
"output_required": true,
|
8004
|
+
"type": "string",
|
8005
|
+
"value_allowed_null": false
|
8006
|
+
},
|
8007
|
+
{
|
8008
|
+
"disabled": false,
|
8009
|
+
"document": "链接过期时间,为Unix时间戳(单位为秒)。",
|
8010
|
+
"example": "1736416390",
|
8011
|
+
"member": "int64",
|
8012
|
+
"name": "ExpireTime",
|
8013
|
+
"output_required": true,
|
8014
|
+
"type": "int",
|
8015
|
+
"value_allowed_null": false
|
8016
|
+
},
|
8017
|
+
{
|
8018
|
+
"disabled": false,
|
8019
|
+
"document": "小程序appid,用于半屏拉起电子签小程序, 仅在 Endpoint 设置为 APP 的时候返回",
|
8020
|
+
"example": "gh_da88f6188665",
|
8021
|
+
"member": "string",
|
8022
|
+
"name": "MiniAppId",
|
8023
|
+
"output_required": true,
|
8024
|
+
"type": "string",
|
8025
|
+
"value_allowed_null": false
|
8026
|
+
},
|
8027
|
+
{
|
8028
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
8029
|
+
"member": "string",
|
8030
|
+
"name": "RequestId",
|
8031
|
+
"type": "string"
|
8032
|
+
}
|
8033
|
+
],
|
8034
|
+
"type": "object"
|
8035
|
+
},
|
7954
8036
|
"CreateUserVerifyUrlRequest": {
|
7955
8037
|
"document": "CreateUserVerifyUrl请求参数结构体",
|
7956
8038
|
"members": [
|
@@ -1256,6 +1256,14 @@
|
|
1256
1256
|
"title": "使用二要素生成修改员工手机号链接"
|
1257
1257
|
}
|
1258
1258
|
],
|
1259
|
+
"CreateUserNameChangeUrl": [
|
1260
|
+
{
|
1261
|
+
"document": "生成个人通用更名链接",
|
1262
|
+
"input": "POST / HTTP/1.1\nHost: ess.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateUserNameChangeUrl\n<公共请求参数>\n\n{\n \"Operator\": {\n \"UserId\": \"19561039c9***********32520fde6a\",\n \"ClientIp\": \"8.8.8.8\"\n },\n \"Endpoint\": \"HTTP\",\n \"UserData\": \"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5LCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=\"\n}",
|
1263
|
+
"output": "{\n \"Response\": {\n \"ExpireTime\": 1748247333,\n \"MiniAppId\": \"\",\n \"RequestId\": \"s1747642533895017639\",\n \"UserVerifyUrl\": \"https://res.ess.tencent.cn/cdn/h5-activity-dev/jump-mp.html?to=MP_PERSONAL_VERIFY&shortKey=yDttYU******bLXcb\"\n }\n}",
|
1264
|
+
"title": "生成个人更名链接"
|
1265
|
+
}
|
1266
|
+
],
|
1259
1267
|
"CreateUserVerifyUrl": [
|
1260
1268
|
{
|
1261
1269
|
"document": "获取c端用户实名链接",
|
@@ -9830,7 +9830,7 @@
|
|
9830
9830
|
},
|
9831
9831
|
{
|
9832
9832
|
"disabled": false,
|
9833
|
-
"document": "指定企业经办签署人OpenId",
|
9833
|
+
"document": "指定企业经办签署人OpenId\n\n注: `签署人OpenId未实名时,需要传入签署人姓名以及手机号码。`",
|
9834
9834
|
"example": "n9527",
|
9835
9835
|
"member": "string",
|
9836
9836
|
"name": "OpenId",
|
@@ -13448,7 +13448,7 @@
|
|
13448
13448
|
},
|
13449
13449
|
{
|
13450
13450
|
"disabled": false,
|
13451
|
-
"document": "
|
13451
|
+
"document": "二维码,在生成动态签署人跳转封面页链接时返回\n\n注:`此二维码下载链接有效期为5分钟,可下载二维码后本地保存。`",
|
13452
13452
|
"example": "https://file.test.ess.tencent.cn/bresource/resource/resource/0/0.JPG?hkey=5d**2f0db15e6b",
|
13453
13453
|
"member": "string",
|
13454
13454
|
"name": "SignQrcodeUrl",
|
@@ -236,10 +236,10 @@
|
|
236
236
|
],
|
237
237
|
"ChannelCreateFlowApprovers": [
|
238
238
|
{
|
239
|
-
"document": "在B2C签署中,双方签署方未指定具体签署人时,需要进行补充。 \n
|
240
|
-
"input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelCreateFlowApprovers\n<公共请求参数>\n\n{\n \"Operator\": {\n \"OpenId\": \"\",\n \"ClientIp\": \"\",\n \"CustomUserId\": \"\",\n \"ProxyIp\": \"\",\n \"Channel\": \"\"\n },\n \"Agent\": {\n \"ProxyAppId\": \"c17bdf9c2a7bdcb32611f4d0200fef3d\",\n \"ProxyOrganizationOpenId\": \"d7c13a8b81340cce9e3968c0ee248f04\",\n \"ProxyOperator\": {\n \"OpenId\": \"00498cc8500be9cxxxxxxx3aff766cac\"\n },\n \"AppId\": \"65fb0c591044be8a1f60aa382cc5ed0e\"\n },\n \"FlowId\": \"111111***22222\",\n \"FillApproverType\": 1,\n \"Approvers\": [\n {\n \"RecipientId\": \"yDRS4UUgygqdcj51UuO4zjEyWTmzsIAR\",\n \"ApproverName\": \"典子谦\",\n \"ApproverMobile\": \"13200000000\",\n \"OrganizationName\": \"***有限公司\",\n \"OrganizationOpenId\": \"org_diziqian\"\n },\n {\n \"RecipientId\": \"yDRS4UUgygqdcj2tUuO4zjEEFuP35Swc\",\n \"ApproverName\": \"张三\",\n \"ApproverMobile\": \"18888888888\"\n }\n ]\n}",
|
239
|
+
"document": "在B2C签署中,双方签署方未指定具体签署人时,需要进行补充。 \n注:\n`补充动态签署人时FillApproverType传值为1 `\n`子客企业签署人OpenId未实名的情况下,需要传入签署人姓名和手机号码(ApproverName和ApproverMobile)`",
|
240
|
+
"input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelCreateFlowApprovers\n<公共请求参数>\n\n{\n \"Operator\": {\n \"OpenId\": \"\",\n \"ClientIp\": \"\",\n \"CustomUserId\": \"\",\n \"ProxyIp\": \"\",\n \"Channel\": \"\"\n },\n \"Agent\": {\n \"ProxyAppId\": \"c17bdf9c2a7bdcb32611f4d0200fef3d\",\n \"ProxyOrganizationOpenId\": \"d7c13a8b81340cce9e3968c0ee248f04\",\n \"ProxyOperator\": {\n \"OpenId\": \"00498cc8500be9cxxxxxxx3aff766cac\"\n },\n \"AppId\": \"65fb0c591044be8a1f60aa382cc5ed0e\"\n },\n \"FlowId\": \"111111***22222\",\n \"FillApproverType\": 1,\n \"Approvers\": [\n {\n \"RecipientId\": \"yDRS4UUgygqdcj51UuO4zjEyWTmzsIAR\",\n \"ApproverName\": \"典子谦\",\n \"ApproverMobile\": \"13200000000\",\n \"OpenId\": \"zhangsan\",\n \"OrganizationName\": \"***有限公司\",\n \"OrganizationOpenId\": \"org_diziqian\"\n },\n {\n \"RecipientId\": \"yDRS4UUgygqdcj2tUuO4zjEEFuP35Swc\",\n \"ApproverName\": \"张三\",\n \"ApproverMobile\": \"18888888888\"\n }\n ]\n}",
|
241
241
|
"output": "{\n \"Response\": {\n \"RequestId\": \"5beb5f54-cf3d-4c26-a4ee-a97c85196a3e\"\n }\n}",
|
242
|
-
"title": "B2C
|
242
|
+
"title": "B2C签署,批量补充两方动态签署人信息,子客企业签署人未实名"
|
243
243
|
},
|
244
244
|
{
|
245
245
|
"document": "在B2C签署中,双方签署方未指定具体签署人时,需要进行补充。 \n注:`补充动态签署人时FillApproverType传值为1 `",
|
@@ -258,6 +258,12 @@
|
|
258
258
|
"input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelCreateFlowApprovers\n<公共请求参数>\n\n{\n \"Operator\": {\n \"OpenId\": \"\",\n \"ClientIp\": \"\",\n \"CustomUserId\": \"\",\n \"ProxyIp\": \"\",\n \"Channel\": \"\"\n },\n \"Agent\": {\n \"ProxyAppId\": \"c17bdf9c2a7bdcb32611f4d0200fef3d\",\n \"ProxyOrganizationOpenId\": \"d7c13a8b81340cce9e3968c0ee248f04\",\n \"ProxyOperator\": {\n \"OpenId\": \"00498cc8500be9cxxxxxxx3aff766cac\"\n },\n \"AppId\": \"65fb0c591044be8a1f60aa382cc5ed0e\"\n },\n \"FlowId\": \"111111***22222\",\n \"FillApproverType\": 1,\n \"Approvers\": [\n {\n \"RecipientId\": \"yDRS4UUgygqdcj2tUuO4zjEEFuP35Swc\",\n \"ApproverName\": \"张三\",\n \"ApproverIdCardType\": \"ID_CARD\",\n \"ApproverIdCardNumber\": \"620000198802020000\"\n }\n ]\n}",
|
259
259
|
"output": "{\n \"Response\": {\n \"RequestId\": \"5beb5f54-cf3d-4c26-a4ee-a97c85196a3e\"\n }\n}",
|
260
260
|
"title": "B2C签署,通过姓名和证件类型、证件号码补充已实名个人用户"
|
261
|
+
},
|
262
|
+
{
|
263
|
+
"document": "在B2C签署中,双方签署方未指定具体签署人时,需要进行补充。 \n注:\n`补充动态签署人时FillApproverType传值为1 `",
|
264
|
+
"input": "POST / HTTP/1.1\nHost: essbasic.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChannelCreateFlowApprovers\n<公共请求参数>\n\n{\n \"Operator\": {\n \"OpenId\": \"\",\n \"ClientIp\": \"\",\n \"CustomUserId\": \"\",\n \"ProxyIp\": \"\",\n \"Channel\": \"\"\n },\n \"Agent\": {\n \"ProxyAppId\": \"c17bdf9c2a7bdcb32611f4d0200fef3d\",\n \"ProxyOrganizationOpenId\": \"d7c13a8b81340cce9e3968c0ee248f04\",\n \"ProxyOperator\": {\n \"OpenId\": \"00498cc8500be9cxxxxxxx3aff766cac\"\n },\n \"AppId\": \"65fb0c591044be8a1f60aa382cc5ed0e\"\n },\n \"FlowId\": \"111111***22222\",\n \"FillApproverType\": 1,\n \"Approvers\": [\n {\n \"RecipientId\": \"yDRS4UUgygqdcj51UuO4zjEyWTmzsIAR\",\n \"OpenId\": \"zhangsan\",\n \"OrganizationName\": \"***有限公司\",\n \"OrganizationOpenId\": \"org_diziqian\"\n },\n {\n \"RecipientId\": \"yDRS4UUgygqdcj2tUuO4zjEEFuP35Swc\",\n \"ApproverName\": \"张三\",\n \"ApproverMobile\": \"18888888888\"\n }\n ]\n}",
|
265
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"5beb5f54-cf3d-4c26-a4ee-a97c85196a3e\"\n }\n}",
|
266
|
+
"title": "B2C签署,批量补充两方动态签署人信息,子客企业签署人已实名"
|
261
267
|
}
|
262
268
|
],
|
263
269
|
"ChannelCreateFlowByFiles": [
|
@@ -7213,7 +7213,7 @@
|
|
7213
7213
|
},
|
7214
7214
|
{
|
7215
7215
|
"disabled": false,
|
7216
|
-
"document": "数量, 数量需大于2",
|
7216
|
+
"document": "数量, 数量需大于2, 最大1000",
|
7217
7217
|
"example": "2",
|
7218
7218
|
"member": "uint64",
|
7219
7219
|
"name": "Count",
|
@@ -7229,15 +7229,6 @@
|
|
7229
7229
|
"required": true,
|
7230
7230
|
"type": "string"
|
7231
7231
|
},
|
7232
|
-
{
|
7233
|
-
"disabled": false,
|
7234
|
-
"document": "最后一条记录ID",
|
7235
|
-
"example": "无",
|
7236
|
-
"member": "string",
|
7237
|
-
"name": "LastRecordId",
|
7238
|
-
"required": false,
|
7239
|
-
"type": "string"
|
7240
|
-
},
|
7241
7232
|
{
|
7242
7233
|
"disabled": false,
|
7243
7234
|
"document": "应用AppKey, 当Type=5[API访客]时, 该字段必填 :</br> 获取方式:</br> 1、应用发布后在应用页面[发布管理]-[调用信息]-[API管理]处获取</br> 2、参考 https://cloud.tencent.com/document/product/1759/109469 第二项",
|
@@ -7258,7 +7249,16 @@
|
|
7258
7249
|
},
|
7259
7250
|
{
|
7260
7251
|
"disabled": false,
|
7261
|
-
"document": "
|
7252
|
+
"document": "最后一条记录ID, 消息从后往前获取\n\nMidRecordId与LastRecordId只能选择一个\n",
|
7253
|
+
"example": "无",
|
7254
|
+
"member": "string",
|
7255
|
+
"name": "LastRecordId",
|
7256
|
+
"required": false,
|
7257
|
+
"type": "string"
|
7258
|
+
},
|
7259
|
+
{
|
7260
|
+
"disabled": false,
|
7261
|
+
"document": "传该值,代表拉取该记录id的前后总共count条消息记录\n\nMidRecordId与LastRecordId只能选择一个\n",
|
7262
7262
|
"example": "无",
|
7263
7263
|
"member": "string",
|
7264
7264
|
"name": "MidRecordId",
|
@@ -173,6 +173,58 @@ def doGetReconstructDocumentResult(args, parsed_globals):
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
174
|
|
175
175
|
|
176
|
+
def doRetrieveKnowledgeRealtime(args, parsed_globals):
|
177
|
+
g_param = parse_global_arg(parsed_globals)
|
178
|
+
|
179
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
180
|
+
cred = credential.CVMRoleCredential()
|
181
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
182
|
+
cred = credential.STSAssumeRoleCredential(
|
183
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
184
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
185
|
+
)
|
186
|
+
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):
|
187
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
188
|
+
else:
|
189
|
+
cred = credential.Credential(
|
190
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
191
|
+
)
|
192
|
+
http_profile = HttpProfile(
|
193
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
194
|
+
reqMethod="POST",
|
195
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
196
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
197
|
+
)
|
198
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
199
|
+
if g_param[OptionsDefine.Language]:
|
200
|
+
profile.language = g_param[OptionsDefine.Language]
|
201
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
202
|
+
client = mod.LkeapClient(cred, g_param[OptionsDefine.Region], profile)
|
203
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
204
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
+
model = models.RetrieveKnowledgeRealtimeRequest()
|
206
|
+
model.from_json_string(json.dumps(args))
|
207
|
+
start_time = time.time()
|
208
|
+
while True:
|
209
|
+
rsp = client.RetrieveKnowledgeRealtime(model)
|
210
|
+
result = rsp.to_json_string()
|
211
|
+
try:
|
212
|
+
json_obj = json.loads(result)
|
213
|
+
except TypeError as e:
|
214
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
215
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
216
|
+
break
|
217
|
+
cur_time = time.time()
|
218
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
219
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
220
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
221
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
222
|
+
else:
|
223
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
224
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
225
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
|
+
|
227
|
+
|
176
228
|
def doGetSplitDocumentResult(args, parsed_globals):
|
177
229
|
g_param = parse_global_arg(parsed_globals)
|
178
230
|
|
@@ -1265,58 +1317,6 @@ def doGetCharacterUsage(args, parsed_globals):
|
|
1265
1317
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1266
1318
|
|
1267
1319
|
|
1268
|
-
def doUploadDocRealtime(args, parsed_globals):
|
1269
|
-
g_param = parse_global_arg(parsed_globals)
|
1270
|
-
|
1271
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1272
|
-
cred = credential.CVMRoleCredential()
|
1273
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1274
|
-
cred = credential.STSAssumeRoleCredential(
|
1275
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1276
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1277
|
-
)
|
1278
|
-
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):
|
1279
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1280
|
-
else:
|
1281
|
-
cred = credential.Credential(
|
1282
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1283
|
-
)
|
1284
|
-
http_profile = HttpProfile(
|
1285
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1286
|
-
reqMethod="POST",
|
1287
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
1288
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1289
|
-
)
|
1290
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1291
|
-
if g_param[OptionsDefine.Language]:
|
1292
|
-
profile.language = g_param[OptionsDefine.Language]
|
1293
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1294
|
-
client = mod.LkeapClient(cred, g_param[OptionsDefine.Region], profile)
|
1295
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
1296
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1297
|
-
model = models.UploadDocRealtimeRequest()
|
1298
|
-
model.from_json_string(json.dumps(args))
|
1299
|
-
start_time = time.time()
|
1300
|
-
while True:
|
1301
|
-
rsp = client.UploadDocRealtime(model)
|
1302
|
-
result = rsp.to_json_string()
|
1303
|
-
try:
|
1304
|
-
json_obj = json.loads(result)
|
1305
|
-
except TypeError as e:
|
1306
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1307
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1308
|
-
break
|
1309
|
-
cur_time = time.time()
|
1310
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1311
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1312
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1313
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1314
|
-
else:
|
1315
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1316
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1317
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1318
|
-
|
1319
|
-
|
1320
1320
|
def doUploadDoc(args, parsed_globals):
|
1321
1321
|
g_param = parse_global_arg(parsed_globals)
|
1322
1322
|
|
@@ -1435,6 +1435,7 @@ ACTION_MAP = {
|
|
1435
1435
|
"RetrieveKnowledge": doRetrieveKnowledge,
|
1436
1436
|
"ModifyQA": doModifyQA,
|
1437
1437
|
"GetReconstructDocumentResult": doGetReconstructDocumentResult,
|
1438
|
+
"RetrieveKnowledgeRealtime": doRetrieveKnowledgeRealtime,
|
1438
1439
|
"GetSplitDocumentResult": doGetSplitDocumentResult,
|
1439
1440
|
"DescribeDoc": doDescribeDoc,
|
1440
1441
|
"ReconstructDocumentSSE": doReconstructDocumentSSE,
|
@@ -1456,7 +1457,6 @@ ACTION_MAP = {
|
|
1456
1457
|
"DeleteKnowledgeBase": doDeleteKnowledgeBase,
|
1457
1458
|
"CreateSplitDocumentFlow": doCreateSplitDocumentFlow,
|
1458
1459
|
"GetCharacterUsage": doGetCharacterUsage,
|
1459
|
-
"UploadDocRealtime": doUploadDocRealtime,
|
1460
1460
|
"UploadDoc": doUploadDoc,
|
1461
1461
|
"ChatCompletions": doChatCompletions,
|
1462
1462
|
|
@@ -168,6 +168,13 @@
|
|
168
168
|
"output": "RetrieveKnowledgeResponse",
|
169
169
|
"status": "online"
|
170
170
|
},
|
171
|
+
"RetrieveKnowledgeRealtime": {
|
172
|
+
"document": "用于实时检索在UploadDocRealtime接口上传的实时文档内容。 使用场景:适用于在会话中对文档进行问答的场景",
|
173
|
+
"input": "RetrieveKnowledgeRealtimeRequest",
|
174
|
+
"name": "实时检索知识库内容",
|
175
|
+
"output": "RetrieveKnowledgeRealtimeResponse",
|
176
|
+
"status": "online"
|
177
|
+
},
|
171
178
|
"RunRerank": {
|
172
179
|
"document": "基于知识引擎精调模型技术的rerank模型,支持对多路召回的结果进行重排序,根据query与切片内容的相关性,按分数由高到低对切片进行排序,并输出对应的打分结果。",
|
173
180
|
"input": "RunRerankRequest",
|
@@ -181,13 +188,6 @@
|
|
181
188
|
"name": "上传文档",
|
182
189
|
"output": "UploadDocResponse",
|
183
190
|
"status": "online"
|
184
|
-
},
|
185
|
-
"UploadDocRealtime": {
|
186
|
-
"document": "用于上传实时文档内容。\n实时文档在上传后可以立即通过SearchRealtime进行实时检索,适用于在会话中对文档进行问答的场景。",
|
187
|
-
"input": "UploadDocRealtimeRequest",
|
188
|
-
"name": "实时文档上传",
|
189
|
-
"output": "UploadDocRealtimeResponse",
|
190
|
-
"status": "online"
|
191
191
|
}
|
192
192
|
},
|
193
193
|
"metadata": {
|
@@ -2371,6 +2371,89 @@
|
|
2371
2371
|
],
|
2372
2372
|
"usage": "in"
|
2373
2373
|
},
|
2374
|
+
"RetrieveKnowledgeRealtimeRequest": {
|
2375
|
+
"document": "RetrieveKnowledgeRealtime请求参数结构体",
|
2376
|
+
"members": [
|
2377
|
+
{
|
2378
|
+
"disabled": false,
|
2379
|
+
"document": "知识库ID。",
|
2380
|
+
"example": "1840331836752986944",
|
2381
|
+
"member": "string",
|
2382
|
+
"name": "KnowledgeBaseId",
|
2383
|
+
"required": true,
|
2384
|
+
"type": "string"
|
2385
|
+
},
|
2386
|
+
{
|
2387
|
+
"disabled": false,
|
2388
|
+
"document": "用于检索的文本。",
|
2389
|
+
"example": "国庆放几天假",
|
2390
|
+
"member": "string",
|
2391
|
+
"name": "Query",
|
2392
|
+
"required": true,
|
2393
|
+
"type": "string"
|
2394
|
+
},
|
2395
|
+
{
|
2396
|
+
"disabled": false,
|
2397
|
+
"document": "实时文件ID列表。",
|
2398
|
+
"example": "[\"1828720159590123264\"]",
|
2399
|
+
"member": "string",
|
2400
|
+
"name": "DocIds",
|
2401
|
+
"required": false,
|
2402
|
+
"type": "list"
|
2403
|
+
},
|
2404
|
+
{
|
2405
|
+
"disabled": false,
|
2406
|
+
"document": "检索方法,默认使用`HYBRID`混合检索。\n- `SEMANTIC`:语义检索\n- `FULL_TEXT`:全文检索\n- `HYBRID`:混合检索",
|
2407
|
+
"example": "SEMANTIC",
|
2408
|
+
"member": "string",
|
2409
|
+
"name": "RetrievalMethod",
|
2410
|
+
"required": false,
|
2411
|
+
"type": "string"
|
2412
|
+
},
|
2413
|
+
{
|
2414
|
+
"disabled": false,
|
2415
|
+
"document": "检索设置。",
|
2416
|
+
"example": "{\"TopK\":3,\"ScoreThreshold\":0.7}",
|
2417
|
+
"member": "RetrievalSetting",
|
2418
|
+
"name": "RetrievalSetting",
|
2419
|
+
"required": false,
|
2420
|
+
"type": "object"
|
2421
|
+
}
|
2422
|
+
],
|
2423
|
+
"type": "object"
|
2424
|
+
},
|
2425
|
+
"RetrieveKnowledgeRealtimeResponse": {
|
2426
|
+
"document": "RetrieveKnowledgeRealtime返回参数结构体",
|
2427
|
+
"members": [
|
2428
|
+
{
|
2429
|
+
"disabled": false,
|
2430
|
+
"document": "检索结果",
|
2431
|
+
"example": "[{\"Metadata\":{\"Type\":\"DOC\",\"ResultSource\":\"SEMANTIC\",\"ChunkPageNumbers\":[1,2]},\"Score\":0,\"Title\":\"example.pdf\",\"Content\":\"国庆放7天假\"}]",
|
2432
|
+
"member": "RetrievalRecord",
|
2433
|
+
"name": "Records",
|
2434
|
+
"output_required": false,
|
2435
|
+
"type": "list",
|
2436
|
+
"value_allowed_null": false
|
2437
|
+
},
|
2438
|
+
{
|
2439
|
+
"disabled": false,
|
2440
|
+
"document": "检索结果数量",
|
2441
|
+
"example": "3",
|
2442
|
+
"member": "uint64",
|
2443
|
+
"name": "TotalCount",
|
2444
|
+
"output_required": false,
|
2445
|
+
"type": "int",
|
2446
|
+
"value_allowed_null": false
|
2447
|
+
},
|
2448
|
+
{
|
2449
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2450
|
+
"member": "string",
|
2451
|
+
"name": "RequestId",
|
2452
|
+
"type": "string"
|
2453
|
+
}
|
2454
|
+
],
|
2455
|
+
"type": "object"
|
2456
|
+
},
|
2374
2457
|
"RetrieveKnowledgeRequest": {
|
2375
2458
|
"document": "RetrieveKnowledge请求参数结构体",
|
2376
2459
|
"members": [
|
@@ -2633,69 +2716,6 @@
|
|
2633
2716
|
],
|
2634
2717
|
"usage": "out"
|
2635
2718
|
},
|
2636
|
-
"UploadDocRealtimeRequest": {
|
2637
|
-
"document": "UploadDocRealtime请求参数结构体",
|
2638
|
-
"members": [
|
2639
|
-
{
|
2640
|
-
"disabled": false,
|
2641
|
-
"document": "知识库ID",
|
2642
|
-
"example": "4901991032",
|
2643
|
-
"member": "string",
|
2644
|
-
"name": "KnowledgeBaseId",
|
2645
|
-
"required": true,
|
2646
|
-
"type": "string"
|
2647
|
-
},
|
2648
|
-
{
|
2649
|
-
"disabled": false,
|
2650
|
-
"document": "文件名,可选。\n**需带文件类型后缀**,当文件名无法从传入的`FileUrl`获取时需要通过该字段来明确。",
|
2651
|
-
"example": "example.pdf",
|
2652
|
-
"member": "string",
|
2653
|
-
"name": "FileName",
|
2654
|
-
"required": true,
|
2655
|
-
"type": "string"
|
2656
|
-
},
|
2657
|
-
{
|
2658
|
-
"disabled": false,
|
2659
|
-
"document": "文件类型。\n**支持的文件类型:**\n- `PDF`、`DOC`、`DOCX`、`XLS`、`XLSX`、`PPT`、`PPTX`、`MD`、`TXT`、`PNG`、`JPG`、`JPEG`、`CSV`、`HTML`、`EPUB`\n\n**支持的文件大小:**\n - `PDF`、`DOCX`、`DOC`、`PPT`、`PPTX` 最大 200M \n - `TXT`、`MD` 最大10M \n - 其他 最大20M",
|
2660
|
-
"example": "PDF",
|
2661
|
-
"member": "string",
|
2662
|
-
"name": "FileType",
|
2663
|
-
"required": true,
|
2664
|
-
"type": "string"
|
2665
|
-
},
|
2666
|
-
{
|
2667
|
-
"disabled": false,
|
2668
|
-
"document": "文件的 URL 地址。\n文件存储于腾讯云的 URL 可保障更高的下载速度和稳定性,建议文件存储于腾讯云。 非腾讯云存储的 URL 速度和稳定性可能受一定影响。\n参考:[腾讯云COS文档](https://cloud.tencent.com/document/product/436/7749)",
|
2669
|
-
"example": "https://example.com/example.pdf",
|
2670
|
-
"member": "string",
|
2671
|
-
"name": "FileUrl",
|
2672
|
-
"required": true,
|
2673
|
-
"type": "string"
|
2674
|
-
},
|
2675
|
-
{
|
2676
|
-
"disabled": false,
|
2677
|
-
"document": "过期时间的秒数,最长24小时,默认24小时",
|
2678
|
-
"example": "86400",
|
2679
|
-
"member": "int64",
|
2680
|
-
"name": "ExpireTime",
|
2681
|
-
"required": false,
|
2682
|
-
"type": "int"
|
2683
|
-
}
|
2684
|
-
],
|
2685
|
-
"type": "object"
|
2686
|
-
},
|
2687
|
-
"UploadDocRealtimeResponse": {
|
2688
|
-
"document": "UploadDocRealtime返回参数结构体",
|
2689
|
-
"members": [
|
2690
|
-
{
|
2691
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header \"X-TC-RequestId\" 中。",
|
2692
|
-
"member": "string",
|
2693
|
-
"name": "RequestId",
|
2694
|
-
"type": "string"
|
2695
|
-
}
|
2696
|
-
],
|
2697
|
-
"type": "object"
|
2698
|
-
},
|
2699
2719
|
"UploadDocRequest": {
|
2700
2720
|
"document": "UploadDoc请求参数结构体",
|
2701
2721
|
"members": [
|
@@ -216,6 +216,14 @@
|
|
216
216
|
"title": "语义检索(问答对)"
|
217
217
|
}
|
218
218
|
],
|
219
|
+
"RetrieveKnowledgeRealtime": [
|
220
|
+
{
|
221
|
+
"document": "实时语义检索",
|
222
|
+
"input": "POST / HTTP/1.1\nHost: lkeap.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: RetrieveKnowledgeRealtime\n<公共请求参数>\n\n{\n \"KnowledgeBaseId\": \"49019910106\",\n \"Query\": \"国庆节放几天假\",\n \"DocIds\": [\n \"1828720159590123264\"\n ],\n \"RetrievalMethod\": \"SEMANTIC\",\n \"RetrievalSetting\": {\n \"TopK\": 3,\n \"ScoreThreshold\": 0.7\n }\n}",
|
223
|
+
"output": "{\n \"Response\": {\n \"Records\": [\n {\n \"Metadata\": {\n \"Type\": \"DOC\",\n \"ResultSource\": \"SEMANTIC\",\n \"ChunkPageNumbers\": [\n 1\n ]\n },\n \"Title\": \"example.pdf\",\n \"Content\": \"国庆放七天假\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"d422c101-96e6-4aeb-b51c-0ccb551a5a52\"\n }\n}",
|
224
|
+
"title": "实时语义检索"
|
225
|
+
}
|
226
|
+
],
|
219
227
|
"RunRerank": [
|
220
228
|
{
|
221
229
|
"document": "重排序",
|
@@ -231,14 +239,6 @@
|
|
231
239
|
"output": "{\n \"Response\": {\n \"DocId\": \"1830996257459865536\",\n \"RequestId\": \"804c3fe0-05b1-48f9-8003-ab118658fec7\"\n }\n}",
|
232
240
|
"title": "上传无属性标签文档"
|
233
241
|
}
|
234
|
-
],
|
235
|
-
"UploadDocRealtime": [
|
236
|
-
{
|
237
|
-
"document": "实时文档上传",
|
238
|
-
"input": "POST / HTTP/1.1\nHost: lkeap.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UploadDocRealtime\n<公共请求参数>\n\n{\n \"KnowledgeBaseId\": \"594669442\",\n \"FileName\": \"changan-short.doc\",\n \"FileType\": \"DOC\",\n \"FileUrl\": \"https://qidian-qbot-test-1251316161.cos.ap-guangzhou.myqcloud.com/2024-08-20/1251316161/20548499/changan-short.doc?q-sign-algorithm=sha1&q-ak=AKxxxxxxx&q-sign-time=1726245910;1726253110&q-key-time=1726245910;1726253110&q-header-list=&q-url-param-list=&q-signature=114996cce2050ca1edbe6e69606e5c01b4c5a3a1\"\n}",
|
239
|
-
"output": "{\n\t\"IsFinal\": true,\n\t\"DocId\": \"1828430526517084160\",\n\t\"Progress\": 80,\n\t\"PageNum\": 0,\n\t\"Status\": \"SUCCESS\"\n}",
|
240
|
-
"title": "实时文档上传"
|
241
|
-
}
|
242
242
|
]
|
243
243
|
},
|
244
244
|
"version": "1.0"
|