tccli 3.0.1099.1__py2.py3-none-any.whl → 3.0.1100.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 (83) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cls/v20201016/CreateCosRecharge.md +4 -4
  3. tccli/examples/cls/v20201016/CreateDashboardSubscribe.md +18 -0
  4. tccli/examples/cls/v20201016/DeleteDashboardSubscribe.md +18 -0
  5. tccli/examples/cls/v20201016/DescribeDashboardSubscribes.md +18 -0
  6. tccli/examples/cls/v20201016/ModifyCosRecharge.md +3 -3
  7. tccli/examples/cls/v20201016/ModifyDashboardSubscribe.md +18 -0
  8. tccli/examples/cls/v20201016/SearchDashboardSubscribe.md +35 -0
  9. tccli/examples/dlc/v20210125/CreateSparkSessionBatchSQL.md +1 -1
  10. tccli/examples/domain/v20180808/ModifyTemplate.md +73 -0
  11. tccli/examples/ess/v20201111/DescribeBatchOrganizationRegistrationUrls.md +27 -0
  12. tccli/examples/hunyuan/v20230901/ChatCompletions.md +141 -1
  13. tccli/examples/hunyuan/v20230901/ChatPro.md +2 -2
  14. tccli/examples/lke/v20231130/GetEmbedding.md +1 -1
  15. tccli/examples/lke/v20231130/GetMsgRecord.md +4 -1
  16. tccli/examples/ocr/v20181119/RecognizeGeneralTextImageWarn.md +83 -0
  17. tccli/examples/rum/v20210622/CreateWhitelist.md +2 -2
  18. tccli/examples/rum/v20210622/DescribeRumGroupLog.md +3 -3
  19. tccli/examples/rum/v20210622/DescribeRumLogExport.md +6 -6
  20. tccli/examples/rum/v20210622/DescribeRumStatsLogList.md +2 -2
  21. tccli/examples/teo/v20220901/CreatePlan.md +47 -0
  22. tccli/examples/teo/v20220901/DestroyPlan.md +20 -0
  23. tccli/examples/teo/v20220901/IncreasePlanQuota.md +46 -0
  24. tccli/examples/teo/v20220901/ModifyPlan.md +21 -0
  25. tccli/examples/teo/v20220901/RenewPlan.md +23 -0
  26. tccli/examples/teo/v20220901/UpgradePlan.md +23 -0
  27. tccli/examples/tione/v20191022/UpdateCodeRepository.md +1 -1
  28. tccli/examples/tke/v20180525/CheckInstancesUpgradeAble.md +15 -7
  29. tccli/examples/tke/v20180525/CreateCluster.md +58 -142
  30. tccli/examples/tke/v20180525/DescribeClusterNodePools.md +1 -0
  31. tccli/examples/tke/v20180525/GetUpgradeInstanceProgress.md +18 -19
  32. tccli/examples/tke/v20180525/ModifyClusterAuthenticationOptions.md +3 -0
  33. tccli/examples/tke/v20180525/ModifyNodePoolInstanceTypes.md +1 -1
  34. tccli/examples/tms/v20201229/AnswerQuestion.md +21 -0
  35. tccli/examples/vpc/v20170312/DescribeVpnGatewayRoutes.md +2 -1
  36. tccli/examples/vpc/v20170312/ModifyVpnGatewayRoutes.md +8 -4
  37. tccli/services/aiart/v20221229/api.json +5 -5
  38. tccli/services/cls/cls_client.py +337 -72
  39. tccli/services/cls/v20201016/api.json +433 -22
  40. tccli/services/cls/v20201016/examples.json +44 -4
  41. tccli/services/dlc/v20210125/api.json +14 -4
  42. tccli/services/dlc/v20210125/examples.json +1 -1
  43. tccli/services/domain/domain_client.py +53 -0
  44. tccli/services/domain/v20180808/api.json +62 -0
  45. tccli/services/domain/v20180808/examples.json +8 -0
  46. tccli/services/dts/v20211206/api.json +1 -1
  47. tccli/services/ess/ess_client.py +57 -4
  48. tccli/services/ess/v20201111/api.json +88 -0
  49. tccli/services/ess/v20201111/examples.json +8 -0
  50. tccli/services/essbasic/v20210526/api.json +1 -1
  51. tccli/services/hunyuan/v20230901/api.json +10 -10
  52. tccli/services/hunyuan/v20230901/examples.json +26 -2
  53. tccli/services/ims/v20201229/api.json +2 -1
  54. tccli/services/iotvideo/v20211125/api.json +15 -0
  55. tccli/services/lke/lke_client.py +114 -8
  56. tccli/services/lke/v20231130/api.json +492 -0
  57. tccli/services/lke/v20231130/examples.json +18 -2
  58. tccli/services/ocr/ocr_client.py +53 -0
  59. tccli/services/ocr/v20181119/api.json +156 -0
  60. tccli/services/ocr/v20181119/examples.json +8 -0
  61. tccli/services/rce/v20201103/api.json +9 -9
  62. tccli/services/rum/v20210622/api.json +35 -33
  63. tccli/services/rum/v20210622/examples.json +7 -7
  64. tccli/services/tdmq/v20200217/api.json +6 -6
  65. tccli/services/teo/teo_client.py +338 -20
  66. tccli/services/teo/v20220901/api.json +375 -1
  67. tccli/services/teo/v20220901/examples.json +60 -0
  68. tccli/services/tione/v20191022/api.json +6 -7
  69. tccli/services/tione/v20191022/examples.json +1 -1
  70. tccli/services/tione/v20211111/api.json +2 -0
  71. tccli/services/tke/v20180525/api.json +77 -93
  72. tccli/services/tke/v20180525/examples.json +7 -7
  73. tccli/services/tms/tms_client.py +53 -0
  74. tccli/services/tms/v20201229/api.json +44 -0
  75. tccli/services/tms/v20201229/examples.json +8 -0
  76. tccli/services/tse/v20201207/api.json +49 -1
  77. tccli/services/vpc/v20170312/api.json +3 -0
  78. tccli/services/vpc/v20170312/examples.json +3 -3
  79. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/METADATA +2 -2
  80. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/RECORD +83 -68
  81. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/WHEEL +0 -0
  82. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/entry_points.txt +0 -0
  83. {tccli-3.0.1099.1.dist-info → tccli-3.0.1100.1.dist-info}/license_files/LICENSE +0 -0
