tccli 3.0.1225.1__py2.py3-none-any.whl → 3.0.1226.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 (33) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/billing/v20180709/api.json +23 -23
  3. tccli/services/billing/v20180709/examples.json +5 -5
  4. tccli/services/cdb/v20170320/api.json +218 -2
  5. tccli/services/cdb/v20170320/examples.json +3 -3
  6. tccli/services/cdwdoris/v20211228/api.json +1 -1
  7. tccli/services/ckafka/v20190819/api.json +791 -679
  8. tccli/services/dts/v20211206/api.json +21 -1
  9. tccli/services/faceid/v20180301/api.json +1 -1
  10. tccli/services/hunyuan/hunyuan_client.py +53 -0
  11. tccli/services/hunyuan/v20230901/api.json +297 -0
  12. tccli/services/hunyuan/v20230901/examples.json +8 -0
  13. tccli/services/ims/v20201229/api.json +2 -2
  14. tccli/services/lcic/v20220817/api.json +1 -1
  15. tccli/services/live/live_client.py +53 -0
  16. tccli/services/live/v20180801/api.json +204 -35
  17. tccli/services/live/v20180801/examples.json +9 -1
  18. tccli/services/lke/v20231130/api.json +1 -1
  19. tccli/services/mps/v20190612/api.json +174 -13
  20. tccli/services/scf/v20180416/api.json +1 -1
  21. tccli/services/trtc/v20190722/api.json +20 -0
  22. tccli/services/tsf/v20180326/api.json +1287 -118
  23. tccli/services/tsf/v20180326/examples.json +5 -5
  24. tccli/services/tts/v20190823/api.json +2 -2
  25. tccli/services/vclm/v20240523/api.json +77 -6
  26. tccli/services/vclm/v20240523/examples.json +9 -1
  27. tccli/services/vclm/vclm_client.py +53 -0
  28. tccli/services/vdb/v20230616/api.json +20 -0
  29. {tccli-3.0.1225.1.dist-info → tccli-3.0.1226.1.dist-info}/METADATA +2 -2
  30. {tccli-3.0.1225.1.dist-info → tccli-3.0.1226.1.dist-info}/RECORD +33 -33
  31. {tccli-3.0.1225.1.dist-info → tccli-3.0.1226.1.dist-info}/WHEEL +0 -0
  32. {tccli-3.0.1225.1.dist-info → tccli-3.0.1226.1.dist-info}/entry_points.txt +0 -0
  33. {tccli-3.0.1225.1.dist-info → tccli-3.0.1226.1.dist-info}/license_files/LICENSE +0 -0
@@ -9352,7 +9352,27 @@
9352
9352
  "example": "invalid connection",
9353
9353
  "member": "string",
9354
9354
  "name": "Message",
9355
- "required": false,
9355
+ "output_required": true,
9356
+ "type": "string",
9357
+ "value_allowed_null": false
9358
+ },
9359
+ {
9360
+ "disabled": false,
9361
+ "document": "报错原因",
9362
+ "example": "无",
9363
+ "member": "string",
9364
+ "name": "Reason",
9365
+ "output_required": false,
9366
+ "type": "string",
9367
+ "value_allowed_null": false
9368
+ },
9369
+ {
9370
+ "disabled": false,
9371
+ "document": "建议的修复方案",
9372
+ "example": "无",
9373
+ "member": "string",
9374
+ "name": "Solution",
9375
+ "output_required": false,
9356
9376
  "type": "string",
9357
9377
  "value_allowed_null": false
9358
9378
  }
@@ -4445,7 +4445,7 @@
4445
4445
  },
