tccli 3.0.1300.3__py2.py3-none-any.whl → 3.0.1302.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.
Files changed (187) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +2 -1
  3. tccli/services/asr/v20190614/api.json +18 -18
  4. tccli/services/batch/v20170312/api.json +14 -14
  5. tccli/services/bh/bh_client.py +623 -93
  6. tccli/services/bh/v20230418/api.json +1054 -32
  7. tccli/services/bh/v20230418/examples.json +93 -1
  8. tccli/services/billing/billing_client.py +4 -57
  9. tccli/services/billing/v20180709/api.json +3 -305
  10. tccli/services/billing/v20180709/examples.json +2 -10
  11. tccli/services/bpaas/v20181217/api.json +56 -56
  12. tccli/services/cat/cat_client.py +61 -8
  13. tccli/services/cat/v20180409/api.json +115 -0
  14. tccli/services/cat/v20180409/examples.json +20 -0
  15. tccli/services/cbs/v20170312/api.json +9 -7
  16. tccli/services/cbs/v20170312/examples.json +2 -2
  17. tccli/services/ccc/ccc_client.py +216 -4
  18. tccli/services/ccc/v20200210/api.json +364 -6
  19. tccli/services/ccc/v20200210/examples.json +32 -0
  20. tccli/services/cdb/v20170320/api.json +23 -14
  21. tccli/services/cdb/v20170320/examples.json +3 -3
  22. tccli/services/cdc/cdc_client.py +173 -67
  23. tccli/services/cdc/v20201214/api.json +96 -0
  24. tccli/services/cdc/v20201214/examples.json +16 -0
  25. tccli/services/cdn/v20180606/api.json +365 -279
  26. tccli/services/cdwch/v20200915/api.json +21 -21
  27. tccli/services/cdwdoris/v20211228/api.json +21 -1
  28. tccli/services/cdwdoris/v20211228/examples.json +4 -4
  29. tccli/services/cdwpg/v20201230/api.json +375 -360
  30. tccli/services/cdwpg/v20201230/examples.json +1 -1
  31. tccli/services/cfw/cfw_client.py +53 -0
  32. tccli/services/cfw/v20190904/api.json +201 -5
  33. tccli/services/cfw/v20190904/examples.json +8 -0
  34. tccli/services/chc/chc_client.py +57 -4
  35. tccli/services/chc/v20230418/api.json +108 -1
  36. tccli/services/chc/v20230418/examples.json +8 -0
  37. tccli/services/ckafka/ckafka_client.py +408 -302
  38. tccli/services/ckafka/v20190819/api.json +197 -2
  39. tccli/services/ckafka/v20190819/examples.json +16 -0
  40. tccli/services/clb/v20180317/api.json +439 -379
  41. tccli/services/clb/v20180317/examples.json +7 -7
  42. tccli/services/cls/cls_client.py +53 -0
  43. tccli/services/cls/v20201016/api.json +86 -3
  44. tccli/services/cls/v20201016/examples.json +11 -3
  45. tccli/services/cvm/v20170312/api.json +165 -147
  46. tccli/services/cvm/v20170312/examples.json +6 -6
  47. tccli/services/cwp/v20180228/api.json +93 -14
  48. tccli/services/cwp/v20180228/examples.json +7 -7
  49. tccli/services/cynosdb/cynosdb_client.py +171 -12
  50. tccli/services/cynosdb/v20190107/api.json +252 -3
  51. tccli/services/cynosdb/v20190107/examples.json +24 -0
  52. tccli/services/dbbrain/dbbrain_client.py +57 -4
  53. tccli/services/dbbrain/v20210527/api.json +62 -0
  54. tccli/services/dbbrain/v20210527/examples.json +8 -0
  55. tccli/services/dc/v20180410/api.json +1 -1
  56. tccli/services/dlc/dlc_client.py +53 -0
  57. tccli/services/dlc/v20210125/api.json +816 -655
  58. tccli/services/dlc/v20210125/examples.json +73 -59
  59. tccli/services/dsgc/v20190723/api.json +18 -0
  60. tccli/services/dts/v20211206/api.json +4 -4
  61. tccli/services/dts/v20211206/examples.json +6 -0
  62. tccli/services/emr/emr_client.py +53 -0
  63. tccli/services/emr/v20190103/api.json +127 -0
  64. tccli/services/emr/v20190103/examples.json +8 -0
  65. tccli/services/es/es_client.py +686 -151
  66. tccli/services/es/v20180416/api.json +509 -436
  67. tccli/services/es/v20180416/examples.json +43 -49
  68. tccli/services/es/v20250101/api.json +1391 -0
  69. tccli/services/es/v20250101/examples.json +85 -0
  70. tccli/services/ess/ess_client.py +53 -0
  71. tccli/services/ess/v20201111/api.json +142 -21
  72. tccli/services/ess/v20201111/examples.json +14 -0
  73. tccli/services/essbasic/essbasic_client.py +53 -0
  74. tccli/services/essbasic/v20210526/api.json +112 -9
  75. tccli/services/essbasic/v20210526/examples.json +8 -0
  76. tccli/services/gaap/v20180529/api.json +321 -312
  77. tccli/services/gaap/v20180529/examples.json +2 -2
  78. tccli/services/gs/gs_client.py +538 -8
  79. tccli/services/gs/v20191118/api.json +947 -44
  80. tccli/services/gs/v20191118/examples.json +87 -1
  81. tccli/services/gwlb/v20240906/api.json +56 -37
  82. tccli/services/gwlb/v20240906/examples.json +11 -5
  83. tccli/services/hunyuan/hunyuan_client.py +175 -69
  84. tccli/services/hunyuan/v20230901/api.json +191 -1
  85. tccli/services/hunyuan/v20230901/examples.json +17 -1
  86. tccli/services/ioa/ioa_client.py +227 -15
  87. tccli/services/ioa/v20220601/api.json +479 -0
  88. tccli/services/ioa/v20220601/examples.json +44 -0
  89. tccli/services/iotexplorer/iotexplorer_client.py +322 -4
  90. tccli/services/iotexplorer/v20190423/api.json +865 -52
  91. tccli/services/iotexplorer/v20190423/examples.json +64 -16
  92. tccli/services/iotvideo/iotvideo_client.py +57 -4
  93. tccli/services/iotvideo/v20211125/api.json +146 -0
  94. tccli/services/iotvideo/v20211125/examples.json +8 -0
  95. tccli/services/iotvideoindustry/v20201201/api.json +1 -1
  96. tccli/services/kms/v20190118/api.json +38 -2
  97. tccli/services/lcic/v20220817/api.json +66 -1
  98. tccli/services/lcic/v20220817/examples.json +1 -1
  99. tccli/services/lighthouse/lighthouse_client.py +0 -106
  100. tccli/services/lighthouse/v20200324/api.json +11 -98
  101. tccli/services/lighthouse/v20200324/examples.json +0 -16
  102. tccli/services/live/v20180801/api.json +1 -1
  103. tccli/services/lke/v20231130/api.json +208 -10
  104. tccli/services/lke/v20231130/examples.json +10 -10
  105. tccli/services/lkeap/lkeap_client.py +53 -0
  106. tccli/services/lkeap/v20240522/api.json +48 -4
  107. tccli/services/lkeap/v20240522/examples.json +8 -0
  108. tccli/services/mna/mna_client.py +4 -163
  109. tccli/services/mna/v20210119/api.json +0 -524
  110. tccli/services/mna/v20210119/examples.json +0 -24
  111. tccli/services/monitor/monitor_client.py +114 -8
  112. tccli/services/monitor/v20180724/api.json +129 -18
  113. tccli/services/monitor/v20180724/examples.json +17 -1
  114. tccli/services/mps/v20190612/api.json +1223 -1031
  115. tccli/services/mps/v20190612/examples.json +1 -1
  116. tccli/services/nlp/v20190408/examples.json +1 -1
  117. tccli/services/oceanus/v20190422/api.json +12 -12
  118. tccli/services/oceanus/v20190422/examples.json +15 -3
  119. tccli/services/ocr/v20181119/api.json +13 -3
  120. tccli/services/postgres/v20170312/api.json +2 -2
  121. tccli/services/privatedns/v20201028/api.json +30 -11
  122. tccli/services/privatedns/v20201028/examples.json +10 -10
  123. tccli/services/rce/v20201103/api.json +3 -3
  124. tccli/services/ses/v20201002/api.json +10 -1
  125. tccli/services/smop/v20201203/api.json +2 -2
  126. tccli/services/sqlserver/v20180328/api.json +1 -1
  127. tccli/services/ssm/v20190923/api.json +27 -0
  128. tccli/services/sts/sts_client.py +53 -0
  129. tccli/services/sts/v20180813/api.json +101 -1
  130. tccli/services/sts/v20180813/examples.json +8 -0
  131. tccli/services/taf/taf_client.py +0 -53
  132. tccli/services/taf/v20200210/api.json +0 -138
  133. tccli/services/taf/v20200210/examples.json +0 -8
  134. tccli/services/tan/v20220420/api.json +2 -2
  135. tccli/services/tat/v20201028/api.json +2 -2
  136. tccli/services/tcb/v20180608/api.json +29 -1
  137. tccli/services/tcbr/v20220217/api.json +32 -0
  138. tccli/services/tccatalog/v20241024/api.json +1 -1
  139. tccli/services/tccatalog/v20241024/examples.json +1 -1
  140. tccli/services/tcr/v20190924/api.json +5 -5
  141. tccli/services/tcr/v20190924/examples.json +2 -2
  142. tccli/services/tcss/v20201101/api.json +84 -34
  143. tccli/services/tcss/v20201101/examples.json +2809 -0
  144. tccli/services/tdmq/v20200217/api.json +40 -0
  145. tccli/services/tdmq/v20200217/examples.json +1 -1
  146. tccli/services/tds/tds_client.py +53 -0
  147. tccli/services/tds/v20220801/api.json +265 -0
  148. tccli/services/tds/v20220801/examples.json +8 -0
  149. tccli/services/tem/v20210701/api.json +664 -575
  150. tccli/services/tem/v20210701/examples.json +2 -2
  151. tccli/services/teo/v20220901/api.json +236 -208
  152. tccli/services/teo/v20220901/examples.json +13 -13
  153. tccli/services/tione/tione_client.py +53 -0
  154. tccli/services/tione/v20211111/api.json +256 -0
  155. tccli/services/tione/v20211111/examples.json +8 -0
  156. tccli/services/tke/v20180525/api.json +1 -1
  157. tccli/services/trocket/trocket_client.py +489 -12
  158. tccli/services/trocket/v20230308/api.json +925 -146
  159. tccli/services/trocket/v20230308/examples.json +72 -0
  160. tccli/services/trtc/v20190722/api.json +13 -19
  161. tccli/services/trtc/v20190722/examples.json +8 -8
  162. tccli/services/tse/v20201207/api.json +1016 -995
  163. tccli/services/tse/v20201207/examples.json +2 -2
  164. tccli/services/tsf/v20180326/api.json +510 -465
  165. tccli/services/tsf/v20180326/examples.json +4 -4
  166. tccli/services/tts/v20190823/api.json +10 -10
  167. tccli/services/vclm/v20240523/api.json +2 -2
  168. tccli/services/vcube/v20220410/api.json +10 -0
  169. tccli/services/vdb/v20230616/api.json +10 -0
  170. tccli/services/vdb/v20230616/examples.json +1 -1
  171. tccli/services/vpc/v20170312/api.json +824 -254
  172. tccli/services/vpc/v20170312/examples.json +66 -10
  173. tccli/services/vpc/vpc_client.py +383 -12
  174. tccli/services/vrs/v20200824/api.json +9 -0
  175. tccli/services/waf/v20180125/api.json +8113 -5814
  176. tccli/services/waf/v20180125/examples.json +90 -0
  177. tccli/services/waf/waf_client.py +559 -82
  178. tccli/services/wedata/v20210820/api.json +1379 -24
  179. tccli/services/wedata/v20210820/examples.json +25 -1
  180. tccli/services/wedata/wedata_client.py +171 -12
  181. tccli/services/weilingwith/v20230427/api.json +1 -1
  182. tccli/services/weilingwith/v20230427/examples.json +3 -3
  183. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/METADATA +2 -2
  184. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/RECORD +187 -184
  185. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/WHEEL +0 -0
  186. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/entry_points.txt +0 -0
  187. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "actions": {
3
3
  "ChatCompletions": {
4
- "document": "### 接口功能\n\n调用接口,发起一次对话请求。单账号限制接口并发上限为5。\n如需使用OpenAI兼容接口, 请参考文档:[Deepseek OpenAI对话接口](https://cloud.tencent.com/document/product/1772/115969)\n\n#### 在线体验\n如您希望在网页内直接体验 DeepSeek 模型对话,推荐您前往[腾讯云大模型知识引擎](https://cloud.tencent.com/product/lke),使用[ DeepSeek 联网助手](https://lke.cloud.tencent.com/webim_exp/#/chat/wQrAwR)。\n\n#### 已支持的模型\n- DeepSeek-V3-0324(model 参数值为**deepseek-v3-0324**)\n - DeepSeek-V3-0324为671B参数MoE模型,在编程与技术能力、上下文理解与长文本处理等方面优势突出。\n - 支持64K上下文长度,最大输入56k,最大输出8k(不含思维链)。\n - 注意:相比于DeepSeek-V3,DeepSeek-V3-0324仅更新了模型权重,未增加参数量。总模型大小为685B,其中包括671B的主模型权重和 14B 的多令牌预测(MTP)模块权重,后续均描述主模型参数量。\n- DeepSeek-V3(model 参数值为**deepseek-v3**)\n - DeepSeek-V3为671B参数MoE模型,在百科知识、数学推理等多项任务上优势突出,评测成绩在主流榜单中位列开源模型榜首。\n - 支持64K上下文长度,最大输入56k,最大输出8k(不含思维链)。\n- DeepSeek-R1(model 参数值为**deepseek-r1**)\n - DeepSeek-R1为671B模型,使用强化学习训练,推理过程包含大量反思和验证,思维链长度可达数万字。 该系列模型在数学、代码以及各种复杂逻辑推理任务上推理效果优异,并为用户展现了完整的思考过程。\n - 支持64K上下文长度,最大输入56k,最大输出8k(不含思维链)。\n\n### 计费说明\n\n- 标准计费(2025年2月26日起生效),计费模式为后付费小时结,为保证您账户资源的正常使用,请提前[开通后付费](https://lke.cloud.tencent.com/lke#/app/system/charge/postpaid)并及时[充值](https://console.cloud.tencent.com/expense/recharge)。\n\n - DeepSeek-R1 模型 | 输入:0.004元/千token | 输出(含思维链):0.016元/千token\n\n - DeepSeek-V3 模型 | 输入:0.002元/千token | 输出:0.008元/千token\n\n - DeepSeek-V3-0324 模型 | 输入:0.002元/千token | 输出:0.008元/千token\n\n\n### Openai兼容协议接口\n知识引擎原子能力大模型对话 API 兼容了 OpenAI 的接口规范,这意味着您可以直接使用 OpenAI 官方提供的 SDK 来调用大模型对话接口。您仅需要将 base_url 和 [api_key](https://cloud.tencent.com/document/product/1772/115970) 替换成相关配置,不需要对应用做额外修改,即可无缝将您的应用切换到相应的大模型。请参考文档:[Deepseek OpenAI对话接口](https://cloud.tencent.com/document/product/1772/115969)。\n> base_url: https://api.lkeap.cloud.tencent.com/v1\n\n> api_key的获取请参考[API KEY管理](https://cloud.tencent.com/document/product/1772/115970)\n\n\n### 快速接入\n1. 完成[实名认证](https://console.cloud.tencent.com/developer/auth)。\n2. 主账户前往[控制台](https://console.cloud.tencent.com/lkeap)开通服务。若为子账户,需由主账号在[权限管理](https://console.cloud.tencent.com/cam)中为子账号授权,关联预设策略,策略名称:QcloudLKEAPFullAccess。\n3. 通过API Explorer[在线调试](https://console.cloud.tencent.com/api/explorer?Product=lkeap&Version=2024-05-22&Action=ChatCompletions)。\n4. 使用[官方 SDK ](https://cloud.tencent.com/document/product/1772/115963#SDK)调用本接口(支持Python/Java/PHP/Go/Node.js/.NET等语言)。\n\n-----------\n\n### SDK调用示例\n通过本地代码调用本接口(支持Python/Java/PHP/Go/Node.js/.NET等语言):下面的代码以 Python 语言为例,展示如何访问腾讯云上的DeepSeek模型API的样例。\n(1)安装环境\n```\npython3 -m pip install --upgrade tencentcloud-sdk-python-common\npython3 -m pip install --upgrade tencentcloud-sdk-python-lkeap\n```\n\n(2)示例代码\n\n- 其中SecretKey和SecretID需要从腾讯云控制台获取\n\n- 参数params中模型Model字段可以选择“deepseek-r1“和“deepseek-v3”\n\n```\n# -*- coding: utf-8 -*-\nimport json\n\nfrom tencentcloud.common.common_client import CommonClient\nfrom tencentcloud.common import credential\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.common.profile.client_profile import ClientProfile\nfrom tencentcloud.common.profile.http_profile import HttpProfile\n\nclass NonStreamResponse(object):\n def __init__(self):\n self.response = \"\"\n\n def _deserialize(self, obj):\n self.response = json.dumps(obj)\n\ntry:\n # 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密\n # 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305\n # 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取\n cred = credential.Credential(\"\", \"\")\n\n httpProfile = HttpProfile()\n httpProfile.endpoint = \"lkeap.tencentcloudapi.com\"\n httpProfile.reqTimeout = 40000 # 流式接口可能耗时较长\n clientProfile = ClientProfile()\n clientProfile.httpProfile = httpProfile\n\n params = \"{\\\"Model\\\":\\\"deepseek-r1\\\",\\\"Messages\\\":[{\\\"Role\\\":\\\"user\\\",\\\"Content\\\":\\\"你好\\\"}],\\\"Stream\\\":true}\";\n common_client = CommonClient(\"lkeap\", \"2024-05-22\", cred, \"ap-guangzhou\", profile=clientProfile)\n resp = common_client._call_and_deserialize(\"ChatCompletions\", json.loads(params), NonStreamResponse)\n if isinstance(resp, NonStreamResponse): # 非流式响应\n print(resp.response)\n else: # 流式响应\n for event in resp:\n print(event)\nexcept TencentCloudSDKException as err:\n print(err)\n\n```\n\n**DeepSeek-R1使用建议**\n\n1. 将温度设置在 0.5-0.7 范围内(建议为0.6),以防止无休止的重复或不连贯的输出。\n2. 避免添加system prompt,所有说明都应包含在user prompt中。",
4
+ "document": "### 接口功能\n\n调用接口,发起一次对话请求。单账号限制接口并发上限为100。\n如需使用OpenAI兼容接口, 请参考文档:[Deepseek OpenAI对话接口](https://cloud.tencent.com/document/product/1772/115969)\n\n#### 在线体验\n如您希望在网页内直接体验 DeepSeek 模型对话,推荐您前往[腾讯云大模型知识引擎](https://cloud.tencent.com/product/lke),使用[ DeepSeek 联网助手](https://lke.cloud.tencent.com/webim_exp/#/chat/wQrAwR)。\n\n#### 已支持的模型\n- DeepSeek-V3-0324(model 参数值为**deepseek-v3-0324**)\n - DeepSeek-V3-0324为671B参数MoE模型,在编程与技术能力、上下文理解与长文本处理等方面优势突出。\n - 支持128K上下文长度,最大输出16k(不含思维链)。\n - 注意:相比于DeepSeek-V3,DeepSeek-V3-0324仅更新了模型权重,未增加参数量。总模型大小为685B,其中包括671B的主模型权重和 14B 的多令牌预测(MTP)模块权重,后续均描述主模型参数量。\n- DeepSeek-V3(model 参数值为**deepseek-v3**)\n - DeepSeek-V3为671B参数MoE模型,在百科知识、数学推理等多项任务上优势突出,评测成绩在主流榜单中位列开源模型榜首。\n - 支持64K上下文长度,最大输出16k。\n- DeepSeek-R1(model 参数值为**deepseek-r1**)\n - DeepSeek-R1为671B模型,使用强化学习训练,推理过程包含大量反思和验证,思维链长度可达数万字。 该系列模型在数学、代码以及各种复杂逻辑推理任务上推理效果优异,并为用户展现了完整的思考过程。\n - 支持64K上下文长度,最大输出16k。\n\n### 计费说明\n\n- 标准计费(2025年2月26日起生效),计费模式为后付费小时结,为保证您账户资源的正常使用,请提前[开通后付费](https://lke.cloud.tencent.com/lke#/app/system/charge/postpaid)并及时[充值](https://console.cloud.tencent.com/expense/recharge)。\n\n - DeepSeek-R1 模型 | 输入:0.004元/千token | 输出(含思维链):0.016元/千token\n\n - DeepSeek-V3 模型 | 输入:0.002元/千token | 输出:0.008元/千token\n\n - DeepSeek-V3-0324 模型 | 输入:0.002元/千token | 输出:0.008元/千token\n\n\n### Openai兼容协议接口\n知识引擎原子能力大模型对话 API 兼容了 OpenAI 的接口规范,这意味着您可以直接使用 OpenAI 官方提供的 SDK 来调用大模型对话接口。您仅需要将 base_url 和 [api_key](https://cloud.tencent.com/document/product/1772/115970) 替换成相关配置,不需要对应用做额外修改,即可无缝将您的应用切换到相应的大模型。请参考文档:[Deepseek OpenAI对话接口](https://cloud.tencent.com/document/product/1772/115969)。\n> base_url: https://api.lkeap.cloud.tencent.com/v1\n\n> api_key的获取请参考[API KEY管理](https://cloud.tencent.com/document/product/1772/115970)\n\n\n### 快速接入\n1. 完成[实名认证](https://console.cloud.tencent.com/developer/auth)。\n2. 主账户前往[控制台](https://console.cloud.tencent.com/lkeap)开通服务。若为子账户,需由主账号在[权限管理](https://console.cloud.tencent.com/cam)中为子账号授权,关联预设策略,策略名称:QcloudLKEAPFullAccess。\n3. 通过API Explorer[在线调试](https://console.cloud.tencent.com/api/explorer?Product=lkeap&Version=2024-05-22&Action=ChatCompletions)。\n4. 使用[官方 SDK ](https://cloud.tencent.com/document/product/1772/115963#SDK)调用本接口(支持Python/Java/PHP/Go/Node.js/.NET等语言)。\n\n-----------\n\n### SDK调用示例\n通过本地代码调用本接口(支持Python/Java/PHP/Go/Node.js/.NET等语言):下面的代码以 Python 语言为例,展示如何访问腾讯云上的DeepSeek模型API的样例。\n(1)安装环境\n```\npython3 -m pip install --upgrade tencentcloud-sdk-python-common\npython3 -m pip install --upgrade tencentcloud-sdk-python-lkeap\n```\n\n(2)示例代码\n\n- 其中SecretKey和SecretID需要从腾讯云控制台获取\n\n- 参数params中模型Model字段可以选择“deepseek-r1“和“deepseek-v3”\n\n```\n# -*- coding: utf-8 -*-\nimport json\n\nfrom tencentcloud.common.common_client import CommonClient\nfrom tencentcloud.common import credential\nfrom tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException\nfrom tencentcloud.common.profile.client_profile import ClientProfile\nfrom tencentcloud.common.profile.http_profile import HttpProfile\n\nclass NonStreamResponse(object):\n def __init__(self):\n self.response = \"\"\n\n def _deserialize(self, obj):\n self.response = json.dumps(obj)\n\ntry:\n # 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密\n # 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305\n # 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取\n cred = credential.Credential(\"\", \"\")\n\n httpProfile = HttpProfile()\n httpProfile.endpoint = \"lkeap.tencentcloudapi.com\"\n httpProfile.reqTimeout = 40000 # 流式接口可能耗时较长\n clientProfile = ClientProfile()\n clientProfile.httpProfile = httpProfile\n\n params = \"{\\\"Model\\\":\\\"deepseek-r1\\\",\\\"Messages\\\":[{\\\"Role\\\":\\\"user\\\",\\\"Content\\\":\\\"你好\\\"}],\\\"Stream\\\":true}\";\n common_client = CommonClient(\"lkeap\", \"2024-05-22\", cred, \"ap-guangzhou\", profile=clientProfile)\n resp = common_client._call_and_deserialize(\"ChatCompletions\", json.loads(params), NonStreamResponse)\n if isinstance(resp, NonStreamResponse): # 非流式响应\n print(resp.response)\n else: # 流式响应\n for event in resp:\n print(event)\nexcept TencentCloudSDKException as err:\n print(err)\n\n```\n\n**DeepSeek-R1使用建议**\n\n1. 将温度设置在 0.5-0.7 范围内(建议为0.6),以防止无休止的重复或不连贯的输出。\n2. 避免添加system prompt,所有说明都应包含在user prompt中。",
5
5
  "input": "ChatCompletionsRequest",
6
6
  "name": "DeepSeek API 接口",
7
7
  "output": "ChatCompletionsResponse",
@@ -77,6 +77,13 @@
77
77
  "output": "DescribeDocResponse",
78
78
  "status": "online"
79
79
  },
80
+ "GetCharacterUsage": {
81
+ "document": "获取字符使用量统计",
82
+ "input": "GetCharacterUsageRequest",
83
+ "name": "获取账号下字符使用量与容量",
84
+ "output": "GetCharacterUsageResponse",
85
+ "status": "online"
86
+ },
80
87
  "GetEmbedding": {
81
88
  "document": "本接口(GetEmbedding)调用文本表示模型,将文本转化为用数值表示的向量形式,可用于文本检索、信息推荐、知识挖掘等场景。\n本接口(GetEmbedding)有单账号调用上限控制,如您有提高并发限制的需求请 [联系我们](https://cloud.tencent.com/act/event/Online_service) 。",
82
89
  "input": "GetEmbeddingRequest",
@@ -337,8 +344,8 @@
337
344
  },
338
345
  {
339
346
  "disabled": false,
340
- "document": "最大生成的token数量",
341
- "example": "100",
347
+ "document": "最大生成的token数量,默认为4096,最大可设置为16384",
348
+ "example": "8192",
342
349
  "member": "int64",
343
350
  "name": "MaxTokens",
344
351
  "required": false,
@@ -789,7 +796,7 @@
789
796
  "members": [
790
797
  {
791
798
  "disabled": false,
792
- "document": "文件类型。\n\n**支持的文件类型:**\n- `PDF`、`DOC`、`DOCX`、`XLS`、`XLSX`、`PPT`、`PPTX`、`MD`、`TXT`、`PNG`、`JPG`、`JPEG`、`CSV`、`HTML`、`EPUB`\n\n**支持的文件大小:**\n - `PDF` 最大500M\n - `DOCX`、`DOC`、`PPT`、`PPTX` 最大 200M\n - `TXT`、`MD` 最大10M\n - 其他 最大20M\n",
799
+ "document": "文件类型。\n\n**支持的文件类型:**\n- `PDF`、`DOC`、`DOCX`、`XLS`、`XLSX`、`PPT`、`PPTX`、`MD`、`TXT`、`PNG`、`JPG`、`JPEG`、`CSV`、`HTML`、`EPUB`\n\n**支持的文件大小:**\n - `PDF` 最大300M\n - `DOCX`、`DOC`、`PPT`、`PPTX` 最大 200M\n - `TXT`、`MD` 最大10M\n - 其他 最大20M\n",
793
800
  "example": "PDF",
794
801
  "member": "string",
795
802
  "name": "FileType",
@@ -1246,6 +1253,43 @@
1246
1253
  ],
1247
1254
  "usage": "both"
1248
1255
  },
1256
+ "GetCharacterUsageRequest": {
1257
+ "document": "GetCharacterUsage请求参数结构体",
1258
+ "members": [],
1259
+ "type": "object"
1260
+ },
1261
+ "GetCharacterUsageResponse": {
1262
+ "document": "GetCharacterUsage返回参数结构体",
1263
+ "members": [
1264
+ {
1265
+ "disabled": false,
1266
+ "document": "已用字符数",
1267
+ "example": "1000000",
1268
+ "member": "uint64",
1269
+ "name": "Used",
1270
+ "output_required": false,
1271
+ "type": "int",
1272
+ "value_allowed_null": false
1273
+ },
1274
+ {
1275
+ "disabled": false,
1276
+ "document": "可用字符数",
1277
+ "example": "3000000",
1278
+ "member": "uint64",
1279
+ "name": "Total",
1280
+ "output_required": false,
1281
+ "type": "int",
1282
+ "value_allowed_null": false
1283
+ },
1284
+ {
1285
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1286
+ "member": "string",
1287
+ "name": "RequestId",
1288
+ "type": "string"
1289
+ }
1290
+ ],
1291
+ "type": "object"
1292
+ },
1249
1293
  "GetEmbeddingRequest": {
1250
1294
  "document": "GetEmbedding请求参数结构体",
1251
1295
  "members": [
@@ -100,6 +100,14 @@
100
100
  "title": "查询文档详情"
101
101
  }
102
102
  ],
103
+ "GetCharacterUsage": [
104
+ {
105
+ "document": "获取使用的字符数与字符容量",
106
+ "input": "POST / HTTP/1.1\nHost: lkeap.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetCharacterUsage\n<公共请求参数>\n\n{}",
107
+ "output": "{\n \"Response\": {\n \"RequestId\": \"ec5608e7-e8f9-4a15-b536-b1651d954c82\",\n \"Total\": 300000000,\n \"Used\": 124331524\n }\n}",
108
+ "title": "获取使用的字符数与字符容量"
109
+ }
110
+ ],
103
111
  "GetEmbedding": [
104
112
  {
105
113
  "document": "",
@@ -745,58 +745,6 @@ def doGetFlowAlarmInfo(args, parsed_globals):
745
745
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
746
 
747
747
 
748
- def doCreateQos(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.MnaClient(cred, g_param[OptionsDefine.Region], profile)
775
- client._sdkVersion += ("_CLI_" + __version__)
776
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
777
- model = models.CreateQosRequest()
778
- model.from_json_string(json.dumps(args))
779
- start_time = time.time()
780
- while True:
781
- rsp = client.CreateQos(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
-
800
748
  def doDeleteL3Conn(args, parsed_globals):
801
749
  g_param = parse_global_arg(parsed_globals)
802
750
 
@@ -953,58 +901,6 @@ def doGetActiveDeviceCount(args, parsed_globals):
953
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
902
 
955
903
 
956
- def doGetFlowStatisticByRegion(args, parsed_globals):
957
- g_param = parse_global_arg(parsed_globals)
958
-
959
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
960
- cred = credential.CVMRoleCredential()
961
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
962
- cred = credential.STSAssumeRoleCredential(
963
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
964
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
965
- )
966
- 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):
967
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
968
- else:
969
- cred = credential.Credential(
970
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
971
- )
972
- http_profile = HttpProfile(
973
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
974
- reqMethod="POST",
975
- endpoint=g_param[OptionsDefine.Endpoint],
976
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
977
- )
978
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
979
- if g_param[OptionsDefine.Language]:
980
- profile.language = g_param[OptionsDefine.Language]
981
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
982
- client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
983
- client._sdkVersion += ("_CLI_" + __version__)
984
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
985
- model = models.GetFlowStatisticByRegionRequest()
986
- model.from_json_string(json.dumps(args))
987
- start_time = time.time()
988
- while True:
989
- rsp = client.GetFlowStatisticByRegion(model)
990
- result = rsp.to_json_string()
991
- try:
992
- json_obj = json.loads(result)
993
- except TypeError as e:
994
- json_obj = json.loads(result.decode('utf-8')) # python3.3
995
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
996
- break
997
- cur_time = time.time()
998
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
999
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1000
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1001
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1002
- else:
1003
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1004
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1005
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1006
-
1007
-
1008
904
  def doDeleteDevice(args, parsed_globals):
1009
905
  g_param = parse_global_arg(parsed_globals)
1010
906
 
@@ -1525,58 +1421,6 @@ def doCreateEncryptedKey(args, parsed_globals):
1525
1421
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1526
1422
 
1527
1423
 
1528
- def doDeleteQos(args, parsed_globals):
1529
- g_param = parse_global_arg(parsed_globals)
1530
-
1531
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1532
- cred = credential.CVMRoleCredential()
1533
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1534
- cred = credential.STSAssumeRoleCredential(
1535
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1536
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1537
- )
1538
- 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):
1539
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1540
- else:
1541
- cred = credential.Credential(
1542
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1543
- )
1544
- http_profile = HttpProfile(
1545
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1546
- reqMethod="POST",
1547
- endpoint=g_param[OptionsDefine.Endpoint],
1548
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1549
- )
1550
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1551
- if g_param[OptionsDefine.Language]:
1552
- profile.language = g_param[OptionsDefine.Language]
1553
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1554
- client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
1555
- client._sdkVersion += ("_CLI_" + __version__)
1556
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1557
- model = models.DeleteQosRequest()
1558
- model.from_json_string(json.dumps(args))
1559
- start_time = time.time()
1560
- while True:
1561
- rsp = client.DeleteQos(model)
1562
- result = rsp.to_json_string()
1563
- try:
1564
- json_obj = json.loads(result)
1565
- except TypeError as e:
1566
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1567
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1568
- break
1569
- cur_time = time.time()
1570
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1571
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1572
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1573
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1574
- else:
1575
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1576
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1577
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1578
-
1579
-
1580
1424
  def doGetDevice(args, parsed_globals):
1581
1425
  g_param = parse_global_arg(parsed_globals)
1582
1426
 
@@ -1941,7 +1785,7 @@ def doAddDevice(args, parsed_globals):
1941
1785
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1942
1786
 
1943
1787
 
1944
- def doDescribeQos(args, parsed_globals):
1788
+ def doGetFlowStatisticByRegion(args, parsed_globals):
1945
1789
  g_param = parse_global_arg(parsed_globals)
1946
1790
 
1947
1791
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -1970,11 +1814,11 @@ def doDescribeQos(args, parsed_globals):
1970
1814
  client = mod.MnaClient(cred, g_param[OptionsDefine.Region], profile)
1971
1815
  client._sdkVersion += ("_CLI_" + __version__)
1972
1816
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
1973
- model = models.DescribeQosRequest()
1817
+ model = models.GetFlowStatisticByRegionRequest()
1974
1818
  model.from_json_string(json.dumps(args))
1975
1819
  start_time = time.time()
1976
1820
  while True:
1977
- rsp = client.DescribeQos(model)
1821
+ rsp = client.GetFlowStatisticByRegion(model)
1978
1822
  result = rsp.to_json_string()
1979
1823
  try:
1980
1824
  json_obj = json.loads(result)
@@ -2278,11 +2122,9 @@ ACTION_MAP = {
2278
2122
  "GetFlowPackages": doGetFlowPackages,
2279
2123
  "AddHardware": doAddHardware,
2280
2124
  "GetFlowAlarmInfo": doGetFlowAlarmInfo,
2281
- "CreateQos": doCreateQos,
2282
2125
  "DeleteL3Conn": doDeleteL3Conn,
2283
2126
  "DeleteGroup": doDeleteGroup,
2284
2127
  "GetActiveDeviceCount": doGetActiveDeviceCount,
2285
- "GetFlowStatisticByRegion": doGetFlowStatisticByRegion,
2286
2128
  "DeleteDevice": doDeleteDevice,
2287
2129
  "UpdateDevice": doUpdateDevice,
2288
2130
  "OrderPerLicense": doOrderPerLicense,
@@ -2293,7 +2135,6 @@ ACTION_MAP = {
2293
2135
  "GetVendorHardware": doGetVendorHardware,
2294
2136
  "AddL3Conn": doAddL3Conn,
2295
2137
  "CreateEncryptedKey": doCreateEncryptedKey,
2296
- "DeleteQos": doDeleteQos,
2297
2138
  "GetDevice": doGetDevice,
2298
2139
  "GroupDeleteDevice": doGroupDeleteDevice,
2299
2140
  "OrderFlowPackage": doOrderFlowPackage,
@@ -2301,7 +2142,7 @@ ACTION_MAP = {
2301
2142
  "GetHardwareList": doGetHardwareList,
2302
2143
  "UpdateL3Switch": doUpdateL3Switch,
2303
2144
  "AddDevice": doAddDevice,
2304
- "DescribeQos": doDescribeQos,
2145
+ "GetFlowStatisticByRegion": doGetFlowStatisticByRegion,
2305
2146
  "GetGroupList": doGetGroupList,
2306
2147
  "UpdateGroup": doUpdateGroup,
2307
2148
  "UpdateL3Cidr": doUpdateL3Cidr,