@@ -8,16 +8,16 @@
8
8
  "status": "online"
9
9
  },
10
10
  "ChatPro": {
11
- "document": "腾讯混元大模型(hunyuan-pro)是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认单账号限制并发数为 5 路,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。",
11
+ "document": "<span style=\"font-size:1.5em;\">注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接入。</span>\n\n腾讯混元大模型(hunyuan-pro)是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认单账号限制并发数为 5 路,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。",
12
12
  "input": "ChatProRequest",
13
- "name": "hunyuan-pro",
13
+ "name": "hunyuan-pro (即将下线)",
14
14
  "output": "ChatProResponse",
15
15
  "status": "online"
16
16
  },
17
17
  "ChatStd": {
18
- "document": "腾讯混元大模型标准版是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认单账号限制并发数为 5 路,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。",
18
+ "document": "<span style=\"font-size:1.5em;\">注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接入。</span>\n\n腾讯混元大模型标准版是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认单账号限制并发数为 5 路,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。",
19
19
  "input": "ChatStdRequest",
20
- "name": "hunyuan-standard",
20
+ "name": "hunyuan-standard (即将下线)",
21
21
  "output": "ChatStdResponse",
22
22
  "status": "online"
23
23
  },
@@ -57,7 +57,7 @@
57
57
  },