4446
4446
  {
4447
4447
  "disabled": false,
4448
- "document": "状态码。\n- 取值范围:\n0:正常。\n1:停机。\n2:销号。\n3:空号。\n4:不在网。\n99:未知状态。",
4448
+ "document": "状态码。\n- 取值范围:\n0:正常。\n1:停机。\n2:销号。\n4:不在网。\n99:未知状态。",
4449
4449
  "example": "1",
4450
4450
  "member": "int64",
4451
4451
  "name": "StatusCode",
@@ -693,6 +693,58 @@ def doQueryHunyuanImageChatJob(args, parsed_globals):
693
693
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
694
 
695
695
 
696
+ def doChatTranslations(args, parsed_globals):
697
+ g_param = parse_global_arg(parsed_globals)
698
+
699
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
700
+ cred = credential.CVMRoleCredential()
701
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
702
+ cred = credential.STSAssumeRoleCredential(
703
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
704
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
705
+ )
706
+ 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):
707
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
708
+ else:
709
+ cred = credential.Credential(
710
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
711
+ )
712
+ http_profile = HttpProfile(
713
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
714
+ reqMethod="POST",
715
+ endpoint=g_param[OptionsDefine.Endpoint],
716
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
717
+ )
718
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
719
+ if g_param[OptionsDefine.Language]:
720
+ profile.language = g_param[OptionsDefine.Language]
721
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
722
+ client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
723
+ client._sdkVersion += ("_CLI_" + __version__)
724
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
725
+ model = models.ChatTranslationsRequest()
726
+ model.from_json_string(json.dumps(args))
727
+ start_time = time.time()
728
+ while True:
729
+ rsp = client.ChatTranslations(model)
730
+ result = rsp.to_json_string()
731
+ try:
732
+ json_obj = json.loads(result)
733
+ except TypeError as e:
734
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
735
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
736
+ break
737
+ cur_time = time.time()
738
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
739
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
740
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
741
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
742
+ else:
743
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
744
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
745
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
746
+
747
+
696
748
  def doActivateService(args, parsed_globals):
697
749
  g_param = parse_global_arg(parsed_globals)
698
750
 
@@ -977,6 +1029,7 @@ ACTION_MAP = {
977
1029
  "GetThreadMessage": doGetThreadMessage,
978
1030
  "ChatCompletions": doChatCompletions,
979
1031
  "QueryHunyuanImageChatJob": doQueryHunyuanImageChatJob,
1032
+ "ChatTranslations": doChatTranslations,
980
1033
  "ActivateService": doActivateService,
981
1034
  "GetThreadMessageList": doGetThreadMessageList,
982
1035
  "SetPayMode": doSetPayMode,
@@ -14,6 +14,13 @@
14
14
  "output": "ChatCompletionsResponse",
15
15
  "status": "online"
16
16
  },
17
+ "ChatTranslations": {
18
+ "document": "腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。\n 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。",
19
+ "input": "ChatTranslationsRequest",
20
+ "name": "hunyuan-translations",
21
+ "output": "ChatTranslationsResponse",
22
+ "status": "online"
23
+ },
17
24
  "CreateThread": {
18
25
  "document": "腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。\n\n 1. 本接口暂不支持返回图片内容。\n 2. 默认该接口下单账号限制并发数为 5 路,如您有提高并发限制的需求请 [购买](https://buy.cloud.tencent.com/hunyuan) 。\n 3. 请使用 SDK 调用本接口,每种开发语言的 SDK Git 仓库 examples/hunyuan/v20230901/ 目录下有提供示例供参考。SDK 链接在文档下方 “**开发者资源 - SDK**” 部分提供。\n 4. 我们推荐您使用 API Explorer,方便快速地在线调试接口和下载各语言的示例代码,[点击打开](https://console.cloud.tencent.com/api/explorer?Product=hunyuan&Version=2023-09-01&Action=ChatCompletions)。",
19
26
  "input": "CreateThreadRequest",
@@ -307,6 +314,15 @@
307
314
  "name": "Seed",
308
315
  "required": false,
309
316
  "type": "int"
317
+ },
318
+ {
319
+ "disabled": false,
320
+ "document": "强制搜索增强开关。\n说明:\n1. 未传值时默认关闭。\n2. 开启后,将强制走AI搜索,当AI搜索结果为空时,由大模型回复兜底话术。",
321
+ "example": "false",
322
+ "member": "bool",
323
+ "name": "ForceSearchEnhancement",
324
+ "required": false,
325
+ "type": "bool"
310
326
  }
