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.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +2 -1
- tccli/services/asr/v20190614/api.json +18 -18
- tccli/services/batch/v20170312/api.json +14 -14
- tccli/services/bh/bh_client.py +623 -93
- tccli/services/bh/v20230418/api.json +1054 -32
- tccli/services/bh/v20230418/examples.json +93 -1
- tccli/services/billing/billing_client.py +4 -57
- tccli/services/billing/v20180709/api.json +3 -305
- tccli/services/billing/v20180709/examples.json +2 -10
- tccli/services/bpaas/v20181217/api.json +56 -56
- tccli/services/cat/cat_client.py +61 -8
- tccli/services/cat/v20180409/api.json +115 -0
- tccli/services/cat/v20180409/examples.json +20 -0
- tccli/services/cbs/v20170312/api.json +9 -7
- tccli/services/cbs/v20170312/examples.json +2 -2
- tccli/services/ccc/ccc_client.py +216 -4
- tccli/services/ccc/v20200210/api.json +364 -6
- tccli/services/ccc/v20200210/examples.json +32 -0
- tccli/services/cdb/v20170320/api.json +23 -14
- tccli/services/cdb/v20170320/examples.json +3 -3
- tccli/services/cdc/cdc_client.py +173 -67
- tccli/services/cdc/v20201214/api.json +96 -0
- tccli/services/cdc/v20201214/examples.json +16 -0
- tccli/services/cdn/v20180606/api.json +365 -279
- tccli/services/cdwch/v20200915/api.json +21 -21
- tccli/services/cdwdoris/v20211228/api.json +21 -1
- tccli/services/cdwdoris/v20211228/examples.json +4 -4
- tccli/services/cdwpg/v20201230/api.json +375 -360
- tccli/services/cdwpg/v20201230/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +201 -5
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/chc/chc_client.py +57 -4
- tccli/services/chc/v20230418/api.json +108 -1
- tccli/services/chc/v20230418/examples.json +8 -0
- tccli/services/ckafka/ckafka_client.py +408 -302
- tccli/services/ckafka/v20190819/api.json +197 -2
- tccli/services/ckafka/v20190819/examples.json +16 -0
- tccli/services/clb/v20180317/api.json +439 -379
- tccli/services/clb/v20180317/examples.json +7 -7
- tccli/services/cls/cls_client.py +53 -0
- tccli/services/cls/v20201016/api.json +86 -3
- tccli/services/cls/v20201016/examples.json +11 -3
- tccli/services/cvm/v20170312/api.json +165 -147
- tccli/services/cvm/v20170312/examples.json +6 -6
- tccli/services/cwp/v20180228/api.json +93 -14
- tccli/services/cwp/v20180228/examples.json +7 -7
- tccli/services/cynosdb/cynosdb_client.py +171 -12
- tccli/services/cynosdb/v20190107/api.json +252 -3
- tccli/services/cynosdb/v20190107/examples.json +24 -0
- tccli/services/dbbrain/dbbrain_client.py +57 -4
- tccli/services/dbbrain/v20210527/api.json +62 -0
- tccli/services/dbbrain/v20210527/examples.json +8 -0
- tccli/services/dc/v20180410/api.json +1 -1
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +816 -655
- tccli/services/dlc/v20210125/examples.json +73 -59
- tccli/services/dsgc/v20190723/api.json +18 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/dts/v20211206/examples.json +6 -0
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +127 -0
- tccli/services/emr/v20190103/examples.json +8 -0
- tccli/services/es/es_client.py +686 -151
- tccli/services/es/v20180416/api.json +509 -436
- tccli/services/es/v20180416/examples.json +43 -49
- tccli/services/es/v20250101/api.json +1391 -0
- tccli/services/es/v20250101/examples.json +85 -0
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +142 -21
- tccli/services/ess/v20201111/examples.json +14 -0
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +112 -9
- tccli/services/essbasic/v20210526/examples.json +8 -0
- tccli/services/gaap/v20180529/api.json +321 -312
- tccli/services/gaap/v20180529/examples.json +2 -2
- tccli/services/gs/gs_client.py +538 -8
- tccli/services/gs/v20191118/api.json +947 -44
- tccli/services/gs/v20191118/examples.json +87 -1
- tccli/services/gwlb/v20240906/api.json +56 -37
- tccli/services/gwlb/v20240906/examples.json +11 -5
- tccli/services/hunyuan/hunyuan_client.py +175 -69
- tccli/services/hunyuan/v20230901/api.json +191 -1
- tccli/services/hunyuan/v20230901/examples.json +17 -1
- tccli/services/ioa/ioa_client.py +227 -15
- tccli/services/ioa/v20220601/api.json +479 -0
- tccli/services/ioa/v20220601/examples.json +44 -0
- tccli/services/iotexplorer/iotexplorer_client.py +322 -4
- tccli/services/iotexplorer/v20190423/api.json +865 -52
- tccli/services/iotexplorer/v20190423/examples.json +64 -16
- tccli/services/iotvideo/iotvideo_client.py +57 -4
- tccli/services/iotvideo/v20211125/api.json +146 -0
- tccli/services/iotvideo/v20211125/examples.json +8 -0
- tccli/services/iotvideoindustry/v20201201/api.json +1 -1
- tccli/services/kms/v20190118/api.json +38 -2
- tccli/services/lcic/v20220817/api.json +66 -1
- tccli/services/lcic/v20220817/examples.json +1 -1
- tccli/services/lighthouse/lighthouse_client.py +0 -106
- tccli/services/lighthouse/v20200324/api.json +11 -98
- tccli/services/lighthouse/v20200324/examples.json +0 -16
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/lke/v20231130/api.json +208 -10
- tccli/services/lke/v20231130/examples.json +10 -10
- tccli/services/lkeap/lkeap_client.py +53 -0
- tccli/services/lkeap/v20240522/api.json +48 -4
- tccli/services/lkeap/v20240522/examples.json +8 -0
- tccli/services/mna/mna_client.py +4 -163
- tccli/services/mna/v20210119/api.json +0 -524
- tccli/services/mna/v20210119/examples.json +0 -24
- tccli/services/monitor/monitor_client.py +114 -8
- tccli/services/monitor/v20180724/api.json +129 -18
- tccli/services/monitor/v20180724/examples.json +17 -1
- tccli/services/mps/v20190612/api.json +1223 -1031
- tccli/services/mps/v20190612/examples.json +1 -1
- tccli/services/nlp/v20190408/examples.json +1 -1
- tccli/services/oceanus/v20190422/api.json +12 -12
- tccli/services/oceanus/v20190422/examples.json +15 -3
- tccli/services/ocr/v20181119/api.json +13 -3
- tccli/services/postgres/v20170312/api.json +2 -2
- tccli/services/privatedns/v20201028/api.json +30 -11
- tccli/services/privatedns/v20201028/examples.json +10 -10
- tccli/services/rce/v20201103/api.json +3 -3
- tccli/services/ses/v20201002/api.json +10 -1
- tccli/services/smop/v20201203/api.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +1 -1
- tccli/services/ssm/v20190923/api.json +27 -0
- tccli/services/sts/sts_client.py +53 -0
- tccli/services/sts/v20180813/api.json +101 -1
- tccli/services/sts/v20180813/examples.json +8 -0
- tccli/services/taf/taf_client.py +0 -53
- tccli/services/taf/v20200210/api.json +0 -138
- tccli/services/taf/v20200210/examples.json +0 -8
- tccli/services/tan/v20220420/api.json +2 -2
- tccli/services/tat/v20201028/api.json +2 -2
- tccli/services/tcb/v20180608/api.json +29 -1
- tccli/services/tcbr/v20220217/api.json +32 -0
- tccli/services/tccatalog/v20241024/api.json +1 -1
- tccli/services/tccatalog/v20241024/examples.json +1 -1
- tccli/services/tcr/v20190924/api.json +5 -5
- tccli/services/tcr/v20190924/examples.json +2 -2
- tccli/services/tcss/v20201101/api.json +84 -34
- tccli/services/tcss/v20201101/examples.json +2809 -0
- tccli/services/tdmq/v20200217/api.json +40 -0
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/tds/tds_client.py +53 -0
- tccli/services/tds/v20220801/api.json +265 -0
- tccli/services/tds/v20220801/examples.json +8 -0
- tccli/services/tem/v20210701/api.json +664 -575
- tccli/services/tem/v20210701/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +236 -208
- tccli/services/teo/v20220901/examples.json +13 -13
- tccli/services/tione/tione_client.py +53 -0
- tccli/services/tione/v20211111/api.json +256 -0
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/trocket/trocket_client.py +489 -12
- tccli/services/trocket/v20230308/api.json +925 -146
- tccli/services/trocket/v20230308/examples.json +72 -0
- tccli/services/trtc/v20190722/api.json +13 -19
- tccli/services/trtc/v20190722/examples.json +8 -8
- tccli/services/tse/v20201207/api.json +1016 -995
- tccli/services/tse/v20201207/examples.json +2 -2
- tccli/services/tsf/v20180326/api.json +510 -465
- tccli/services/tsf/v20180326/examples.json +4 -4
- tccli/services/tts/v20190823/api.json +10 -10
- tccli/services/vclm/v20240523/api.json +2 -2
- tccli/services/vcube/v20220410/api.json +10 -0
- tccli/services/vdb/v20230616/api.json +10 -0
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +824 -254
- tccli/services/vpc/v20170312/examples.json +66 -10
- tccli/services/vpc/vpc_client.py +383 -12
- tccli/services/vrs/v20200824/api.json +9 -0
- tccli/services/waf/v20180125/api.json +8113 -5814
- tccli/services/waf/v20180125/examples.json +90 -0
- tccli/services/waf/waf_client.py +559 -82
- tccli/services/wedata/v20210820/api.json +1379 -24
- tccli/services/wedata/v20210820/examples.json +25 -1
- tccli/services/wedata/wedata_client.py +171 -12
- tccli/services/weilingwith/v20230427/api.json +1 -1
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/RECORD +187 -184
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/license_files/LICENSE +0 -0
@@ -17,7 +17,7 @@ from tencentcloud.hunyuan.v20230901 import models as models_v20230901
|
|
17
17
|
from jmespath import search
|
18
18
|
import time
|
19
19
|
|
20
|
-
def
|
20
|
+
def doGetThread(args, parsed_globals):
|
21
21
|
g_param = parse_global_arg(parsed_globals)
|
22
22
|
|
23
23
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -46,11 +46,11 @@ def doFilesList(args, parsed_globals):
|
|
46
46
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
47
47
|
client._sdkVersion += ("_CLI_" + __version__)
|
48
48
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.
|
49
|
+
model = models.GetThreadRequest()
|
50
50
|
model.from_json_string(json.dumps(args))
|
51
51
|
start_time = time.time()
|
52
52
|
while True:
|
53
|
-
rsp = client.
|
53
|
+
rsp = client.GetThread(model)
|
54
54
|
result = rsp.to_json_string()
|
55
55
|
try:
|
56
56
|
json_obj = json.loads(result)
|
@@ -69,7 +69,7 @@ def doFilesList(args, parsed_globals):
|
|
69
69
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
70
|
|
71
71
|
|
72
|
-
def
|
72
|
+
def doSubmitHunyuanImageJob(args, parsed_globals):
|
73
73
|
g_param = parse_global_arg(parsed_globals)
|
74
74
|
|
75
75
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -98,11 +98,11 @@ def doGetThread(args, parsed_globals):
|
|
98
98
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
99
99
|
client._sdkVersion += ("_CLI_" + __version__)
|
100
100
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
101
|
-
model = models.
|
101
|
+
model = models.SubmitHunyuanImageJobRequest()
|
102
102
|
model.from_json_string(json.dumps(args))
|
103
103
|
start_time = time.time()
|
104
104
|
while True:
|
105
|
-
rsp = client.
|
105
|
+
rsp = client.SubmitHunyuanImageJob(model)
|
106
106
|
result = rsp.to_json_string()
|
107
107
|
try:
|
108
108
|
json_obj = json.loads(result)
|
@@ -121,7 +121,7 @@ def doGetThread(args, parsed_globals):
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
122
|
|
123
123
|
|
124
|
-
def
|
124
|
+
def doQueryHunyuanImageJob(args, parsed_globals):
|
125
125
|
g_param = parse_global_arg(parsed_globals)
|
126
126
|
|
127
127
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -150,11 +150,11 @@ def doSubmitHunyuanImageJob(args, parsed_globals):
|
|
150
150
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
151
151
|
client._sdkVersion += ("_CLI_" + __version__)
|
152
152
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
-
model = models.
|
153
|
+
model = models.QueryHunyuanImageJobRequest()
|
154
154
|
model.from_json_string(json.dumps(args))
|
155
155
|
start_time = time.time()
|
156
156
|
while True:
|
157
|
-
rsp = client.
|
157
|
+
rsp = client.QueryHunyuanImageJob(model)
|
158
158
|
result = rsp.to_json_string()
|
159
159
|
try:
|
160
160
|
json_obj = json.loads(result)
|
@@ -173,7 +173,7 @@ def doSubmitHunyuanImageJob(args, parsed_globals):
|
|
173
173
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
174
|
|
175
175
|
|
176
|
-
def
|
176
|
+
def doChatTranslations(args, parsed_globals):
|
177
177
|
g_param = parse_global_arg(parsed_globals)
|
178
178
|
|
179
179
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -202,11 +202,11 @@ def doCreateThread(args, parsed_globals):
|
|
202
202
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
203
203
|
client._sdkVersion += ("_CLI_" + __version__)
|
204
204
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
205
|
-
model = models.
|
205
|
+
model = models.ChatTranslationsRequest()
|
206
206
|
model.from_json_string(json.dumps(args))
|
207
207
|
start_time = time.time()
|
208
208
|
while True:
|
209
|
-
rsp = client.
|
209
|
+
rsp = client.ChatTranslations(model)
|
210
210
|
result = rsp.to_json_string()
|
211
211
|
try:
|
212
212
|
json_obj = json.loads(result)
|
@@ -225,7 +225,7 @@ def doCreateThread(args, parsed_globals):
|
|
225
225
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
226
226
|
|
227
227
|
|
228
|
-
def
|
228
|
+
def doGetThreadMessageList(args, parsed_globals):
|
229
229
|
g_param = parse_global_arg(parsed_globals)
|
230
230
|
|
231
231
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -254,11 +254,11 @@ def doQueryHunyuanImageJob(args, parsed_globals):
|
|
254
254
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
255
255
|
client._sdkVersion += ("_CLI_" + __version__)
|
256
256
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
257
|
-
model = models.
|
257
|
+
model = models.GetThreadMessageListRequest()
|
258
258
|
model.from_json_string(json.dumps(args))
|
259
259
|
start_time = time.time()
|
260
260
|
while True:
|
261
|
-
rsp = client.
|
261
|
+
rsp = client.GetThreadMessageList(model)
|
262
262
|
result = rsp.to_json_string()
|
263
263
|
try:
|
264
264
|
json_obj = json.loads(result)
|
@@ -277,7 +277,7 @@ def doQueryHunyuanImageJob(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def
|
280
|
+
def doGetEmbedding(args, parsed_globals):
|
281
281
|
g_param = parse_global_arg(parsed_globals)
|
282
282
|
|
283
283
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -306,11 +306,11 @@ def doFilesDeletions(args, parsed_globals):
|
|
306
306
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
307
307
|
client._sdkVersion += ("_CLI_" + __version__)
|
308
308
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.
|
309
|
+
model = models.GetEmbeddingRequest()
|
310
310
|
model.from_json_string(json.dumps(args))
|
311
311
|
start_time = time.time()
|
312
312
|
while True:
|
313
|
-
rsp = client.
|
313
|
+
rsp = client.GetEmbedding(model)
|
314
314
|
result = rsp.to_json_string()
|
315
315
|
try:
|
316
316
|
json_obj = json.loads(result)
|
@@ -329,7 +329,7 @@ def doFilesDeletions(args, parsed_globals):
|
|
329
329
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
330
|
|
331
331
|
|
332
|
-
def
|
332
|
+
def doCreateThread(args, parsed_globals):
|
333
333
|
g_param = parse_global_arg(parsed_globals)
|
334
334
|
|
335
335
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -358,11 +358,11 @@ def doFilesUploads(args, parsed_globals):
|
|
358
358
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
359
359
|
client._sdkVersion += ("_CLI_" + __version__)
|
360
360
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
361
|
-
model = models.
|
361
|
+
model = models.CreateThreadRequest()
|
362
362
|
model.from_json_string(json.dumps(args))
|
363
363
|
start_time = time.time()
|
364
364
|
while True:
|
365
|
-
rsp = client.
|
365
|
+
rsp = client.CreateThread(model)
|
366
366
|
result = rsp.to_json_string()
|
367
367
|
try:
|
368
368
|
json_obj = json.loads(result)
|
@@ -381,7 +381,7 @@ def doFilesUploads(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
-
def
|
384
|
+
def doRunThread(args, parsed_globals):
|
385
385
|
g_param = parse_global_arg(parsed_globals)
|
386
386
|
|
387
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +410,11 @@ def doGetTokenCount(args, parsed_globals):
|
|
410
410
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
411
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
413
|
+
model = models.RunThreadRequest()
|
414
414
|
model.from_json_string(json.dumps(args))
|
415
415
|
start_time = time.time()
|
416
416
|
while True:
|
417
|
-
rsp = client.
|
417
|
+
rsp = client.RunThread(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -433,7 +433,7 @@ def doGetTokenCount(args, parsed_globals):
|
|
433
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
434
|
|
435
435
|
|
436
|
-
def
|
436
|
+
def doSetPayMode(args, parsed_globals):
|
437
437
|
g_param = parse_global_arg(parsed_globals)
|
438
438
|
|
439
439
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +462,11 @@ def doGroupChatCompletions(args, parsed_globals):
|
|
462
462
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
463
463
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
465
|
+
model = models.SetPayModeRequest()
|
466
466
|
model.from_json_string(json.dumps(args))
|
467
467
|
start_time = time.time()
|
468
468
|
while True:
|
469
|
-
rsp = client.
|
469
|
+
rsp = client.SetPayMode(model)
|
470
470
|
result = rsp.to_json_string()
|
471
471
|
try:
|
472
472
|
json_obj = json.loads(result)
|
@@ -485,7 +485,7 @@ def doGroupChatCompletions(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
-
def
|
488
|
+
def doQueryHunyuanImageChatJob(args, parsed_globals):
|
489
489
|
g_param = parse_global_arg(parsed_globals)
|
490
490
|
|
491
491
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -514,11 +514,11 @@ def doSubmitHunyuanImageChatJob(args, parsed_globals):
|
|
514
514
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
515
515
|
client._sdkVersion += ("_CLI_" + __version__)
|
516
516
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
-
model = models.
|
517
|
+
model = models.QueryHunyuanImageChatJobRequest()
|
518
518
|
model.from_json_string(json.dumps(args))
|
519
519
|
start_time = time.time()
|
520
520
|
while True:
|
521
|
-
rsp = client.
|
521
|
+
rsp = client.QueryHunyuanImageChatJob(model)
|
522
522
|
result = rsp.to_json_string()
|
523
523
|
try:
|
524
524
|
json_obj = json.loads(result)
|
@@ -537,7 +537,7 @@ def doSubmitHunyuanImageChatJob(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
-
def
|
540
|
+
def doGroupChatCompletions(args, parsed_globals):
|
541
541
|
g_param = parse_global_arg(parsed_globals)
|
542
542
|
|
543
543
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -566,11 +566,11 @@ def doRunThread(args, parsed_globals):
|
|
566
566
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
567
567
|
client._sdkVersion += ("_CLI_" + __version__)
|
568
568
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.
|
569
|
+
model = models.GroupChatCompletionsRequest()
|
570
570
|
model.from_json_string(json.dumps(args))
|
571
571
|
start_time = time.time()
|
572
572
|
while True:
|
573
|
-
rsp = client.
|
573
|
+
rsp = client.GroupChatCompletions(model)
|
574
574
|
result = rsp.to_json_string()
|
575
575
|
try:
|
576
576
|
json_obj = json.loads(result)
|
@@ -589,7 +589,7 @@ def doRunThread(args, parsed_globals):
|
|
589
589
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
590
|
|
591
591
|
|
592
|
-
def
|
592
|
+
def doFilesDeletions(args, parsed_globals):
|
593
593
|
g_param = parse_global_arg(parsed_globals)
|
594
594
|
|
595
595
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -618,11 +618,11 @@ def doGetThreadMessage(args, parsed_globals):
|
|
618
618
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
619
619
|
client._sdkVersion += ("_CLI_" + __version__)
|
620
620
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
621
|
-
model = models.
|
621
|
+
model = models.FilesDeletionsRequest()
|
622
622
|
model.from_json_string(json.dumps(args))
|
623
623
|
start_time = time.time()
|
624
624
|
while True:
|
625
|
-
rsp = client.
|
625
|
+
rsp = client.FilesDeletions(model)
|
626
626
|
result = rsp.to_json_string()
|
627
627
|
try:
|
628
628
|
json_obj = json.loads(result)
|
@@ -641,7 +641,7 @@ def doGetThreadMessage(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
-
def
|
644
|
+
def doGetThreadMessage(args, parsed_globals):
|
645
645
|
g_param = parse_global_arg(parsed_globals)
|
646
646
|
|
647
647
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -670,11 +670,11 @@ def doChatCompletions(args, parsed_globals):
|
|
670
670
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
671
671
|
client._sdkVersion += ("_CLI_" + __version__)
|
672
672
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
-
model = models.
|
673
|
+
model = models.GetThreadMessageRequest()
|
674
674
|
model.from_json_string(json.dumps(args))
|
675
675
|
start_time = time.time()
|
676
676
|
while True:
|
677
|
-
rsp = client.
|
677
|
+
rsp = client.GetThreadMessage(model)
|
678
678
|
result = rsp.to_json_string()
|
679
679
|
try:
|
680
680
|
json_obj = json.loads(result)
|
@@ -693,7 +693,7 @@ def doChatCompletions(args, parsed_globals):
|
|
693
693
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
694
|
|
695
695
|
|
696
|
-
def
|
696
|
+
def doSubmitHunyuanTo3DJob(args, parsed_globals):
|
697
697
|
g_param = parse_global_arg(parsed_globals)
|
698
698
|
|
699
699
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -722,11 +722,11 @@ def doQueryHunyuanImageChatJob(args, parsed_globals):
|
|
722
722
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
723
723
|
client._sdkVersion += ("_CLI_" + __version__)
|
724
724
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
725
|
-
model = models.
|
725
|
+
model = models.SubmitHunyuanTo3DJobRequest()
|
726
726
|
model.from_json_string(json.dumps(args))
|
727
727
|
start_time = time.time()
|
728
728
|
while True:
|
729
|
-
rsp = client.
|
729
|
+
rsp = client.SubmitHunyuanTo3DJob(model)
|
730
730
|
result = rsp.to_json_string()
|
731
731
|
try:
|
732
732
|
json_obj = json.loads(result)
|
@@ -745,7 +745,7 @@ def doQueryHunyuanImageChatJob(args, parsed_globals):
|
|
745
745
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
746
746
|
|
747
747
|
|
748
|
-
def
|
748
|
+
def doFilesUploads(args, parsed_globals):
|
749
749
|
g_param = parse_global_arg(parsed_globals)
|
750
750
|
|
751
751
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -774,11 +774,11 @@ def doChatTranslations(args, parsed_globals):
|
|
774
774
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
775
775
|
client._sdkVersion += ("_CLI_" + __version__)
|
776
776
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
777
|
-
model = models.
|
777
|
+
model = models.FilesUploadsRequest()
|
778
778
|
model.from_json_string(json.dumps(args))
|
779
779
|
start_time = time.time()
|
780
780
|
while True:
|
781
|
-
rsp = client.
|
781
|
+
rsp = client.FilesUploads(model)
|
782
782
|
result = rsp.to_json_string()
|
783
783
|
try:
|
784
784
|
json_obj = json.loads(result)
|
@@ -849,7 +849,7 @@ def doActivateService(args, parsed_globals):
|
|
849
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
850
|
|
851
851
|
|
852
|
-
def
|
852
|
+
def doFilesList(args, parsed_globals):
|
853
853
|
g_param = parse_global_arg(parsed_globals)
|
854
854
|
|
855
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -878,11 +878,11 @@ def doGetThreadMessageList(args, parsed_globals):
|
|
878
878
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
879
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
880
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.
|
881
|
+
model = models.FilesListRequest()
|
882
882
|
model.from_json_string(json.dumps(args))
|
883
883
|
start_time = time.time()
|
884
884
|
while True:
|
885
|
-
rsp = client.
|
885
|
+
rsp = client.FilesList(model)
|
886
886
|
result = rsp.to_json_string()
|
887
887
|
try:
|
888
888
|
json_obj = json.loads(result)
|
@@ -901,7 +901,7 @@ def doGetThreadMessageList(args, parsed_globals):
|
|
901
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
902
|
|
903
903
|
|
904
|
-
def
|
904
|
+
def doQueryHunyuanTo3DJob(args, parsed_globals):
|
905
905
|
g_param = parse_global_arg(parsed_globals)
|
906
906
|
|
907
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +930,11 @@ def doSetPayMode(args, parsed_globals):
|
|
930
930
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
931
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
933
|
+
model = models.QueryHunyuanTo3DJobRequest()
|
934
934
|
model.from_json_string(json.dumps(args))
|
935
935
|
start_time = time.time()
|
936
936
|
while True:
|
937
|
-
rsp = client.
|
937
|
+
rsp = client.QueryHunyuanTo3DJob(model)
|
938
938
|
result = rsp.to_json_string()
|
939
939
|
try:
|
940
940
|
json_obj = json.loads(result)
|
@@ -953,7 +953,7 @@ def doSetPayMode(args, parsed_globals):
|
|
953
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
954
|
|
955
955
|
|
956
|
-
def
|
956
|
+
def doSubmitHunyuanImageChatJob(args, parsed_globals):
|
957
957
|
g_param = parse_global_arg(parsed_globals)
|
958
958
|
|
959
959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -982,11 +982,11 @@ def doTextToImageLite(args, parsed_globals):
|
|
982
982
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
983
983
|
client._sdkVersion += ("_CLI_" + __version__)
|
984
984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
-
model = models.
|
985
|
+
model = models.SubmitHunyuanImageChatJobRequest()
|
986
986
|
model.from_json_string(json.dumps(args))
|
987
987
|
start_time = time.time()
|
988
988
|
while True:
|
989
|
-
rsp = client.
|
989
|
+
rsp = client.SubmitHunyuanImageChatJob(model)
|
990
990
|
result = rsp.to_json_string()
|
991
991
|
try:
|
992
992
|
json_obj = json.loads(result)
|
@@ -1005,7 +1005,7 @@ def doTextToImageLite(args, parsed_globals):
|
|
1005
1005
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1006
1006
|
|
1007
1007
|
|
1008
|
-
def
|
1008
|
+
def doChatCompletions(args, parsed_globals):
|
1009
1009
|
g_param = parse_global_arg(parsed_globals)
|
1010
1010
|
|
1011
1011
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1034,11 +1034,115 @@ def doGetEmbedding(args, parsed_globals):
|
|
1034
1034
|
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
1035
1035
|
client._sdkVersion += ("_CLI_" + __version__)
|
1036
1036
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1037
|
-
model = models.
|
1037
|
+
model = models.ChatCompletionsRequest()
|
1038
1038
|
model.from_json_string(json.dumps(args))
|
1039
1039
|
start_time = time.time()
|
1040
1040
|
while True:
|
1041
|
-
rsp = client.
|
1041
|
+
rsp = client.ChatCompletions(model)
|
1042
|
+
result = rsp.to_json_string()
|
1043
|
+
try:
|
1044
|
+
json_obj = json.loads(result)
|
1045
|
+
except TypeError as e:
|
1046
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1047
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1048
|
+
break
|
1049
|
+
cur_time = time.time()
|
1050
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1051
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1052
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1053
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1054
|
+
else:
|
1055
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1056
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1057
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
|
+
|
1059
|
+
|
1060
|
+
def doGetTokenCount(args, parsed_globals):
|
1061
|
+
g_param = parse_global_arg(parsed_globals)
|
1062
|
+
|
1063
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
+
cred = credential.CVMRoleCredential()
|
1065
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
+
cred = credential.STSAssumeRoleCredential(
|
1067
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
|
+
)
|
1070
|
+
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):
|
1071
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
+
else:
|
1073
|
+
cred = credential.Credential(
|
1074
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
+
)
|
1076
|
+
http_profile = HttpProfile(
|
1077
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
+
reqMethod="POST",
|
1079
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
+
)
|
1082
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
+
if g_param[OptionsDefine.Language]:
|
1084
|
+
profile.language = g_param[OptionsDefine.Language]
|
1085
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
+
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
+
model = models.GetTokenCountRequest()
|
1090
|
+
model.from_json_string(json.dumps(args))
|
1091
|
+
start_time = time.time()
|
1092
|
+
while True:
|
1093
|
+
rsp = client.GetTokenCount(model)
|
1094
|
+
result = rsp.to_json_string()
|
1095
|
+
try:
|
1096
|
+
json_obj = json.loads(result)
|
1097
|
+
except TypeError as e:
|
1098
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
+
break
|
1101
|
+
cur_time = time.time()
|
1102
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
+
else:
|
1107
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
+
|
1111
|
+
|
1112
|
+
def doTextToImageLite(args, parsed_globals):
|
1113
|
+
g_param = parse_global_arg(parsed_globals)
|
1114
|
+
|
1115
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1116
|
+
cred = credential.CVMRoleCredential()
|
1117
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1118
|
+
cred = credential.STSAssumeRoleCredential(
|
1119
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1120
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1121
|
+
)
|
1122
|
+
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):
|
1123
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1124
|
+
else:
|
1125
|
+
cred = credential.Credential(
|
1126
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1127
|
+
)
|
1128
|
+
http_profile = HttpProfile(
|
1129
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1130
|
+
reqMethod="POST",
|
1131
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1132
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1133
|
+
)
|
1134
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1135
|
+
if g_param[OptionsDefine.Language]:
|
1136
|
+
profile.language = g_param[OptionsDefine.Language]
|
1137
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1138
|
+
client = mod.HunyuanClient(cred, g_param[OptionsDefine.Region], profile)
|
1139
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1140
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1141
|
+
model = models.TextToImageLiteRequest()
|
1142
|
+
model.from_json_string(json.dumps(args))
|
1143
|
+
start_time = time.time()
|
1144
|
+
while True:
|
1145
|
+
rsp = client.TextToImageLite(model)
|
1042
1146
|
result = rsp.to_json_string()
|
1043
1147
|
try:
|
1044
1148
|
json_obj = json.loads(result)
|
@@ -1068,26 +1172,28 @@ MODELS_MAP = {
|
|
1068
1172
|
}
|
1069
1173
|
|
1070
1174
|
ACTION_MAP = {
|
1071
|
-
"FilesList": doFilesList,
|
1072
1175
|
"GetThread": doGetThread,
|
1073
1176
|
"SubmitHunyuanImageJob": doSubmitHunyuanImageJob,
|
1074
|
-
"CreateThread": doCreateThread,
|
1075
1177
|
"QueryHunyuanImageJob": doQueryHunyuanImageJob,
|
1178
|
+
"ChatTranslations": doChatTranslations,
|
1179
|
+
"GetThreadMessageList": doGetThreadMessageList,
|
1180
|
+
"GetEmbedding": doGetEmbedding,
|
1181
|
+
"CreateThread": doCreateThread,
|
1182
|
+
"RunThread": doRunThread,
|
1183
|
+
"SetPayMode": doSetPayMode,
|
1184
|
+
"QueryHunyuanImageChatJob": doQueryHunyuanImageChatJob,
|
1185
|
+
"GroupChatCompletions": doGroupChatCompletions,
|
1076
1186
|
"FilesDeletions": doFilesDeletions,
|
1187
|
+
"GetThreadMessage": doGetThreadMessage,
|
1188
|
+
"SubmitHunyuanTo3DJob": doSubmitHunyuanTo3DJob,
|
1077
1189
|
"FilesUploads": doFilesUploads,
|
1078
|
-
"
|
1079
|
-
"
|
1190
|
+
"ActivateService": doActivateService,
|
1191
|
+
"FilesList": doFilesList,
|
1192
|
+
"QueryHunyuanTo3DJob": doQueryHunyuanTo3DJob,
|
1080
1193
|
"SubmitHunyuanImageChatJob": doSubmitHunyuanImageChatJob,
|
1081
|
-
"RunThread": doRunThread,
|
1082
|
-
"GetThreadMessage": doGetThreadMessage,
|
1083
1194
|
"ChatCompletions": doChatCompletions,
|
1084
|
-
"
|
1085
|
-
"ChatTranslations": doChatTranslations,
|
1086
|
-
"ActivateService": doActivateService,
|
1087
|
-
"GetThreadMessageList": doGetThreadMessageList,
|
1088
|
-
"SetPayMode": doSetPayMode,
|
1195
|
+
"GetTokenCount": doGetTokenCount,
|
1089
1196
|
"TextToImageLite": doTextToImageLite,
|
1090
|
-
"GetEmbedding": doGetEmbedding,
|
1091
1197
|
|
1092
1198
|
}
|
1093
1199
|
|