58
58
  {
59
59
  "disabled": false,
60
- "document": "聊天上下文信息。\n说明:\n1. 长度最多为 40,按对话时间从旧到新在数组中排列。\n2. Message.Role 可选值:system、user、assistant。\n其中,system 角色可选,如存在则必须位于列表的最开始。user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。\n3. Messages 中 Content 总长度不超过 16000 Token,超过则会截断最前面的内容,只保留尾部内容。建议不超过 4000 Token。",
60
+ "document": "聊天上下文信息。\n说明:\n1. 长度最多为 40,按对话时间从旧到新在数组中排列。\n2. Message.Role 可选值:system、user、assistant。\n其中,system 角色可选,如存在则必须位于列表的最开始。user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。\n3. Messages 中 Content 总长度不能超过模型输入长度上限(可参考 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 文档),超过则会截断最前面的内容,只保留尾部内容。",
61
61
  "example": "无",
62
62
  "member": "Message",
63
63
  "name": "Messages",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  {
77
77
  "disabled": false,
78
- "document": "流式输出审核开关。\n说明:\n1. 输出审核有流式和同步两种模式,**流式模式首包响应更快**。\n2. 当使用流式输出(Stream 字段值为 true)时,该字段生效。\n3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 FinishReason 值为 sensitive。\n4. 如果未传值或值为 false,则不使用流式输出审核,需要审核完所有输出内容后再返回结果。\n\n注意:\n当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 FinishReason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。",
78
+ "document": "流式输出审核开关。\n说明:\n1. 当使用流式输出(Stream 字段值为 true)时,该字段生效。\n2. 输出审核有流式和同步两种模式,**流式模式首包响应更快**。未传值时默认为流式模式(true)。\n3. 如果值为 true,将对输出内容进行分段审核,审核通过的内容流式输出返回。如果出现审核不过,响应中的 FinishReason 值为 sensitive。\n4. 如果值为 false,则不使用流式输出审核,需要审核完所有输出内容后再返回结果。\n\n注意:\n当选择流式输出审核时,可能会出现部分内容已输出,但中间某一段响应中的 FinishReason 值为 sensitive,此时说明安全审核未通过。如果业务场景有实时文字上屏的需求,需要自行撤回已上屏的内容,并建议自定义替换为一条提示语,如 “这个问题我不方便回答,不如我们换个话题试试”,以保障终端体验。",
79
79
  "example": "false",
80
80
  "member": "bool",
81
81
  "name": "StreamModeration",
@@ -180,7 +180,7 @@
180
180
  "members": [
181
181
  {
182
182
  "disabled": false,
183
- "document": "聊天上下文信息。\n说明:\n1. 长度最多为 40,按对话时间从旧到新在数组中排列。\n2. MessageRole 当前可选值:system、user、assistant。其中,system 角色是可选的,如果存在,必须位于列表的最开始。此外,user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。\n3. Messages 中 Content 总长度不超过 16000 Token,超过则会截断最前面的内容,只保留尾部内容。建议不超过 4000 Token。",
183
+ "document": "聊天上下文信息。\n说明:\n1. 长度最多为 40,按对话时间从旧到新在数组中排列。\n2. Message.Role 可选值:system、user、assistant。\n其中,system 角色可选,如存在则必须位于列表的最开始。user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[system(可选) user assistant user assistant user ...]。\n3. Messages 中 Content 总长度不能超过 hunyuan-pro 模型输入长度上限(可参考 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 文档),超过则会截断最前面的内容,只保留尾部内容。",
184
184
  "example": "无",
185
185
  "member": "Message",
186
186
  "name": "Messages",
@@ -303,7 +303,7 @@
303
303
  "members": [
304
304
  {
305
305
  "disabled": false,
306
- "document": "聊天上下文信息。\n说明:\n1. 长度最多为 40,按对话时间从旧到新在数组中排列。\n2. Message 的 Role 当前可选值:user、assistant。其中,user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[user assistant user assistant user ...]。\n3. Messages 中 Content 总长度不超过 16000 Token,超过则会截断最前面的内容,只保留尾部内容。建议不超过 4000 Token。\n",
306
+ "document": "聊天上下文信息。\n说明:\n1. 长度最多为 40,按对话时间从旧到新在数组中排列。\n2. Message 的 Role 当前可选值:user、assistant。\n其中,user 和 assistant 需交替出现(一问一答),以 user 提问开始和结束,且 Content 不能为空。Role 的顺序示例:[user assistant user assistant user ...]。\n3. Messages 中 Content 总长度不能超过 hunyuan-standard 模型输入长度上限(可参考 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 文档),超过则会截断最前面的内容,只保留尾部内容。",
307
307
  "example": "无",
308
308
  "member": "Message",
309
309
  "name": "Messages",
@@ -426,8 +426,8 @@
426
426
  "members": [
427
427
  {
428
428
  "disabled": false,
429
- "document": "结束标志位,为 stop 则表示尾包。",
430
- "example": "",
429
+ "document": "结束标志位,可能为 stop 或 sensitive。\nstop 表示输出正常结束,sensitive 只在开启流式输出审核时会出现,表示安全审核未通过。",
430
+ "example": "stop",
431
431
  "member": "string",
432
432
  "name": "FinishReason",
433
433
  "output_required": false,
@@ -3,9 +3,33 @@
3
3
  "ChatCompletions": [
4
4
  {
5
5
  "document": "system提示词",
6
- "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"TopP\": 1,\n \"Temperature\": 1,\n \"Model\": \"hunyuan-lite\",\n \"Messages\": [\n {\n \"Role\": \"system\",\n \"Content\": \"将英文单词转换为包括中文翻译、英文释义和一个例句的完整解释。请检查所有信息是否准确,并在回答时保持简洁,不需要任何其他反馈。\"\n },\n {\n \"Role\": \"user\",\n \"Content\": \"nice\"\n }\n ]\n}",
6
+ "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"TopP\": 1,\n \"Temperature\": 1,\n \"Model\": \"hunyuan-pro\",\n \"Messages\": [\n {\n \"Role\": \"system\",\n \"Content\": \"将英文单词转换为包括中文翻译、英文释义和一个例句的完整解释。请检查所有信息是否准确,并在回答时保持简洁,不需要任何其他反馈。\"\n },\n {\n \"Role\": \"user\",\n \"Content\": \"nice\"\n }\n ]\n}",
7
7
  "output": "{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"很好\"}}],\"Created\":1705634813,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":1,\"TotalTokens\":37}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\":\"}}],\"Created\":1705634813,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":2,\"TotalTokens\":38}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"nice\"}}],\"Created\":1705634813,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":3,\"TotalTokens\":39}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"\\n\"}}],\"Created\":1705634813,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":4,\"TotalTokens\":40}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"英文\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":5,\"TotalTokens\":41}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"释义\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":6,\"TotalTokens\":42}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\":\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":7,\"TotalTokens\":43}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"ple\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":8,\"TotalTokens\":44}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"asing\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":9,\"TotalTokens\":45}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\" or\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":10,\"TotalTokens\":46}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\" acceptable\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":11,\"TotalTokens\":47}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"\\n\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":12,\"TotalTokens\":48}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"例\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":13,\"TotalTokens\":49}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"句\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":14,\"TotalTokens\":50}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\":\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":15,\"TotalTokens\":51}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"She\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":16,\"TotalTokens\":52}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\" had\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":17,\"TotalTokens\":53}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\" a\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":18,\"TotalTokens\":54}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\" nice\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":19,\"TotalTokens\":55}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\" smile\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":20,\"TotalTokens\":56}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\".\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":21,\"TotalTokens\":57}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"stop\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"\"}}],\"Created\":1705634814,\"Id\":\"681ef57e-9f1e-4faa-a2d3-07b655a1fa1f\",\"Usage\":{\"PromptTokens\":36,\"CompletionTokens\":21,\"TotalTokens\":57}}",
8
8
  "title": "system参数示例"
9
+ },
10
+ {
11
+ "document": "多轮对话场景",
12
+ "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"TopP\": 1,\n \"Temperature\": 1,\n \"Model\": \"hunyuan-pro\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Content\": \"请介绍下自己\"\n },\n {\n \"Role\": \"assistant\",\n \"Content\": \"我的名字是腾讯混元大模型,是腾讯开发的一款大型语言模型。我能够理解人类语言,擅长提供问答服务、常识推理、文本创作、数学计算和互动问答等服务。如果您需要帮助或有任何问题,请随时向我提问。\"\n },\n {\n \"Role\": \"user\",\n \"Content\": \"请给我讲个字数小于10个字的搞笑笑话\"\n },\n {\n \"Role\": \"assistant\",\n \"Content\": \"猫头鹰遇见眯眯眼,看得眼睛都眯成线。”\"\n },\n {\n \"Role\": \"user\",\n \"Content\": \"不好笑,换一个吧\"\n }\n ]\n}",
13
+ "output": "{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"青蛙\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":1,\"TotalTokens\":86}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"跳\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":2,\"TotalTokens\":87}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"高\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":3,\"TotalTokens\":88}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\",\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":4,\"TotalTokens\":89}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"比\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":5,\"TotalTokens\":90}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"下马\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":6,\"TotalTokens\":91}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"。\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":7,\"TotalTokens\":92}}\n{\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"stop\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"\"}}],\"Created\":1705634032,\"Id\":\"9c772634-8824-43e8-bc24-8bc4c19b9151\",\"Usage\":{\"PromptTokens\":85,\"CompletionTokens\":7,\"TotalTokens\":92}}",
14
+ "title": "多轮对话示例"
15
+ },
16
+ {
17
+ "document": "",
18
+ "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"TopP\": 0,\n \"Temperature\": 4.8,\n \"Model\": \"hunyuan-pro\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Content\": \"介绍下自己\"\n }\n ]\n}",
19
+ "output": "{\n \"Response\": {\n \"RequestId\": \"188cc996-ab09-49a7-aa9f-1df88f11c6b4\",\n \"Error\": {\n \"Code\": \"InvalidParameter\",\n \"Message\": \"Temperature must be 2 or less\"\n }\n }\n}",
20
+ "title": "请求失败示例"
21
+ },
22
+ {
23
+ "document": "",
24
+ "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"TopP\": 1,\n \"Temperature\": 1,\n \"Model\": \"hunyuan-pro\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Content\": \"计算1+1\"\n }\n ]\n}",
25
+ "output": "HTTP/1.1 200 OK\nCache-Control: no-cache\nConnection: keep-alive\nContent-Type: text/event-stream\nDate: Tue, 21 Nov 2023 06:56:00 GMT\nTransfer-Encoding: chunked\nX-TC-RequestId: 61a8459b-27c8-4868-af8f-f374db0245f8\n\ndata: {\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"1\"}}],\"Created\":1700549760,\"Id\":\"148b89ef-14e1-489f-8e70-b767e5b27d56\",\"Usage\":{\"PromptTokens\":4,\"CompletionTokens\":2,\"TotalTokens\":6}}\n\ndata: {\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"+\"}}],\"Created\":1700549760,\"Id\":\"148b89ef-14e1-489f-8e70-b767e5b27d56\",\"Usage\":{\"PromptTokens\":4,\"CompletionTokens\":3,\"TotalTokens\":7}}\n\ndata: {\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"1\"}}],\"Created\":1700549760,\"Id\":\"148b89ef-14e1-489f-8e70-b767e5b27d56\",\"Usage\":{\"PromptTokens\":4,\"CompletionTokens\":4,\"TotalTokens\":8}}\n\ndata: {\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"=\"}}],\"Created\":1700549760,\"Id\":\"148b89ef-14e1-489f-8e70-b767e5b27d56\",\"Usage\":{\"PromptTokens\":4,\"CompletionTokens\":5,\"TotalTokens\":9}}\n\ndata: {\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"2\"}}],\"Created\":1700549760,\"Id\":\"148b89ef-14e1-489f-8e70-b767e5b27d56\",\"Usage\":{\"PromptTokens\":4,\"CompletionTokens\":5,\"TotalTokens\":9}}\n\ndata: {\"Note\":\"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\"Choices\":[{\"FinishReason\":\"stop\",\"Delta\":{\"Role\":\"assistant\",\"Content\":\"\"}}],\"Created\":1700549760,\"Id\":\"148b89ef-14e1-489f-8e70-b767e5b27d56\",\"Usage\":{\"PromptTokens\":4,\"CompletionTokens\":5,\"TotalTokens\":9}}",
26
+ "title": "流式请求成功示例"
27
+ },
28
+ {
29
+ "document": "",
30
+ "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatCompletions\n<公共请求参数>\n\n{\n \"TopP\": 0,\n \"Stream\": false,\n \"Temperature\": 0,\n \"Model\": \"hunyuan-pro\",\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Content\": \"你好呀!\"\n }\n ]\n}",
31
+ "output": "{\n \"Note\": \"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\",\n \"Choices\": [\n {\n \"FinishReason\": \"stop\",\n \"Message\": {\n \"Role\": \"assistant\",\n \"Content\": \"你好!很高兴为您提供帮助。请问有什么问题我可以帮助您解决?\"\n }\n }\n ],\n \"Created\": 1710902312,\n \"Id\": \"e4657570-94a5-45f1-896c-a00ac3471d51\",\n \"Usage\": {\n \"PromptTokens\": 3,\n \"CompletionTokens\": 14,\n \"TotalTokens\": 17\n }\n}",
32
+ "title": "非流式请求成功示例"
9
33
  }
10
34
  ],
11
35
  "ChatPro": [
@@ -24,7 +48,7 @@
24
48
  {
25
49
  "document": "",
26
50
  "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatPro\n<公共请求参数>\n\n{\n \"TopP\": 0,\n \"Temperature\": 4.8,\n \"Messages\": [\n {\n \"Role\": \"user\",\n \"Content\": \"介绍下自己\"\n }\n ]\n}",
27
- "output": "{\n \"Response\": {\n \"RequestId\": \"655c67aad32b0f48f52b89b0\",\n \"Error\": {\n \"Code\": \"InvalidParameter\",\n \"Message\": \"The value of Temperature should be within the range [0.0, 2.0]: 4.800000 \"\n }\n }\n}",
51
+ "output": "{\n \"Response\": {\n \"RequestId\": \"188cc996-ab09-49a7-aa9f-1df88f11c6b4\",\n \"Error\": {\n \"Code\": \"InvalidParameter\",\n \"Message\": \"Temperature must be 2 or less\"\n }\n }\n}",
28
52
  "title": "请求失败示例"
29
53
  },
30
54
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "actions": {
3
3
  "CreateImageModerationAsyncTask": {
4
- "document": "本接口用于提交图片文件进行异步智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通图片内容安全服务](https://console.cloud.tencent.com/cms/image/package) 并调整好对应的业务配置。\n### 接口使用说明:\n- 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms/image/package)”开启使用图片内容安全服务,首次开通服务的用户可免费领用试用套餐包,包含**1万张图片**识别额度,有效期为1个月。\n- 该接口为收费接口,计费方式敬请参见 [腾讯云图片内容安全定价](https://cloud.tencent.com/product/ims/pricing)。\n\n### 接口功能说明:\n- 支持对图片文件或链接进行检测,通过深度学习技术,识别可能令人反感、不安全或不适宜的违规图片内容;\n- 支持对GIF图/长图进行截帧或拆分检测;\n- 支持识别多种违规场景,包括:低俗、违法违规、色情、广告等场景;\n- 支持多种物体检测(实体、广告台标、二维码等)及图片中文本的OCR文本识别;\n- 支持根据不同的业务场景配置自定义的审核策略;\n- 支持用户自定义选择图片风险库,打击自定义识别类型的违规图片(目前仅支持黑名单配置);\n- 支持在审核图片内容时同时关联账号或设备信息,可识别违规风险账号或设备。\n### 接口调用说明:\n- 图片尺寸支持:**长或者宽 >50分辨率**和**长或者宽<40000分辨率**,并且**图片长宽比<90:1;**\n- 图片文件分辨率支持:建议**分辨率大于256x256**,否则可能会影响识别效果;\n- 图片文件支持格式:PNG、JPG、JPEG、BMP、GIF、WEBP格式;\n- 图片文件链接支持的传输协议:HTTP、HTTPS;\n- 若传入图片文件的访问链接,则需要注意**图片下载时间限制为3秒**,为保障被检测图片的稳定性和可靠性,建议您使用腾讯云COS存储或者CDN缓存等;\n- 默认接口请求频率限制:**20次/秒**,超过此调用频率则会报错。",
4
+ "document": "本接口用于提交图片文件进行异步智能审核任务。使用前请您使用腾讯云主账号登录控制台 [开通图片内容安全服务](https://console.cloud.tencent.com/cms/image/package) 并调整好对应的业务配置。\n### 接口使用说明:\n- 前往“[内容安全控制台-图片内容安全](https://console.cloud.tencent.com/cms/image/package)”开启使用图片内容安全服务,首次开通服务的用户可免费领用试用套餐包,包含**3000张图片**识别额度,有效期为15天。\n- 该接口为收费接口,计费方式敬请参见 [腾讯云图片内容安全定价](https://cloud.tencent.com/product/ims/pricing)。\n\n### 接口功能说明:\n- 支持对图片文件或链接进行检测,通过深度学习技术,识别可能令人反感、不安全或不适宜的违规图片内容;\n- 支持对GIF图/长图进行截帧或拆分检测;\n- 支持识别多种违规场景,包括:低俗、违法违规、色情、广告等场景;\n- 支持多种物体检测(实体、广告台标、二维码等)及图片中文本的OCR文本识别;\n- 支持根据不同的业务场景配置自定义的审核策略;\n- 支持用户自定义选择图片风险库,打击自定义识别类型的违规图片(目前仅支持黑名单配置);\n- 支持在审核图片内容时同时关联账号或设备信息,可识别违规风险账号或设备。\n### 接口调用说明:\n- 图片尺寸支持:**长或者宽 >50分辨率**和**长或者宽<40000分辨率**,并且**图片长宽比<90:1;**\n- 图片文件分辨率支持:建议**分辨率大于256x256**,否则可能会影响识别效果;\n- 图片文件支持格式:PNG、JPG、JPEG、BMP、GIF、WEBP格式;\n- 图片文件链接支持的传输协议:HTTP、HTTPS;\n- 若传入图片文件的访问链接,则需要注意**图片下载时间限制为3秒**,为保障被检测图片的稳定性和可靠性,建议您使用腾讯云COS存储或者CDN缓存等;\n- 默认接口请求频率限制:**20次/秒**,超过此调用频率则会报错。",
5
5
  "input": "CreateImageModerationAsyncTaskRequest",
6
6
  "name": "图片异步检测",
7
7
  "output": "CreateImageModerationAsyncTaskResponse",
@@ -118,6 +118,7 @@
118
118
  "example": "a61237dd-c2a0-43e7-a3da-d27022d39ba7",
119
119
  "member": "string",
120
120
  "name": "DataId",
121
+ "output_required": true,
121
122
  "type": "string",
122
123
  "value_allowed_null": false
123
124
  },
@@ -1701,6 +1701,7 @@
1701
1701
  "example": "1560355200",
1702
1702
  "member": "uint64",
1703
1703
  "name": "StartTime",
1704
+ "output_required": true,
1704
1705
  "required": true,
1705
1706
  "type": "int",
1706
1707
  "value_allowed_null": false
@@ -1711,6 +1712,7 @@
1711
1712
  "example": "1601196327",
1712
1713
  "member": "uint64",
1713
1714
  "name": "EndTime",
1715
+ "output_required": true,
1714
1716
  "required": true,
1715
1717
  "type": "int",
1716
1718
  "value_allowed_null": false
@@ -1721,6 +1723,7 @@
1721
1723
  "example": "/100008401725/AQTV2839QJ/sp01_328202375/events/123.jpg",
1722
1724
  "member": "string",
1723
1725
  "name": "Thumbnail",
1726
+ "output_required": true,
1724
1727
  "required": true,
1725
1728
  "type": "string",
1726
1729
  "value_allowed_null": false
@@ -1731,9 +1734,21 @@
1731
1734
  "example": "low_power",
1732
1735
  "member": "string",
1733
1736
  "name": "EventId",
1737
+ "output_required": true,
1734
1738
  "required": true,
1735
1739
  "type": "string",
1736
1740
  "value_allowed_null": false
1741
+ },
1742
+ {
1743
+ "disabled": false,
1744
+ "document": "事件录像上传状态,Finished: 全部上传成功 Partial: 部分上传成功 Failed: 上传失败\n注意:此字段可能返回 null,表示取不到有效值。",
1745
+ "example": "Finished",
1746
+ "member": "string",
1747
+ "name": "UploadStatus",
1748
+ "output_required": false,
1749
+ "required": false,
1750
+ "type": "string",
1751
+ "value_allowed_null": true
1737
1752
  }
1738
1753
  ],
1739
1754
  "usage": "both"
@@ -2357,6 +2357,58 @@ def doCreateQA(args, parsed_globals):
2357
2357
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2358
2358
 
2359
2359
 
2360
+ def doExportUnsatisfiedReply(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.LkeClient(cred, g_param[OptionsDefine.Region], profile)
2387
+ client._sdkVersion += ("_CLI_" + __version__)
2388
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2389
+ model = models.ExportUnsatisfiedReplyRequest()
2390
+ model.from_json_string(json.dumps(args))
2391
+ start_time = time.time()
2392
+ while True:
2393
+ rsp = client.ExportUnsatisfiedReply(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 doResetSession(args, parsed_globals):
2361
2413
  g_param = parse_global_arg(parsed_globals)
2362
2414
 
@@ -3345,6 +3397,58 @@ def doGetTaskStatus(args, parsed_globals):
3345
3397
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3346
3398
 
3347
3399
 
3400
+ def doDescribeRefer(args, parsed_globals):
3401
+ g_param = parse_global_arg(parsed_globals)
3402
+
3403
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3404
+ cred = credential.CVMRoleCredential()
3405
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3406
+ cred = credential.STSAssumeRoleCredential(
3407
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3408
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3409
+ )
3410
+ 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):
3411
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3412
+ else:
3413
+ cred = credential.Credential(
3414
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3415
+ )
3416
+ http_profile = HttpProfile(
3417
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3418
+ reqMethod="POST",
3419
+ endpoint=g_param[OptionsDefine.Endpoint],
3420
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3421
+ )
3422
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3423
+ if g_param[OptionsDefine.Language]:
3424
+ profile.language = g_param[OptionsDefine.Language]
3425
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3426
+ client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
3427
+ client._sdkVersion += ("_CLI_" + __version__)
3428
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3429
+ model = models.DescribeReferRequest()
3430
+ model.from_json_string(json.dumps(args))
3431
+ start_time = time.time()
3432
+ while True:
3433
+ rsp = client.DescribeRefer(model)
3434
+ result = rsp.to_json_string()
3435
+ try:
3436
+ json_obj = json.loads(result)
3437
+ except TypeError as e:
3438
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3439
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3440
+ break
3441
+ cur_time = time.time()
3442
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3443
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3444
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3445
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3446
+ else:
3447
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3448
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3449
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3450
+
3451
+
3348
3452
  def doDeleteQACate(args, parsed_globals):
3349
3453
  g_param = parse_global_arg(parsed_globals)
3350
3454
 
@@ -3501,7 +3605,7 @@ def doRetryRelease(args, parsed_globals):
3501
3605
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3502
3606
 
3503
3607
 
3504
- def doExportUnsatisfiedReply(args, parsed_globals):
3608
+ def doQueryParseDocResult(args, parsed_globals):
3505
3609
  g_param = parse_global_arg(parsed_globals)
3506
3610
 
3507
3611
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3530,11 +3634,11 @@ def doExportUnsatisfiedReply(args, parsed_globals):
3530
3634
  client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
3531
3635
  client._sdkVersion += ("_CLI_" + __version__)
3532
3636
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3533
- model = models.ExportUnsatisfiedReplyRequest()
3637
+ model = models.QueryParseDocResultRequest()
3534
3638
  model.from_json_string(json.dumps(args))
3535
3639
  start_time = time.time()
3536
3640
  while True:
3537
- rsp = client.ExportUnsatisfiedReply(model)
3641
+ rsp = client.QueryParseDocResult(model)
3538
3642
  result = rsp.to_json_string()
3539
3643
  try:
3540
3644
  json_obj = json.loads(result)
@@ -3709,7 +3813,7 @@ def doVerifyQA(args, parsed_globals):
3709
3813
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3710
3814
 
3711
3815
 
3712
- def doDescribeRefer(args, parsed_globals):
3816
+ def doParseDoc(args, parsed_globals):
3713
3817
  g_param = parse_global_arg(parsed_globals)
3714
3818
 
3715
3819
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3738,11 +3842,11 @@ def doDescribeRefer(args, parsed_globals):
3738
3842
  client = mod.LkeClient(cred, g_param[OptionsDefine.Region], profile)
3739
3843
  client._sdkVersion += ("_CLI_" + __version__)
3740
3844
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3741
- model = models.DescribeReferRequest()
3845
+ model = models.ParseDocRequest()
3742
3846
  model.from_json_string(json.dumps(args))
3743
3847
  start_time = time.time()
3744
3848
  while True:
3745
- rsp = client.DescribeRefer(model)
3849
+ rsp = client.ParseDoc(model)
3746
3850
  result = rsp.to_json_string()
3747
3851
  try:
3748
3852
  json_obj = json.loads(result)
@@ -3869,6 +3973,7 @@ ACTION_MAP = {
3869
3973
  "RetryDocParse": doRetryDocParse,
3870
3974
  "CreateCorp": doCreateCorp,
3871
3975
  "CreateQA": doCreateQA,
3976
+ "ExportUnsatisfiedReply": doExportUnsatisfiedReply,
3872
3977
  "ResetSession": doResetSession,
3873
3978
  "ListQACate": doListQACate,
3874
3979
  "GetAppKnowledgeCount": doGetAppKnowledgeCount,
@@ -3888,14 +3993,15 @@ ACTION_MAP = {
3888
3993
  "ListRejectedQuestion": doListRejectedQuestion,
3889
3994
  "ListReleaseConfigPreview": doListReleaseConfigPreview,
3890
3995
  "GetTaskStatus": doGetTaskStatus,
3996
+ "DescribeRefer": doDescribeRefer,
3891
3997
  "DeleteQACate": doDeleteQACate,
3892
3998
  "CreateQACate": doCreateQACate,
3893
3999
  "RetryRelease": doRetryRelease,
3894
- "ExportUnsatisfiedReply": doExportUnsatisfiedReply,
4000
+ "QueryParseDocResult": doQueryParseDocResult,
3895
4001
  "StopDocParse": doStopDocParse,
3896
4002
  "ExportAttributeLabel": doExportAttributeLabel,
3897
4003
  "VerifyQA": doVerifyQA,
3898
- "DescribeRefer": doDescribeRefer,
4004
+ "ParseDoc": doParseDoc,
3899
4005
  "ListDoc": doListDoc,
3900
4006
 
3901
4007
  }