311
327
  ],
312
328
  "type": "object"
@@ -413,6 +429,147 @@
413
429
  ],
414
430
  "type": "object"
415
431
  },
432
+ "ChatTranslationsRequest": {
433
+ "document": "ChatTranslations请求参数结构体",
434
+ "members": [
435
+ {
436
+ "disabled": false,
437
+ "document": "模型名称,可选值包括 hunyuan-translation、hunyuan-translation-lite。\n各模型介绍请阅读 [产品概述](https://cloud.tencent.com/document/product/1729/104753) 中的说明。\n\n注意:\n不同的模型计费不同,请根据 [购买指南](https://cloud.tencent.com/document/product/1729/97731) 按需调用。",
438
+ "example": "hunyuan-translation",
439
+ "member": "string",
440
+ "name": "Model",
441
+ "required": true,
442
+ "type": "string"
443
+ },
444
+ {
445
+ "disabled": false,
446
+ "document": "流式调用开关。\n说明:\n1. 未传值时默认为非流式调用(false)。\n2. 流式调用时以 SSE 协议增量返回结果(返回值取 Choices[n].Delta 中的值,需要拼接增量数据才能获得完整结果)。\n3. 非流式调用时:\n调用方式与普通 HTTP 请求无异。\n接口响应耗时较长,**如需更低时延建议设置为 true**。\n只返回一次最终结果(返回值取 Choices[n].Message 中的值)。\n\n注意:\n通过 SDK 调用时,流式和非流式调用需用**不同的方式**获取返回值,具体参考 SDK 中的注释或示例(在各语言 SDK 代码仓库的 examples/hunyuan/v20230901/ 目录中)。",
447
+ "example": "false",
448
+ "member": "bool",
449
+ "name": "Stream",
450
+ "required": false,
451
+ "type": "bool"
452
+ },
453
+ {
454
+ "disabled": false,
455
+ "document": "待翻译的文本",
456
+ "example": "Playing video games leads to lasting improvements in cognitive abilities.",
457
+ "member": "string",
458
+ "name": "Text",
459
+ "required": false,
460
+ "type": "string"
461
+ },
462
+ {
463
+ "disabled": false,
464
+ "document": "源语言。\n支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:id",
465
+ "example": "en",
466
+ "member": "string",
467
+ "name": "Source",
468
+ "required": false,
469
+ "type": "string"
470
+ },
471
+ {
472
+ "disabled": false,
473
+ "document": "目标语言。\n支持语言列表: 1. 简体中文:zh,2. 粤语:yue,3. 英语:en,4. 法语:fr,5. 葡萄牙语:pt,6. 西班牙语:es,7. 日语:ja,8. 土耳其语:tr,9. 俄语:ru,10. 阿拉伯语:ar,11. 韩语:ko,12. 泰语:th,13. 意大利语:it,14. 德语:de,15. 越南语:vi,16. 马来语:ms,17. 印尼语:id",
474
+ "example": "zh",
475
+ "member": "string",
476
+ "name": "Target",
477
+ "required": false,
478
+ "type": "string"
479
+ },
480
+ {
481
+ "disabled": false,
482
+ "document": "待翻译文本所属领域,例如游戏剧情等",
483
+ "example": "游戏剧情",
484
+ "member": "string",
485
+ "name": "Field",
486
+ "required": false,
487
+ "type": "string"
488
+ },
489
+ {
490
+ "disabled": false,
491
+ "document": "参考示例,最多10个",
492
+ "example": "无",
493
+ "member": "Reference",
494
+ "name": "References",
495
+ "required": false,
496
+ "type": "list"
497
+ }
498
+ ],
499
+ "type": "object"
500
+ },
501
+ "ChatTranslationsResponse": {
502
+ "document": "ChatTranslations返回参数结构体",
503
+ "members": [
504
+ {
505
+ "disabled": false,
506
+ "document": "本次请求的 RequestId。",
507
+ "example": "9c772634-8824-43e8-bc24-8bc4c19b9151",
508
+ "member": "string",
509
+ "name": "Id",
510
+ "output_required": false,
511
+ "type": "string",
512
+ "value_allowed_null": false
513
+ },
514
+ {
515
+ "disabled": false,
516
+ "document": "免责声明。",
517
+ "example": "以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记",
518
+ "member": "string",
519
+ "name": "Note",
520
+ "output_required": false,
521
+ "type": "string",
522
+ "value_allowed_null": false
523
+ },
524
+ {
525
+ "disabled": false,
526
+ "document": "Unix 时间戳,单位为秒。",
527
+ "example": "1705634032",
528
+ "member": "int64",
529
+ "name": "Created",
530
+ "output_required": false,
531
+ "type": "int",
532
+ "value_allowed_null": false
533
+ },
534
+ {
535
+ "disabled": false,
536
+ "document": "Token 统计信息。\n按照总 Token 数量计费。",
537
+ "example": "无",
538
+ "member": "Usage",
539
+ "name": "Usage",
540
+ "output_required": false,
541
+ "type": "object",
542
+ "value_allowed_null": false
543
+ },
544
+ {
545
+ "disabled": false,
546
+ "document": "回复内容。",
547
+ "example": "无",
548
+ "member": "TranslationChoice",
549
+ "name": "Choices",
550
+ "output_required": false,
551
+ "type": "list",
552
+ "value_allowed_null": false
553
+ },
554
+ {
555
+ "disabled": false,
556
+ "document": "错误信息。\n如果流式返回中服务处理异常,返回该错误信息。",
557
+ "example": "无",
558
+ "member": "ErrorMsg",
559
+ "name": "ErrorMsg",
560
+ "output_required": false,
561
+ "type": "object",
562
+ "value_allowed_null": false
563
+ },
564
+ {
565
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。本接口为流式响应接口,当请求成功时,RequestId 会被放在 HTTP 响应的 Header \"X-TC-RequestId\" 中。",
566
+ "member": "string",
567
+ "name": "RequestId",
568
+ "type": "string"
569
+ }
570
+ ],
571
+ "type": "object"
572
+ },
416
573
  "Choice": {
417
574
  "document": "返回的回复, 支持多个",
418
575
  "members": [
@@ -1933,6 +2090,39 @@
1933
2090
  ],
1934
2091
  "type": "object"
1935
2092
  },
2093
+ "Reference": {
2094
+ "document": "翻译对话参考示例",
2095
+ "members": [
2096
+ {
2097
+ "disabled": false,
2098
+ "document": "翻译文本类型,枚举\"sentence\"表示句子, \"term\"表示术语",
2099
+ "example": "sentence",
2100
+ "member": "string",
2101
+ "name": "Type",
2102
+ "required": false,
2103
+ "type": "string"
2104
+ },
2105
+ {
2106
+ "disabled": false,
2107
+ "document": "原文",
2108
+ "example": "Computer games are a perfect recipe for strengthening our cognitive skills",
2109
+ "member": "string",
2110
+ "name": "Text",
2111
+ "required": false,
2112
+ "type": "string"
2113
+ },
2114
+ {
2115
+ "disabled": false,
2116
+ "document": "译文",
2117
+ "example": "电脑游戏是增强我们认知能力的完美秘诀",
2118
+ "member": "string",
2119
+ "name": "Translation",
2120
+ "required": false,
2121
+ "type": "string"
2122
+ }
2123
+ ],
2124
+ "usage": "in"
2125
+ },
1936
2126
  "RelevantEntity": {
1937
2127
  "document": "相关组织及人物",
1938
2128
  "members": [
@@ -2471,6 +2661,15 @@
2471
2661
  "required": false,
2472
2662
  "type": "int"
2473
2663
  },
2664
+ {
2665
+ "disabled": false,
2666
+ "document": "超分选项,默认不做超分,可选开启。\n x2:2倍超分\n x4:4倍超分",
2667
+ "example": "x2",
2668
+ "member": "string",
2669
+ "name": "Clarity",
2670
+ "required": false,
2671
+ "type": "string"
2672
+ },
2474
2673
  {
2475
2674
  "disabled": false,
2476
2675
  "document": "prompt 扩写开关。1为开启,0为关闭,不传默认开启。\n开启扩写后,将自动扩写原始输入的 prompt 并使用扩写后的 prompt 生成图片,返回生成图片结果时将一并返回扩写后的 prompt 文本。\n如果关闭扩写,将直接使用原始输入的 prompt 生成图片。\n建议开启,在多数场景下可提升生成图片效果、丰富生成图片细节。",
@@ -3024,6 +3223,104 @@
3024
3223
  ],
3025
3224
  "usage": "in"
3026
3225
  },
3226
+ "TranslationChoice": {
3227
+ "document": "翻译接口返回的回复,支持多个",
3228
+ "members": [
3229
+ {
3230
+ "disabled": false,
3231
+ "document": "结束标志位,可能为 stop、 sensitive。\nstop 表示输出正常结束。\nsensitive 只在开启流式输出审核时会出现,表示安全审核未通过。",
3232
+ "example": "stop",
3233
+ "member": "string",
3234
+ "name": "FinishReason",
3235
+ "output_required": false,
3236
+ "type": "string",
3237
+ "value_allowed_null": false
3238
+ },
3239
+ {
3240
+ "disabled": false,
3241
+ "document": "索引值,流式调用时使用该字段。",
3242
+ "example": "0",
3243
+ "member": "int64",
3244
+ "name": "Index",
3245
+ "output_required": false,
3246
+ "type": "int",
3247
+ "value_allowed_null": false
3248
+ },
3249
+ {
3250
+ "disabled": false,
3251
+ "document": "增量返回值,流式调用时使用该字段。",
3252
+ "example": "无",
3253
+ "member": "TranslationDelta",
3254
+ "name": "Delta",
3255
+ "output_required": false,
3256
+ "type": "object",
3257
+ "value_allowed_null": false
3258
+ },
3259
+ {
3260
+ "disabled": false,
3261
+ "document": "返回值,非流式调用时使用该字段。",
3262
+ "example": "无",
3263
+ "member": "TranslationMessage",
3264
+ "name": "Message",
3265
+ "output_required": false,
3266
+ "type": "object",
3267
+ "value_allowed_null": false
3268
+ }
3269
+ ],
3270
+ "usage": "out"
3271
+ },
3272
+ "TranslationDelta": {
3273
+ "document": "翻译接口返回的内容(流式返回)",
3274
+ "members": [
3275
+ {
3276
+ "disabled": false,
3277
+ "document": "角色名称。",
3278
+ "example": "assistant",
3279
+ "member": "string",
3280
+ "name": "Role",
3281
+ "output_required": false,
3282
+ "type": "string",
3283
+ "value_allowed_null": false
3284
+ },
3285
+ {
3286
+ "disabled": false,
3287
+ "document": "内容详情。",
3288
+ "example": "你好!请问有什么我可以帮助你的吗?",
3289
+ "member": "string",
3290
+ "name": "Content",
3291
+ "output_required": false,
3292
+ "type": "string",
3293
+ "value_allowed_null": false
3294
+ }
3295
+ ],
3296
+ "usage": "out"
3297
+ },
3298
+ "TranslationMessage": {
3299
+ "document": "翻译接口会话内容",
3300
+ "members": [
3301
+ {
3302
+ "disabled": false,
3303
+ "document": "角色,可选值包括 system、user、assistant、 tool。",
3304
+ "example": "user",
3305
+ "member": "string",
3306
+ "name": "Role",
3307
+ "output_required": false,
3308
+ "type": "string",
3309
+ "value_allowed_null": false
3310
+ },
3311
+ {
3312
+ "disabled": false,
3313
+ "document": "文本内容",
3314
+ "example": "你好!",
3315
+ "member": "string",
3316
+ "name": "Content",
3317
+ "output_required": false,
3318
+ "type": "string",
3319
+ "value_allowed_null": false
3320
+ }
3321
+ ],
3322
+ "usage": "out"
3323
+ },
3027
3324
  "Usage": {
3028
3325
  "document": "Token 数量",
3029
3326
  "members": [
@@ -70,6 +70,14 @@
70
70
  "title": "深度研究示例"
71
71
  }
72
72
  ],
73
+ "ChatTranslations": [
74
+ {
75
+ "document": "非流式调用翻译接口",
76
+ "input": "POST / HTTP/1.1\nHost: hunyuan.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ChatTranslations\n<公共请求参数>\n\n{\n \"Model\": \"hunyuan-translation\",\n \"Stream\": false,\n \"Text\": \"Playing video games leads to lasting improvements in cognitive abilities.\",\n \"Source\": \"en\",\n \"Target\": \"zh\",\n \"Field\": \"游戏剧情\",\n \"References\": [\n {\n \"Type\": \"sentence\",\n \"Text\": \"Computer games are a perfect recipe for strengthening our cognitive skills\",\n \"Translation\": \"电脑游戏是增强我们认知能力的完美秘诀\"\n }\n ]\n}",
77
+ "output": "{\n \"Response\": {\n \"RequestId\": \"e638f0a0-a2a5-4c43-a1c6-798a7cbfbb18\",\n \"Id\": \"e638f0a0-a2a5-4c43-a1c6-798a7cbfbb18\",\n \"Created\": 1733133524,\n \"Choices\": [\n {\n \"Index\": 0,\n \"Message\": {\n \"Role\": \"assistant\",\n \"Content\": \"玩视频游戏会导致认知能力持久的提升。\"\n },\n \"FinishReason\": \"stop\"\n }\n ],\n \"Usage\": {\n \"PromptTokens\": 96,\n \"CompletionTokens\": 10,\n \"TotalTokens\": 106\n },\n \"Note\": \"以上内容为AI生成,不代表开发者立场,请勿删除或修改本标记\"\n }\n}",
78
+ "title": "非流式调用翻译接口"
79
+ }
80
+ ],
73
81
  "CreateThread": [
74
82
  {
75
83
  "document": "创建会话",
@@ -240,7 +240,7 @@
240
240
  },
241
241
  {
242
242
  "disabled": false,
243
- "document": "该字段表示待检测图片文件内容的Base64编码,由于云API对请求包体有大小限制,图片的**Base64编码内容大小不得超过10MB**。<br/>备注:**该字段与FileUrl必须选择输入其中一个**。<br />",
243
+ "document": "该字段表示待检测图片文件内容的Base64编码,由于云API对请求包体有大小限制,图片的**Base64编码内容大小不得超过10MB**。<br/>备注:**该字段与FileUrl必须选择输入其中一个**。",
244
244
  "example": "aHR0cDovL2lubmVycG9ybnNjcmVlbnNob3QtMTI1MjgxMzg1MC5jb3MuYXAtZ3Vh",
245
245
  "member": "string",
246
246
  "name": "FileContent",
@@ -249,7 +249,7 @@
249
249
  },
250
250
  {
251
251
  "disabled": false,
252
- "document": "该字段表示待检测图片文件的访问链接,URL源图**大小不超过30MB**。<br />备注:该字段与FileContent必须选择输入其中一个。 <br />",
252
+ "document": "该字段表示待检测图片文件的访问链接,URL源图**大小不超过30MB**。<br />备注:该字段与FileContent必须选择输入其中一个。",
253
253
  "example": "https://cmstest-123.cos.ap-guangzhou.myqcloud.com/image.jpg",
254
254
  "member": "string",
255
255
  "name": "FileUrl",
@@ -1656,7 +1656,7 @@
1656
1656
  },
1657
1657
  {
1658
1658
  "disabled": false,
1659
- "document": "上课后是否禁止自动录制。可以有以下取值:\n0 不禁止录制(自动开启录制,默认值)\n1 禁止录制\n注:如果该配置取值为0,录制将从上课后开始,课堂结束后停止。",
1659
+ "document": "录制方式,可以有以下取值:0 开启自动录制(默认值)1 禁止录制2 开启手动录制 注: - 如果该配置取值为0,录制将从上课后开始,课堂结束后停止。 - 如果该配置取值为2,需通过startRecord、stopRecord接口控制录制的开始和结束。 示例值:1",
1660
1660
  "example": "1",
1661
1661
  "member": "uint64",
1662
1662
  "name": "DisableRecord",
@@ -4281,6 +4281,58 @@ def doCreateCasterPgm(args, parsed_globals):
4281
4281
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4282
4282
 
4283
4283
 
4284
+ def doDescribeLiveEnhanceInfoList(args, parsed_globals):
4285
+ g_param = parse_global_arg(parsed_globals)
4286
+
4287
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4288
+ cred = credential.CVMRoleCredential()
4289
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4290
+ cred = credential.STSAssumeRoleCredential(
4291
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4292
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4293
+ )
4294
+ 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):
4295
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4296
+ else:
4297
+ cred = credential.Credential(
4298
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4299
+ )
4300
+ http_profile = HttpProfile(
4301
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4302
+ reqMethod="POST",
4303
+ endpoint=g_param[OptionsDefine.Endpoint],
4304
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4305
+ )
4306
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4307
+ if g_param[OptionsDefine.Language]:
4308
+ profile.language = g_param[OptionsDefine.Language]
4309
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4310
+ client = mod.LiveClient(cred, g_param[OptionsDefine.Region], profile)
4311
+ client._sdkVersion += ("_CLI_" + __version__)
4312
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4313
+ model = models.DescribeLiveEnhanceInfoListRequest()
4314
+ model.from_json_string(json.dumps(args))
4315
+ start_time = time.time()
4316
+ while True:
4317
+ rsp = client.DescribeLiveEnhanceInfoList(model)
4318
+ result = rsp.to_json_string()
4319
+ try:
4320
+ json_obj = json.loads(result)
4321
+ except TypeError as e:
4322
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4323
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4324
+ break
4325
+ cur_time = time.time()
4326
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4327
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4328
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4329
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4330
+ else:
4331
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4332
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4333
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4334
+
4335
+
4284
4336
  def doDescribePullTransformPushInfo(args, parsed_globals):
4285
4337
  g_param = parse_global_arg(parsed_globals)
4286
4338
 
@@ -10198,6 +10250,7 @@ ACTION_MAP = {
10198
10250
  "ModifyLiveDomainCertBindings": doModifyLiveDomainCertBindings,
10199
10251
  "DescribeDeliverLogDownList": doDescribeDeliverLogDownList,
10200
10252
  "CreateCasterPgm": doCreateCasterPgm,
10253
+ "DescribeLiveEnhanceInfoList": doDescribeLiveEnhanceInfoList,
10201
10254
  "DescribePullTransformPushInfo": doDescribePullTransformPushInfo,
10202
10255
  "CreateLiveCallbackTemplate": doCreateLiveCallbackTemplate,
10203
10256
  "DescribeLiveDomains": doDescribeLiveDomains,