alibabacloud-quanmiaolightapp20240801 2.5.1__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.
- alibabacloud_quanmiaolightapp20240801/__init__.py +1 -0
- alibabacloud_quanmiaolightapp20240801/client.py +2732 -0
- alibabacloud_quanmiaolightapp20240801/models.py +8387 -0
- alibabacloud_quanmiaolightapp20240801-2.5.1.dist-info/LICENSE +13 -0
- alibabacloud_quanmiaolightapp20240801-2.5.1.dist-info/METADATA +69 -0
- alibabacloud_quanmiaolightapp20240801-2.5.1.dist-info/RECORD +8 -0
- alibabacloud_quanmiaolightapp20240801-2.5.1.dist-info/WHEEL +5 -0
- alibabacloud_quanmiaolightapp20240801-2.5.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2732 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
from typing import Dict
|
|
4
|
+
from Tea.core import TeaCore
|
|
5
|
+
|
|
6
|
+
from alibabacloud_tea_openapi.client import Client as OpenApiClient
|
|
7
|
+
from alibabacloud_tea_openapi import models as open_api_models
|
|
8
|
+
from alibabacloud_tea_util.client import Client as UtilClient
|
|
9
|
+
from alibabacloud_endpoint_util.client import Client as EndpointUtilClient
|
|
10
|
+
from alibabacloud_quanmiaolightapp20240801 import models as quan_miao_light_app_20240801_models
|
|
11
|
+
from alibabacloud_tea_util import models as util_models
|
|
12
|
+
from alibabacloud_openapi_util.client import Client as OpenApiUtilClient
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Client(OpenApiClient):
|
|
16
|
+
"""
|
|
17
|
+
*\
|
|
18
|
+
"""
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
config: open_api_models.Config,
|
|
22
|
+
):
|
|
23
|
+
super().__init__(config)
|
|
24
|
+
self._endpoint_rule = ''
|
|
25
|
+
self.check_config(config)
|
|
26
|
+
self._endpoint = self.get_endpoint('quanmiaolightapp', self._region_id, self._endpoint_rule, self._network, self._suffix, self._endpoint_map, self._endpoint)
|
|
27
|
+
|
|
28
|
+
def get_endpoint(
|
|
29
|
+
self,
|
|
30
|
+
product_id: str,
|
|
31
|
+
region_id: str,
|
|
32
|
+
endpoint_rule: str,
|
|
33
|
+
network: str,
|
|
34
|
+
suffix: str,
|
|
35
|
+
endpoint_map: Dict[str, str],
|
|
36
|
+
endpoint: str,
|
|
37
|
+
) -> str:
|
|
38
|
+
if not UtilClient.empty(endpoint):
|
|
39
|
+
return endpoint
|
|
40
|
+
if not UtilClient.is_unset(endpoint_map) and not UtilClient.empty(endpoint_map.get(region_id)):
|
|
41
|
+
return endpoint_map.get(region_id)
|
|
42
|
+
return EndpointUtilClient.get_endpoint_rules(product_id, region_id, endpoint_rule, network, suffix)
|
|
43
|
+
|
|
44
|
+
def generate_broadcast_news_with_options(
|
|
45
|
+
self,
|
|
46
|
+
workspace_id: str,
|
|
47
|
+
request: quan_miao_light_app_20240801_models.GenerateBroadcastNewsRequest,
|
|
48
|
+
headers: Dict[str, str],
|
|
49
|
+
runtime: util_models.RuntimeOptions,
|
|
50
|
+
) -> quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse:
|
|
51
|
+
"""
|
|
52
|
+
@summary 新闻播报-抽取分类获取播报热点
|
|
53
|
+
|
|
54
|
+
@param request: GenerateBroadcastNewsRequest
|
|
55
|
+
@param headers: map
|
|
56
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
57
|
+
@return: GenerateBroadcastNewsResponse
|
|
58
|
+
"""
|
|
59
|
+
UtilClient.validate_model(request)
|
|
60
|
+
body = {}
|
|
61
|
+
if not UtilClient.is_unset(request.prompt):
|
|
62
|
+
body['prompt'] = request.prompt
|
|
63
|
+
req = open_api_models.OpenApiRequest(
|
|
64
|
+
headers=headers,
|
|
65
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
66
|
+
)
|
|
67
|
+
params = open_api_models.Params(
|
|
68
|
+
action='GenerateBroadcastNews',
|
|
69
|
+
version='2024-08-01',
|
|
70
|
+
protocol='HTTPS',
|
|
71
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/GenerateBroadcastNews',
|
|
72
|
+
method='POST',
|
|
73
|
+
auth_type='AK',
|
|
74
|
+
style='ROA',
|
|
75
|
+
req_body_type='formData',
|
|
76
|
+
body_type='json'
|
|
77
|
+
)
|
|
78
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
79
|
+
return TeaCore.from_map(
|
|
80
|
+
quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse(),
|
|
81
|
+
self.call_api(params, req, runtime)
|
|
82
|
+
)
|
|
83
|
+
else:
|
|
84
|
+
return TeaCore.from_map(
|
|
85
|
+
quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse(),
|
|
86
|
+
self.execute(params, req, runtime)
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
async def generate_broadcast_news_with_options_async(
|
|
90
|
+
self,
|
|
91
|
+
workspace_id: str,
|
|
92
|
+
request: quan_miao_light_app_20240801_models.GenerateBroadcastNewsRequest,
|
|
93
|
+
headers: Dict[str, str],
|
|
94
|
+
runtime: util_models.RuntimeOptions,
|
|
95
|
+
) -> quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse:
|
|
96
|
+
"""
|
|
97
|
+
@summary 新闻播报-抽取分类获取播报热点
|
|
98
|
+
|
|
99
|
+
@param request: GenerateBroadcastNewsRequest
|
|
100
|
+
@param headers: map
|
|
101
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
102
|
+
@return: GenerateBroadcastNewsResponse
|
|
103
|
+
"""
|
|
104
|
+
UtilClient.validate_model(request)
|
|
105
|
+
body = {}
|
|
106
|
+
if not UtilClient.is_unset(request.prompt):
|
|
107
|
+
body['prompt'] = request.prompt
|
|
108
|
+
req = open_api_models.OpenApiRequest(
|
|
109
|
+
headers=headers,
|
|
110
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
111
|
+
)
|
|
112
|
+
params = open_api_models.Params(
|
|
113
|
+
action='GenerateBroadcastNews',
|
|
114
|
+
version='2024-08-01',
|
|
115
|
+
protocol='HTTPS',
|
|
116
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/GenerateBroadcastNews',
|
|
117
|
+
method='POST',
|
|
118
|
+
auth_type='AK',
|
|
119
|
+
style='ROA',
|
|
120
|
+
req_body_type='formData',
|
|
121
|
+
body_type='json'
|
|
122
|
+
)
|
|
123
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
124
|
+
return TeaCore.from_map(
|
|
125
|
+
quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse(),
|
|
126
|
+
await self.call_api_async(params, req, runtime)
|
|
127
|
+
)
|
|
128
|
+
else:
|
|
129
|
+
return TeaCore.from_map(
|
|
130
|
+
quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse(),
|
|
131
|
+
await self.execute_async(params, req, runtime)
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
def generate_broadcast_news(
|
|
135
|
+
self,
|
|
136
|
+
workspace_id: str,
|
|
137
|
+
request: quan_miao_light_app_20240801_models.GenerateBroadcastNewsRequest,
|
|
138
|
+
) -> quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse:
|
|
139
|
+
"""
|
|
140
|
+
@summary 新闻播报-抽取分类获取播报热点
|
|
141
|
+
|
|
142
|
+
@param request: GenerateBroadcastNewsRequest
|
|
143
|
+
@return: GenerateBroadcastNewsResponse
|
|
144
|
+
"""
|
|
145
|
+
runtime = util_models.RuntimeOptions()
|
|
146
|
+
headers = {}
|
|
147
|
+
return self.generate_broadcast_news_with_options(workspace_id, request, headers, runtime)
|
|
148
|
+
|
|
149
|
+
async def generate_broadcast_news_async(
|
|
150
|
+
self,
|
|
151
|
+
workspace_id: str,
|
|
152
|
+
request: quan_miao_light_app_20240801_models.GenerateBroadcastNewsRequest,
|
|
153
|
+
) -> quan_miao_light_app_20240801_models.GenerateBroadcastNewsResponse:
|
|
154
|
+
"""
|
|
155
|
+
@summary 新闻播报-抽取分类获取播报热点
|
|
156
|
+
|
|
157
|
+
@param request: GenerateBroadcastNewsRequest
|
|
158
|
+
@return: GenerateBroadcastNewsResponse
|
|
159
|
+
"""
|
|
160
|
+
runtime = util_models.RuntimeOptions()
|
|
161
|
+
headers = {}
|
|
162
|
+
return await self.generate_broadcast_news_with_options_async(workspace_id, request, headers, runtime)
|
|
163
|
+
|
|
164
|
+
def generate_output_format_with_options(
|
|
165
|
+
self,
|
|
166
|
+
workspace_id: str,
|
|
167
|
+
tmp_req: quan_miao_light_app_20240801_models.GenerateOutputFormatRequest,
|
|
168
|
+
headers: Dict[str, str],
|
|
169
|
+
runtime: util_models.RuntimeOptions,
|
|
170
|
+
) -> quan_miao_light_app_20240801_models.GenerateOutputFormatResponse:
|
|
171
|
+
"""
|
|
172
|
+
@summary 轻应用-标签挖掘-获取示例输出格式
|
|
173
|
+
|
|
174
|
+
@param tmp_req: GenerateOutputFormatRequest
|
|
175
|
+
@param headers: map
|
|
176
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
177
|
+
@return: GenerateOutputFormatResponse
|
|
178
|
+
"""
|
|
179
|
+
UtilClient.validate_model(tmp_req)
|
|
180
|
+
request = quan_miao_light_app_20240801_models.GenerateOutputFormatShrinkRequest()
|
|
181
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
182
|
+
if not UtilClient.is_unset(tmp_req.tags):
|
|
183
|
+
request.tags_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.tags, 'tags', 'json')
|
|
184
|
+
body = {}
|
|
185
|
+
if not UtilClient.is_unset(request.business_type):
|
|
186
|
+
body['businessType'] = request.business_type
|
|
187
|
+
if not UtilClient.is_unset(request.content):
|
|
188
|
+
body['content'] = request.content
|
|
189
|
+
if not UtilClient.is_unset(request.extra_info):
|
|
190
|
+
body['extraInfo'] = request.extra_info
|
|
191
|
+
if not UtilClient.is_unset(request.tags_shrink):
|
|
192
|
+
body['tags'] = request.tags_shrink
|
|
193
|
+
if not UtilClient.is_unset(request.task_description):
|
|
194
|
+
body['taskDescription'] = request.task_description
|
|
195
|
+
req = open_api_models.OpenApiRequest(
|
|
196
|
+
headers=headers,
|
|
197
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
198
|
+
)
|
|
199
|
+
params = open_api_models.Params(
|
|
200
|
+
action='GenerateOutputFormat',
|
|
201
|
+
version='2024-08-01',
|
|
202
|
+
protocol='HTTPS',
|
|
203
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/generateOutputFormat',
|
|
204
|
+
method='POST',
|
|
205
|
+
auth_type='AK',
|
|
206
|
+
style='ROA',
|
|
207
|
+
req_body_type='formData',
|
|
208
|
+
body_type='json'
|
|
209
|
+
)
|
|
210
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
211
|
+
return TeaCore.from_map(
|
|
212
|
+
quan_miao_light_app_20240801_models.GenerateOutputFormatResponse(),
|
|
213
|
+
self.call_api(params, req, runtime)
|
|
214
|
+
)
|
|
215
|
+
else:
|
|
216
|
+
return TeaCore.from_map(
|
|
217
|
+
quan_miao_light_app_20240801_models.GenerateOutputFormatResponse(),
|
|
218
|
+
self.execute(params, req, runtime)
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
async def generate_output_format_with_options_async(
|
|
222
|
+
self,
|
|
223
|
+
workspace_id: str,
|
|
224
|
+
tmp_req: quan_miao_light_app_20240801_models.GenerateOutputFormatRequest,
|
|
225
|
+
headers: Dict[str, str],
|
|
226
|
+
runtime: util_models.RuntimeOptions,
|
|
227
|
+
) -> quan_miao_light_app_20240801_models.GenerateOutputFormatResponse:
|
|
228
|
+
"""
|
|
229
|
+
@summary 轻应用-标签挖掘-获取示例输出格式
|
|
230
|
+
|
|
231
|
+
@param tmp_req: GenerateOutputFormatRequest
|
|
232
|
+
@param headers: map
|
|
233
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
234
|
+
@return: GenerateOutputFormatResponse
|
|
235
|
+
"""
|
|
236
|
+
UtilClient.validate_model(tmp_req)
|
|
237
|
+
request = quan_miao_light_app_20240801_models.GenerateOutputFormatShrinkRequest()
|
|
238
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
239
|
+
if not UtilClient.is_unset(tmp_req.tags):
|
|
240
|
+
request.tags_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.tags, 'tags', 'json')
|
|
241
|
+
body = {}
|
|
242
|
+
if not UtilClient.is_unset(request.business_type):
|
|
243
|
+
body['businessType'] = request.business_type
|
|
244
|
+
if not UtilClient.is_unset(request.content):
|
|
245
|
+
body['content'] = request.content
|
|
246
|
+
if not UtilClient.is_unset(request.extra_info):
|
|
247
|
+
body['extraInfo'] = request.extra_info
|
|
248
|
+
if not UtilClient.is_unset(request.tags_shrink):
|
|
249
|
+
body['tags'] = request.tags_shrink
|
|
250
|
+
if not UtilClient.is_unset(request.task_description):
|
|
251
|
+
body['taskDescription'] = request.task_description
|
|
252
|
+
req = open_api_models.OpenApiRequest(
|
|
253
|
+
headers=headers,
|
|
254
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
255
|
+
)
|
|
256
|
+
params = open_api_models.Params(
|
|
257
|
+
action='GenerateOutputFormat',
|
|
258
|
+
version='2024-08-01',
|
|
259
|
+
protocol='HTTPS',
|
|
260
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/generateOutputFormat',
|
|
261
|
+
method='POST',
|
|
262
|
+
auth_type='AK',
|
|
263
|
+
style='ROA',
|
|
264
|
+
req_body_type='formData',
|
|
265
|
+
body_type='json'
|
|
266
|
+
)
|
|
267
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
268
|
+
return TeaCore.from_map(
|
|
269
|
+
quan_miao_light_app_20240801_models.GenerateOutputFormatResponse(),
|
|
270
|
+
await self.call_api_async(params, req, runtime)
|
|
271
|
+
)
|
|
272
|
+
else:
|
|
273
|
+
return TeaCore.from_map(
|
|
274
|
+
quan_miao_light_app_20240801_models.GenerateOutputFormatResponse(),
|
|
275
|
+
await self.execute_async(params, req, runtime)
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
def generate_output_format(
|
|
279
|
+
self,
|
|
280
|
+
workspace_id: str,
|
|
281
|
+
request: quan_miao_light_app_20240801_models.GenerateOutputFormatRequest,
|
|
282
|
+
) -> quan_miao_light_app_20240801_models.GenerateOutputFormatResponse:
|
|
283
|
+
"""
|
|
284
|
+
@summary 轻应用-标签挖掘-获取示例输出格式
|
|
285
|
+
|
|
286
|
+
@param request: GenerateOutputFormatRequest
|
|
287
|
+
@return: GenerateOutputFormatResponse
|
|
288
|
+
"""
|
|
289
|
+
runtime = util_models.RuntimeOptions()
|
|
290
|
+
headers = {}
|
|
291
|
+
return self.generate_output_format_with_options(workspace_id, request, headers, runtime)
|
|
292
|
+
|
|
293
|
+
async def generate_output_format_async(
|
|
294
|
+
self,
|
|
295
|
+
workspace_id: str,
|
|
296
|
+
request: quan_miao_light_app_20240801_models.GenerateOutputFormatRequest,
|
|
297
|
+
) -> quan_miao_light_app_20240801_models.GenerateOutputFormatResponse:
|
|
298
|
+
"""
|
|
299
|
+
@summary 轻应用-标签挖掘-获取示例输出格式
|
|
300
|
+
|
|
301
|
+
@param request: GenerateOutputFormatRequest
|
|
302
|
+
@return: GenerateOutputFormatResponse
|
|
303
|
+
"""
|
|
304
|
+
runtime = util_models.RuntimeOptions()
|
|
305
|
+
headers = {}
|
|
306
|
+
return await self.generate_output_format_with_options_async(workspace_id, request, headers, runtime)
|
|
307
|
+
|
|
308
|
+
def get_video_analysis_config_with_options(
|
|
309
|
+
self,
|
|
310
|
+
workspace_id: str,
|
|
311
|
+
headers: Dict[str, str],
|
|
312
|
+
runtime: util_models.RuntimeOptions,
|
|
313
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse:
|
|
314
|
+
"""
|
|
315
|
+
@summary 视频理解-获取配置
|
|
316
|
+
|
|
317
|
+
@param headers: map
|
|
318
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
319
|
+
@return: GetVideoAnalysisConfigResponse
|
|
320
|
+
"""
|
|
321
|
+
req = open_api_models.OpenApiRequest(
|
|
322
|
+
headers=headers
|
|
323
|
+
)
|
|
324
|
+
params = open_api_models.Params(
|
|
325
|
+
action='GetVideoAnalysisConfig',
|
|
326
|
+
version='2024-08-01',
|
|
327
|
+
protocol='HTTPS',
|
|
328
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/getVideoAnalysisConfig',
|
|
329
|
+
method='GET',
|
|
330
|
+
auth_type='AK',
|
|
331
|
+
style='ROA',
|
|
332
|
+
req_body_type='json',
|
|
333
|
+
body_type='json'
|
|
334
|
+
)
|
|
335
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
336
|
+
return TeaCore.from_map(
|
|
337
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse(),
|
|
338
|
+
self.call_api(params, req, runtime)
|
|
339
|
+
)
|
|
340
|
+
else:
|
|
341
|
+
return TeaCore.from_map(
|
|
342
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse(),
|
|
343
|
+
self.execute(params, req, runtime)
|
|
344
|
+
)
|
|
345
|
+
|
|
346
|
+
async def get_video_analysis_config_with_options_async(
|
|
347
|
+
self,
|
|
348
|
+
workspace_id: str,
|
|
349
|
+
headers: Dict[str, str],
|
|
350
|
+
runtime: util_models.RuntimeOptions,
|
|
351
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse:
|
|
352
|
+
"""
|
|
353
|
+
@summary 视频理解-获取配置
|
|
354
|
+
|
|
355
|
+
@param headers: map
|
|
356
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
357
|
+
@return: GetVideoAnalysisConfigResponse
|
|
358
|
+
"""
|
|
359
|
+
req = open_api_models.OpenApiRequest(
|
|
360
|
+
headers=headers
|
|
361
|
+
)
|
|
362
|
+
params = open_api_models.Params(
|
|
363
|
+
action='GetVideoAnalysisConfig',
|
|
364
|
+
version='2024-08-01',
|
|
365
|
+
protocol='HTTPS',
|
|
366
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/getVideoAnalysisConfig',
|
|
367
|
+
method='GET',
|
|
368
|
+
auth_type='AK',
|
|
369
|
+
style='ROA',
|
|
370
|
+
req_body_type='json',
|
|
371
|
+
body_type='json'
|
|
372
|
+
)
|
|
373
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
374
|
+
return TeaCore.from_map(
|
|
375
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse(),
|
|
376
|
+
await self.call_api_async(params, req, runtime)
|
|
377
|
+
)
|
|
378
|
+
else:
|
|
379
|
+
return TeaCore.from_map(
|
|
380
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse(),
|
|
381
|
+
await self.execute_async(params, req, runtime)
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
def get_video_analysis_config(
|
|
385
|
+
self,
|
|
386
|
+
workspace_id: str,
|
|
387
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse:
|
|
388
|
+
"""
|
|
389
|
+
@summary 视频理解-获取配置
|
|
390
|
+
|
|
391
|
+
@return: GetVideoAnalysisConfigResponse
|
|
392
|
+
"""
|
|
393
|
+
runtime = util_models.RuntimeOptions()
|
|
394
|
+
headers = {}
|
|
395
|
+
return self.get_video_analysis_config_with_options(workspace_id, headers, runtime)
|
|
396
|
+
|
|
397
|
+
async def get_video_analysis_config_async(
|
|
398
|
+
self,
|
|
399
|
+
workspace_id: str,
|
|
400
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisConfigResponse:
|
|
401
|
+
"""
|
|
402
|
+
@summary 视频理解-获取配置
|
|
403
|
+
|
|
404
|
+
@return: GetVideoAnalysisConfigResponse
|
|
405
|
+
"""
|
|
406
|
+
runtime = util_models.RuntimeOptions()
|
|
407
|
+
headers = {}
|
|
408
|
+
return await self.get_video_analysis_config_with_options_async(workspace_id, headers, runtime)
|
|
409
|
+
|
|
410
|
+
def get_video_analysis_task_with_options(
|
|
411
|
+
self,
|
|
412
|
+
workspace_id: str,
|
|
413
|
+
request: quan_miao_light_app_20240801_models.GetVideoAnalysisTaskRequest,
|
|
414
|
+
headers: Dict[str, str],
|
|
415
|
+
runtime: util_models.RuntimeOptions,
|
|
416
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse:
|
|
417
|
+
"""
|
|
418
|
+
@summary 轻应用-获取视频理解异步任务结果
|
|
419
|
+
|
|
420
|
+
@param request: GetVideoAnalysisTaskRequest
|
|
421
|
+
@param headers: map
|
|
422
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
423
|
+
@return: GetVideoAnalysisTaskResponse
|
|
424
|
+
"""
|
|
425
|
+
UtilClient.validate_model(request)
|
|
426
|
+
query = {}
|
|
427
|
+
if not UtilClient.is_unset(request.task_id):
|
|
428
|
+
query['taskId'] = request.task_id
|
|
429
|
+
req = open_api_models.OpenApiRequest(
|
|
430
|
+
headers=headers,
|
|
431
|
+
query=OpenApiUtilClient.query(query)
|
|
432
|
+
)
|
|
433
|
+
params = open_api_models.Params(
|
|
434
|
+
action='GetVideoAnalysisTask',
|
|
435
|
+
version='2024-08-01',
|
|
436
|
+
protocol='HTTPS',
|
|
437
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/getVideoAnalysisTask',
|
|
438
|
+
method='GET',
|
|
439
|
+
auth_type='AK',
|
|
440
|
+
style='ROA',
|
|
441
|
+
req_body_type='json',
|
|
442
|
+
body_type='json'
|
|
443
|
+
)
|
|
444
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
445
|
+
return TeaCore.from_map(
|
|
446
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse(),
|
|
447
|
+
self.call_api(params, req, runtime)
|
|
448
|
+
)
|
|
449
|
+
else:
|
|
450
|
+
return TeaCore.from_map(
|
|
451
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse(),
|
|
452
|
+
self.execute(params, req, runtime)
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
async def get_video_analysis_task_with_options_async(
|
|
456
|
+
self,
|
|
457
|
+
workspace_id: str,
|
|
458
|
+
request: quan_miao_light_app_20240801_models.GetVideoAnalysisTaskRequest,
|
|
459
|
+
headers: Dict[str, str],
|
|
460
|
+
runtime: util_models.RuntimeOptions,
|
|
461
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse:
|
|
462
|
+
"""
|
|
463
|
+
@summary 轻应用-获取视频理解异步任务结果
|
|
464
|
+
|
|
465
|
+
@param request: GetVideoAnalysisTaskRequest
|
|
466
|
+
@param headers: map
|
|
467
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
468
|
+
@return: GetVideoAnalysisTaskResponse
|
|
469
|
+
"""
|
|
470
|
+
UtilClient.validate_model(request)
|
|
471
|
+
query = {}
|
|
472
|
+
if not UtilClient.is_unset(request.task_id):
|
|
473
|
+
query['taskId'] = request.task_id
|
|
474
|
+
req = open_api_models.OpenApiRequest(
|
|
475
|
+
headers=headers,
|
|
476
|
+
query=OpenApiUtilClient.query(query)
|
|
477
|
+
)
|
|
478
|
+
params = open_api_models.Params(
|
|
479
|
+
action='GetVideoAnalysisTask',
|
|
480
|
+
version='2024-08-01',
|
|
481
|
+
protocol='HTTPS',
|
|
482
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/getVideoAnalysisTask',
|
|
483
|
+
method='GET',
|
|
484
|
+
auth_type='AK',
|
|
485
|
+
style='ROA',
|
|
486
|
+
req_body_type='json',
|
|
487
|
+
body_type='json'
|
|
488
|
+
)
|
|
489
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
490
|
+
return TeaCore.from_map(
|
|
491
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse(),
|
|
492
|
+
await self.call_api_async(params, req, runtime)
|
|
493
|
+
)
|
|
494
|
+
else:
|
|
495
|
+
return TeaCore.from_map(
|
|
496
|
+
quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse(),
|
|
497
|
+
await self.execute_async(params, req, runtime)
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
def get_video_analysis_task(
|
|
501
|
+
self,
|
|
502
|
+
workspace_id: str,
|
|
503
|
+
request: quan_miao_light_app_20240801_models.GetVideoAnalysisTaskRequest,
|
|
504
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse:
|
|
505
|
+
"""
|
|
506
|
+
@summary 轻应用-获取视频理解异步任务结果
|
|
507
|
+
|
|
508
|
+
@param request: GetVideoAnalysisTaskRequest
|
|
509
|
+
@return: GetVideoAnalysisTaskResponse
|
|
510
|
+
"""
|
|
511
|
+
runtime = util_models.RuntimeOptions()
|
|
512
|
+
headers = {}
|
|
513
|
+
return self.get_video_analysis_task_with_options(workspace_id, request, headers, runtime)
|
|
514
|
+
|
|
515
|
+
async def get_video_analysis_task_async(
|
|
516
|
+
self,
|
|
517
|
+
workspace_id: str,
|
|
518
|
+
request: quan_miao_light_app_20240801_models.GetVideoAnalysisTaskRequest,
|
|
519
|
+
) -> quan_miao_light_app_20240801_models.GetVideoAnalysisTaskResponse:
|
|
520
|
+
"""
|
|
521
|
+
@summary 轻应用-获取视频理解异步任务结果
|
|
522
|
+
|
|
523
|
+
@param request: GetVideoAnalysisTaskRequest
|
|
524
|
+
@return: GetVideoAnalysisTaskResponse
|
|
525
|
+
"""
|
|
526
|
+
runtime = util_models.RuntimeOptions()
|
|
527
|
+
headers = {}
|
|
528
|
+
return await self.get_video_analysis_task_with_options_async(workspace_id, request, headers, runtime)
|
|
529
|
+
|
|
530
|
+
def list_hot_topic_summaries_with_options(
|
|
531
|
+
self,
|
|
532
|
+
workspace_id: str,
|
|
533
|
+
request: quan_miao_light_app_20240801_models.ListHotTopicSummariesRequest,
|
|
534
|
+
headers: Dict[str, str],
|
|
535
|
+
runtime: util_models.RuntimeOptions,
|
|
536
|
+
) -> quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse:
|
|
537
|
+
"""
|
|
538
|
+
@summary 轻应用-新闻播报-获取热点话题摘要列表
|
|
539
|
+
|
|
540
|
+
@param request: ListHotTopicSummariesRequest
|
|
541
|
+
@param headers: map
|
|
542
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
543
|
+
@return: ListHotTopicSummariesResponse
|
|
544
|
+
"""
|
|
545
|
+
UtilClient.validate_model(request)
|
|
546
|
+
body = {}
|
|
547
|
+
if not UtilClient.is_unset(request.category):
|
|
548
|
+
body['category'] = request.category
|
|
549
|
+
if not UtilClient.is_unset(request.hot_topic):
|
|
550
|
+
body['hotTopic'] = request.hot_topic
|
|
551
|
+
if not UtilClient.is_unset(request.hot_topic_version):
|
|
552
|
+
body['hotTopicVersion'] = request.hot_topic_version
|
|
553
|
+
if not UtilClient.is_unset(request.max_results):
|
|
554
|
+
body['maxResults'] = request.max_results
|
|
555
|
+
if not UtilClient.is_unset(request.next_token):
|
|
556
|
+
body['nextToken'] = request.next_token
|
|
557
|
+
req = open_api_models.OpenApiRequest(
|
|
558
|
+
headers=headers,
|
|
559
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
560
|
+
)
|
|
561
|
+
params = open_api_models.Params(
|
|
562
|
+
action='ListHotTopicSummaries',
|
|
563
|
+
version='2024-08-01',
|
|
564
|
+
protocol='HTTPS',
|
|
565
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/listHotTopicSummaries',
|
|
566
|
+
method='POST',
|
|
567
|
+
auth_type='AK',
|
|
568
|
+
style='ROA',
|
|
569
|
+
req_body_type='formData',
|
|
570
|
+
body_type='json'
|
|
571
|
+
)
|
|
572
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
573
|
+
return TeaCore.from_map(
|
|
574
|
+
quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse(),
|
|
575
|
+
self.call_api(params, req, runtime)
|
|
576
|
+
)
|
|
577
|
+
else:
|
|
578
|
+
return TeaCore.from_map(
|
|
579
|
+
quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse(),
|
|
580
|
+
self.execute(params, req, runtime)
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
async def list_hot_topic_summaries_with_options_async(
|
|
584
|
+
self,
|
|
585
|
+
workspace_id: str,
|
|
586
|
+
request: quan_miao_light_app_20240801_models.ListHotTopicSummariesRequest,
|
|
587
|
+
headers: Dict[str, str],
|
|
588
|
+
runtime: util_models.RuntimeOptions,
|
|
589
|
+
) -> quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse:
|
|
590
|
+
"""
|
|
591
|
+
@summary 轻应用-新闻播报-获取热点话题摘要列表
|
|
592
|
+
|
|
593
|
+
@param request: ListHotTopicSummariesRequest
|
|
594
|
+
@param headers: map
|
|
595
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
596
|
+
@return: ListHotTopicSummariesResponse
|
|
597
|
+
"""
|
|
598
|
+
UtilClient.validate_model(request)
|
|
599
|
+
body = {}
|
|
600
|
+
if not UtilClient.is_unset(request.category):
|
|
601
|
+
body['category'] = request.category
|
|
602
|
+
if not UtilClient.is_unset(request.hot_topic):
|
|
603
|
+
body['hotTopic'] = request.hot_topic
|
|
604
|
+
if not UtilClient.is_unset(request.hot_topic_version):
|
|
605
|
+
body['hotTopicVersion'] = request.hot_topic_version
|
|
606
|
+
if not UtilClient.is_unset(request.max_results):
|
|
607
|
+
body['maxResults'] = request.max_results
|
|
608
|
+
if not UtilClient.is_unset(request.next_token):
|
|
609
|
+
body['nextToken'] = request.next_token
|
|
610
|
+
req = open_api_models.OpenApiRequest(
|
|
611
|
+
headers=headers,
|
|
612
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
613
|
+
)
|
|
614
|
+
params = open_api_models.Params(
|
|
615
|
+
action='ListHotTopicSummaries',
|
|
616
|
+
version='2024-08-01',
|
|
617
|
+
protocol='HTTPS',
|
|
618
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/listHotTopicSummaries',
|
|
619
|
+
method='POST',
|
|
620
|
+
auth_type='AK',
|
|
621
|
+
style='ROA',
|
|
622
|
+
req_body_type='formData',
|
|
623
|
+
body_type='json'
|
|
624
|
+
)
|
|
625
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
626
|
+
return TeaCore.from_map(
|
|
627
|
+
quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse(),
|
|
628
|
+
await self.call_api_async(params, req, runtime)
|
|
629
|
+
)
|
|
630
|
+
else:
|
|
631
|
+
return TeaCore.from_map(
|
|
632
|
+
quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse(),
|
|
633
|
+
await self.execute_async(params, req, runtime)
|
|
634
|
+
)
|
|
635
|
+
|
|
636
|
+
def list_hot_topic_summaries(
|
|
637
|
+
self,
|
|
638
|
+
workspace_id: str,
|
|
639
|
+
request: quan_miao_light_app_20240801_models.ListHotTopicSummariesRequest,
|
|
640
|
+
) -> quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse:
|
|
641
|
+
"""
|
|
642
|
+
@summary 轻应用-新闻播报-获取热点话题摘要列表
|
|
643
|
+
|
|
644
|
+
@param request: ListHotTopicSummariesRequest
|
|
645
|
+
@return: ListHotTopicSummariesResponse
|
|
646
|
+
"""
|
|
647
|
+
runtime = util_models.RuntimeOptions()
|
|
648
|
+
headers = {}
|
|
649
|
+
return self.list_hot_topic_summaries_with_options(workspace_id, request, headers, runtime)
|
|
650
|
+
|
|
651
|
+
async def list_hot_topic_summaries_async(
|
|
652
|
+
self,
|
|
653
|
+
workspace_id: str,
|
|
654
|
+
request: quan_miao_light_app_20240801_models.ListHotTopicSummariesRequest,
|
|
655
|
+
) -> quan_miao_light_app_20240801_models.ListHotTopicSummariesResponse:
|
|
656
|
+
"""
|
|
657
|
+
@summary 轻应用-新闻播报-获取热点话题摘要列表
|
|
658
|
+
|
|
659
|
+
@param request: ListHotTopicSummariesRequest
|
|
660
|
+
@return: ListHotTopicSummariesResponse
|
|
661
|
+
"""
|
|
662
|
+
runtime = util_models.RuntimeOptions()
|
|
663
|
+
headers = {}
|
|
664
|
+
return await self.list_hot_topic_summaries_with_options_async(workspace_id, request, headers, runtime)
|
|
665
|
+
|
|
666
|
+
def run_hot_topic_chat_with_options(
|
|
667
|
+
self,
|
|
668
|
+
workspace_id: str,
|
|
669
|
+
tmp_req: quan_miao_light_app_20240801_models.RunHotTopicChatRequest,
|
|
670
|
+
headers: Dict[str, str],
|
|
671
|
+
runtime: util_models.RuntimeOptions,
|
|
672
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicChatResponse:
|
|
673
|
+
"""
|
|
674
|
+
@summary 轻应用-热点播报-问答
|
|
675
|
+
|
|
676
|
+
@param tmp_req: RunHotTopicChatRequest
|
|
677
|
+
@param headers: map
|
|
678
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
679
|
+
@return: RunHotTopicChatResponse
|
|
680
|
+
"""
|
|
681
|
+
UtilClient.validate_model(tmp_req)
|
|
682
|
+
request = quan_miao_light_app_20240801_models.RunHotTopicChatShrinkRequest()
|
|
683
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
684
|
+
if not UtilClient.is_unset(tmp_req.generate_options):
|
|
685
|
+
request.generate_options_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.generate_options, 'generateOptions', 'json')
|
|
686
|
+
if not UtilClient.is_unset(tmp_req.hot_topics):
|
|
687
|
+
request.hot_topics_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.hot_topics, 'hotTopics', 'json')
|
|
688
|
+
if not UtilClient.is_unset(tmp_req.messages):
|
|
689
|
+
request.messages_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.messages, 'messages', 'json')
|
|
690
|
+
if not UtilClient.is_unset(tmp_req.step_for_broadcast_content_config):
|
|
691
|
+
request.step_for_broadcast_content_config_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.step_for_broadcast_content_config, 'stepForBroadcastContentConfig', 'json')
|
|
692
|
+
body = {}
|
|
693
|
+
if not UtilClient.is_unset(request.category):
|
|
694
|
+
body['category'] = request.category
|
|
695
|
+
if not UtilClient.is_unset(request.generate_options_shrink):
|
|
696
|
+
body['generateOptions'] = request.generate_options_shrink
|
|
697
|
+
if not UtilClient.is_unset(request.hot_topic_version):
|
|
698
|
+
body['hotTopicVersion'] = request.hot_topic_version
|
|
699
|
+
if not UtilClient.is_unset(request.hot_topics_shrink):
|
|
700
|
+
body['hotTopics'] = request.hot_topics_shrink
|
|
701
|
+
if not UtilClient.is_unset(request.image_count):
|
|
702
|
+
body['imageCount'] = request.image_count
|
|
703
|
+
if not UtilClient.is_unset(request.messages_shrink):
|
|
704
|
+
body['messages'] = request.messages_shrink
|
|
705
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template):
|
|
706
|
+
body['modelCustomPromptTemplate'] = request.model_custom_prompt_template
|
|
707
|
+
if not UtilClient.is_unset(request.model_id):
|
|
708
|
+
body['modelId'] = request.model_id
|
|
709
|
+
if not UtilClient.is_unset(request.original_session_id):
|
|
710
|
+
body['originalSessionId'] = request.original_session_id
|
|
711
|
+
if not UtilClient.is_unset(request.prompt):
|
|
712
|
+
body['prompt'] = request.prompt
|
|
713
|
+
if not UtilClient.is_unset(request.step_for_broadcast_content_config_shrink):
|
|
714
|
+
body['stepForBroadcastContentConfig'] = request.step_for_broadcast_content_config_shrink
|
|
715
|
+
if not UtilClient.is_unset(request.task_id):
|
|
716
|
+
body['taskId'] = request.task_id
|
|
717
|
+
req = open_api_models.OpenApiRequest(
|
|
718
|
+
headers=headers,
|
|
719
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
720
|
+
)
|
|
721
|
+
params = open_api_models.Params(
|
|
722
|
+
action='RunHotTopicChat',
|
|
723
|
+
version='2024-08-01',
|
|
724
|
+
protocol='HTTPS',
|
|
725
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runHotTopicChat',
|
|
726
|
+
method='POST',
|
|
727
|
+
auth_type='AK',
|
|
728
|
+
style='ROA',
|
|
729
|
+
req_body_type='formData',
|
|
730
|
+
body_type='json'
|
|
731
|
+
)
|
|
732
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
733
|
+
return TeaCore.from_map(
|
|
734
|
+
quan_miao_light_app_20240801_models.RunHotTopicChatResponse(),
|
|
735
|
+
self.call_api(params, req, runtime)
|
|
736
|
+
)
|
|
737
|
+
else:
|
|
738
|
+
return TeaCore.from_map(
|
|
739
|
+
quan_miao_light_app_20240801_models.RunHotTopicChatResponse(),
|
|
740
|
+
self.execute(params, req, runtime)
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
async def run_hot_topic_chat_with_options_async(
|
|
744
|
+
self,
|
|
745
|
+
workspace_id: str,
|
|
746
|
+
tmp_req: quan_miao_light_app_20240801_models.RunHotTopicChatRequest,
|
|
747
|
+
headers: Dict[str, str],
|
|
748
|
+
runtime: util_models.RuntimeOptions,
|
|
749
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicChatResponse:
|
|
750
|
+
"""
|
|
751
|
+
@summary 轻应用-热点播报-问答
|
|
752
|
+
|
|
753
|
+
@param tmp_req: RunHotTopicChatRequest
|
|
754
|
+
@param headers: map
|
|
755
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
756
|
+
@return: RunHotTopicChatResponse
|
|
757
|
+
"""
|
|
758
|
+
UtilClient.validate_model(tmp_req)
|
|
759
|
+
request = quan_miao_light_app_20240801_models.RunHotTopicChatShrinkRequest()
|
|
760
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
761
|
+
if not UtilClient.is_unset(tmp_req.generate_options):
|
|
762
|
+
request.generate_options_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.generate_options, 'generateOptions', 'json')
|
|
763
|
+
if not UtilClient.is_unset(tmp_req.hot_topics):
|
|
764
|
+
request.hot_topics_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.hot_topics, 'hotTopics', 'json')
|
|
765
|
+
if not UtilClient.is_unset(tmp_req.messages):
|
|
766
|
+
request.messages_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.messages, 'messages', 'json')
|
|
767
|
+
if not UtilClient.is_unset(tmp_req.step_for_broadcast_content_config):
|
|
768
|
+
request.step_for_broadcast_content_config_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.step_for_broadcast_content_config, 'stepForBroadcastContentConfig', 'json')
|
|
769
|
+
body = {}
|
|
770
|
+
if not UtilClient.is_unset(request.category):
|
|
771
|
+
body['category'] = request.category
|
|
772
|
+
if not UtilClient.is_unset(request.generate_options_shrink):
|
|
773
|
+
body['generateOptions'] = request.generate_options_shrink
|
|
774
|
+
if not UtilClient.is_unset(request.hot_topic_version):
|
|
775
|
+
body['hotTopicVersion'] = request.hot_topic_version
|
|
776
|
+
if not UtilClient.is_unset(request.hot_topics_shrink):
|
|
777
|
+
body['hotTopics'] = request.hot_topics_shrink
|
|
778
|
+
if not UtilClient.is_unset(request.image_count):
|
|
779
|
+
body['imageCount'] = request.image_count
|
|
780
|
+
if not UtilClient.is_unset(request.messages_shrink):
|
|
781
|
+
body['messages'] = request.messages_shrink
|
|
782
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template):
|
|
783
|
+
body['modelCustomPromptTemplate'] = request.model_custom_prompt_template
|
|
784
|
+
if not UtilClient.is_unset(request.model_id):
|
|
785
|
+
body['modelId'] = request.model_id
|
|
786
|
+
if not UtilClient.is_unset(request.original_session_id):
|
|
787
|
+
body['originalSessionId'] = request.original_session_id
|
|
788
|
+
if not UtilClient.is_unset(request.prompt):
|
|
789
|
+
body['prompt'] = request.prompt
|
|
790
|
+
if not UtilClient.is_unset(request.step_for_broadcast_content_config_shrink):
|
|
791
|
+
body['stepForBroadcastContentConfig'] = request.step_for_broadcast_content_config_shrink
|
|
792
|
+
if not UtilClient.is_unset(request.task_id):
|
|
793
|
+
body['taskId'] = request.task_id
|
|
794
|
+
req = open_api_models.OpenApiRequest(
|
|
795
|
+
headers=headers,
|
|
796
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
797
|
+
)
|
|
798
|
+
params = open_api_models.Params(
|
|
799
|
+
action='RunHotTopicChat',
|
|
800
|
+
version='2024-08-01',
|
|
801
|
+
protocol='HTTPS',
|
|
802
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runHotTopicChat',
|
|
803
|
+
method='POST',
|
|
804
|
+
auth_type='AK',
|
|
805
|
+
style='ROA',
|
|
806
|
+
req_body_type='formData',
|
|
807
|
+
body_type='json'
|
|
808
|
+
)
|
|
809
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
810
|
+
return TeaCore.from_map(
|
|
811
|
+
quan_miao_light_app_20240801_models.RunHotTopicChatResponse(),
|
|
812
|
+
await self.call_api_async(params, req, runtime)
|
|
813
|
+
)
|
|
814
|
+
else:
|
|
815
|
+
return TeaCore.from_map(
|
|
816
|
+
quan_miao_light_app_20240801_models.RunHotTopicChatResponse(),
|
|
817
|
+
await self.execute_async(params, req, runtime)
|
|
818
|
+
)
|
|
819
|
+
|
|
820
|
+
def run_hot_topic_chat(
|
|
821
|
+
self,
|
|
822
|
+
workspace_id: str,
|
|
823
|
+
request: quan_miao_light_app_20240801_models.RunHotTopicChatRequest,
|
|
824
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicChatResponse:
|
|
825
|
+
"""
|
|
826
|
+
@summary 轻应用-热点播报-问答
|
|
827
|
+
|
|
828
|
+
@param request: RunHotTopicChatRequest
|
|
829
|
+
@return: RunHotTopicChatResponse
|
|
830
|
+
"""
|
|
831
|
+
runtime = util_models.RuntimeOptions()
|
|
832
|
+
headers = {}
|
|
833
|
+
return self.run_hot_topic_chat_with_options(workspace_id, request, headers, runtime)
|
|
834
|
+
|
|
835
|
+
async def run_hot_topic_chat_async(
|
|
836
|
+
self,
|
|
837
|
+
workspace_id: str,
|
|
838
|
+
request: quan_miao_light_app_20240801_models.RunHotTopicChatRequest,
|
|
839
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicChatResponse:
|
|
840
|
+
"""
|
|
841
|
+
@summary 轻应用-热点播报-问答
|
|
842
|
+
|
|
843
|
+
@param request: RunHotTopicChatRequest
|
|
844
|
+
@return: RunHotTopicChatResponse
|
|
845
|
+
"""
|
|
846
|
+
runtime = util_models.RuntimeOptions()
|
|
847
|
+
headers = {}
|
|
848
|
+
return await self.run_hot_topic_chat_with_options_async(workspace_id, request, headers, runtime)
|
|
849
|
+
|
|
850
|
+
def run_hot_topic_summary_with_options(
|
|
851
|
+
self,
|
|
852
|
+
workspace_id: str,
|
|
853
|
+
tmp_req: quan_miao_light_app_20240801_models.RunHotTopicSummaryRequest,
|
|
854
|
+
headers: Dict[str, str],
|
|
855
|
+
runtime: util_models.RuntimeOptions,
|
|
856
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse:
|
|
857
|
+
"""
|
|
858
|
+
@summary 轻应用-热点播报-热点摘要生成
|
|
859
|
+
|
|
860
|
+
@param tmp_req: RunHotTopicSummaryRequest
|
|
861
|
+
@param headers: map
|
|
862
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
863
|
+
@return: RunHotTopicSummaryResponse
|
|
864
|
+
"""
|
|
865
|
+
UtilClient.validate_model(tmp_req)
|
|
866
|
+
request = quan_miao_light_app_20240801_models.RunHotTopicSummaryShrinkRequest()
|
|
867
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
868
|
+
if not UtilClient.is_unset(tmp_req.step_for_custom_summary_style_config):
|
|
869
|
+
request.step_for_custom_summary_style_config_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.step_for_custom_summary_style_config, 'stepForCustomSummaryStyleConfig', 'json')
|
|
870
|
+
if not UtilClient.is_unset(tmp_req.topic_ids):
|
|
871
|
+
request.topic_ids_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.topic_ids, 'topicIds', 'json')
|
|
872
|
+
body = {}
|
|
873
|
+
if not UtilClient.is_unset(request.hot_topic_version):
|
|
874
|
+
body['hotTopicVersion'] = request.hot_topic_version
|
|
875
|
+
if not UtilClient.is_unset(request.step_for_custom_summary_style_config_shrink):
|
|
876
|
+
body['stepForCustomSummaryStyleConfig'] = request.step_for_custom_summary_style_config_shrink
|
|
877
|
+
if not UtilClient.is_unset(request.topic_ids_shrink):
|
|
878
|
+
body['topicIds'] = request.topic_ids_shrink
|
|
879
|
+
req = open_api_models.OpenApiRequest(
|
|
880
|
+
headers=headers,
|
|
881
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
882
|
+
)
|
|
883
|
+
params = open_api_models.Params(
|
|
884
|
+
action='RunHotTopicSummary',
|
|
885
|
+
version='2024-08-01',
|
|
886
|
+
protocol='HTTPS',
|
|
887
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runHotTopicSummary',
|
|
888
|
+
method='POST',
|
|
889
|
+
auth_type='AK',
|
|
890
|
+
style='ROA',
|
|
891
|
+
req_body_type='formData',
|
|
892
|
+
body_type='json'
|
|
893
|
+
)
|
|
894
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
895
|
+
return TeaCore.from_map(
|
|
896
|
+
quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse(),
|
|
897
|
+
self.call_api(params, req, runtime)
|
|
898
|
+
)
|
|
899
|
+
else:
|
|
900
|
+
return TeaCore.from_map(
|
|
901
|
+
quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse(),
|
|
902
|
+
self.execute(params, req, runtime)
|
|
903
|
+
)
|
|
904
|
+
|
|
905
|
+
async def run_hot_topic_summary_with_options_async(
|
|
906
|
+
self,
|
|
907
|
+
workspace_id: str,
|
|
908
|
+
tmp_req: quan_miao_light_app_20240801_models.RunHotTopicSummaryRequest,
|
|
909
|
+
headers: Dict[str, str],
|
|
910
|
+
runtime: util_models.RuntimeOptions,
|
|
911
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse:
|
|
912
|
+
"""
|
|
913
|
+
@summary 轻应用-热点播报-热点摘要生成
|
|
914
|
+
|
|
915
|
+
@param tmp_req: RunHotTopicSummaryRequest
|
|
916
|
+
@param headers: map
|
|
917
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
918
|
+
@return: RunHotTopicSummaryResponse
|
|
919
|
+
"""
|
|
920
|
+
UtilClient.validate_model(tmp_req)
|
|
921
|
+
request = quan_miao_light_app_20240801_models.RunHotTopicSummaryShrinkRequest()
|
|
922
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
923
|
+
if not UtilClient.is_unset(tmp_req.step_for_custom_summary_style_config):
|
|
924
|
+
request.step_for_custom_summary_style_config_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.step_for_custom_summary_style_config, 'stepForCustomSummaryStyleConfig', 'json')
|
|
925
|
+
if not UtilClient.is_unset(tmp_req.topic_ids):
|
|
926
|
+
request.topic_ids_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.topic_ids, 'topicIds', 'json')
|
|
927
|
+
body = {}
|
|
928
|
+
if not UtilClient.is_unset(request.hot_topic_version):
|
|
929
|
+
body['hotTopicVersion'] = request.hot_topic_version
|
|
930
|
+
if not UtilClient.is_unset(request.step_for_custom_summary_style_config_shrink):
|
|
931
|
+
body['stepForCustomSummaryStyleConfig'] = request.step_for_custom_summary_style_config_shrink
|
|
932
|
+
if not UtilClient.is_unset(request.topic_ids_shrink):
|
|
933
|
+
body['topicIds'] = request.topic_ids_shrink
|
|
934
|
+
req = open_api_models.OpenApiRequest(
|
|
935
|
+
headers=headers,
|
|
936
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
937
|
+
)
|
|
938
|
+
params = open_api_models.Params(
|
|
939
|
+
action='RunHotTopicSummary',
|
|
940
|
+
version='2024-08-01',
|
|
941
|
+
protocol='HTTPS',
|
|
942
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runHotTopicSummary',
|
|
943
|
+
method='POST',
|
|
944
|
+
auth_type='AK',
|
|
945
|
+
style='ROA',
|
|
946
|
+
req_body_type='formData',
|
|
947
|
+
body_type='json'
|
|
948
|
+
)
|
|
949
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
950
|
+
return TeaCore.from_map(
|
|
951
|
+
quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse(),
|
|
952
|
+
await self.call_api_async(params, req, runtime)
|
|
953
|
+
)
|
|
954
|
+
else:
|
|
955
|
+
return TeaCore.from_map(
|
|
956
|
+
quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse(),
|
|
957
|
+
await self.execute_async(params, req, runtime)
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
def run_hot_topic_summary(
|
|
961
|
+
self,
|
|
962
|
+
workspace_id: str,
|
|
963
|
+
request: quan_miao_light_app_20240801_models.RunHotTopicSummaryRequest,
|
|
964
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse:
|
|
965
|
+
"""
|
|
966
|
+
@summary 轻应用-热点播报-热点摘要生成
|
|
967
|
+
|
|
968
|
+
@param request: RunHotTopicSummaryRequest
|
|
969
|
+
@return: RunHotTopicSummaryResponse
|
|
970
|
+
"""
|
|
971
|
+
runtime = util_models.RuntimeOptions()
|
|
972
|
+
headers = {}
|
|
973
|
+
return self.run_hot_topic_summary_with_options(workspace_id, request, headers, runtime)
|
|
974
|
+
|
|
975
|
+
async def run_hot_topic_summary_async(
|
|
976
|
+
self,
|
|
977
|
+
workspace_id: str,
|
|
978
|
+
request: quan_miao_light_app_20240801_models.RunHotTopicSummaryRequest,
|
|
979
|
+
) -> quan_miao_light_app_20240801_models.RunHotTopicSummaryResponse:
|
|
980
|
+
"""
|
|
981
|
+
@summary 轻应用-热点播报-热点摘要生成
|
|
982
|
+
|
|
983
|
+
@param request: RunHotTopicSummaryRequest
|
|
984
|
+
@return: RunHotTopicSummaryResponse
|
|
985
|
+
"""
|
|
986
|
+
runtime = util_models.RuntimeOptions()
|
|
987
|
+
headers = {}
|
|
988
|
+
return await self.run_hot_topic_summary_with_options_async(workspace_id, request, headers, runtime)
|
|
989
|
+
|
|
990
|
+
def run_marketing_information_extract_with_options(
|
|
991
|
+
self,
|
|
992
|
+
workspace_id: str,
|
|
993
|
+
tmp_req: quan_miao_light_app_20240801_models.RunMarketingInformationExtractRequest,
|
|
994
|
+
headers: Dict[str, str],
|
|
995
|
+
runtime: util_models.RuntimeOptions,
|
|
996
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse:
|
|
997
|
+
"""
|
|
998
|
+
@summary 营销信息抽取服务
|
|
999
|
+
|
|
1000
|
+
@param tmp_req: RunMarketingInformationExtractRequest
|
|
1001
|
+
@param headers: map
|
|
1002
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1003
|
+
@return: RunMarketingInformationExtractResponse
|
|
1004
|
+
"""
|
|
1005
|
+
UtilClient.validate_model(tmp_req)
|
|
1006
|
+
request = quan_miao_light_app_20240801_models.RunMarketingInformationExtractShrinkRequest()
|
|
1007
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
1008
|
+
if not UtilClient.is_unset(tmp_req.source_materials):
|
|
1009
|
+
request.source_materials_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.source_materials, 'sourceMaterials', 'json')
|
|
1010
|
+
body = {}
|
|
1011
|
+
if not UtilClient.is_unset(request.custom_prompt):
|
|
1012
|
+
body['customPrompt'] = request.custom_prompt
|
|
1013
|
+
if not UtilClient.is_unset(request.extract_type):
|
|
1014
|
+
body['extractType'] = request.extract_type
|
|
1015
|
+
if not UtilClient.is_unset(request.model_id):
|
|
1016
|
+
body['modelId'] = request.model_id
|
|
1017
|
+
if not UtilClient.is_unset(request.source_materials_shrink):
|
|
1018
|
+
body['sourceMaterials'] = request.source_materials_shrink
|
|
1019
|
+
req = open_api_models.OpenApiRequest(
|
|
1020
|
+
headers=headers,
|
|
1021
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1022
|
+
)
|
|
1023
|
+
params = open_api_models.Params(
|
|
1024
|
+
action='RunMarketingInformationExtract',
|
|
1025
|
+
version='2024-08-01',
|
|
1026
|
+
protocol='HTTPS',
|
|
1027
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runMarketingInformationExtract',
|
|
1028
|
+
method='POST',
|
|
1029
|
+
auth_type='AK',
|
|
1030
|
+
style='ROA',
|
|
1031
|
+
req_body_type='formData',
|
|
1032
|
+
body_type='json'
|
|
1033
|
+
)
|
|
1034
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1035
|
+
return TeaCore.from_map(
|
|
1036
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse(),
|
|
1037
|
+
self.call_api(params, req, runtime)
|
|
1038
|
+
)
|
|
1039
|
+
else:
|
|
1040
|
+
return TeaCore.from_map(
|
|
1041
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse(),
|
|
1042
|
+
self.execute(params, req, runtime)
|
|
1043
|
+
)
|
|
1044
|
+
|
|
1045
|
+
async def run_marketing_information_extract_with_options_async(
|
|
1046
|
+
self,
|
|
1047
|
+
workspace_id: str,
|
|
1048
|
+
tmp_req: quan_miao_light_app_20240801_models.RunMarketingInformationExtractRequest,
|
|
1049
|
+
headers: Dict[str, str],
|
|
1050
|
+
runtime: util_models.RuntimeOptions,
|
|
1051
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse:
|
|
1052
|
+
"""
|
|
1053
|
+
@summary 营销信息抽取服务
|
|
1054
|
+
|
|
1055
|
+
@param tmp_req: RunMarketingInformationExtractRequest
|
|
1056
|
+
@param headers: map
|
|
1057
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1058
|
+
@return: RunMarketingInformationExtractResponse
|
|
1059
|
+
"""
|
|
1060
|
+
UtilClient.validate_model(tmp_req)
|
|
1061
|
+
request = quan_miao_light_app_20240801_models.RunMarketingInformationExtractShrinkRequest()
|
|
1062
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
1063
|
+
if not UtilClient.is_unset(tmp_req.source_materials):
|
|
1064
|
+
request.source_materials_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.source_materials, 'sourceMaterials', 'json')
|
|
1065
|
+
body = {}
|
|
1066
|
+
if not UtilClient.is_unset(request.custom_prompt):
|
|
1067
|
+
body['customPrompt'] = request.custom_prompt
|
|
1068
|
+
if not UtilClient.is_unset(request.extract_type):
|
|
1069
|
+
body['extractType'] = request.extract_type
|
|
1070
|
+
if not UtilClient.is_unset(request.model_id):
|
|
1071
|
+
body['modelId'] = request.model_id
|
|
1072
|
+
if not UtilClient.is_unset(request.source_materials_shrink):
|
|
1073
|
+
body['sourceMaterials'] = request.source_materials_shrink
|
|
1074
|
+
req = open_api_models.OpenApiRequest(
|
|
1075
|
+
headers=headers,
|
|
1076
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1077
|
+
)
|
|
1078
|
+
params = open_api_models.Params(
|
|
1079
|
+
action='RunMarketingInformationExtract',
|
|
1080
|
+
version='2024-08-01',
|
|
1081
|
+
protocol='HTTPS',
|
|
1082
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runMarketingInformationExtract',
|
|
1083
|
+
method='POST',
|
|
1084
|
+
auth_type='AK',
|
|
1085
|
+
style='ROA',
|
|
1086
|
+
req_body_type='formData',
|
|
1087
|
+
body_type='json'
|
|
1088
|
+
)
|
|
1089
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1090
|
+
return TeaCore.from_map(
|
|
1091
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse(),
|
|
1092
|
+
await self.call_api_async(params, req, runtime)
|
|
1093
|
+
)
|
|
1094
|
+
else:
|
|
1095
|
+
return TeaCore.from_map(
|
|
1096
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse(),
|
|
1097
|
+
await self.execute_async(params, req, runtime)
|
|
1098
|
+
)
|
|
1099
|
+
|
|
1100
|
+
def run_marketing_information_extract(
|
|
1101
|
+
self,
|
|
1102
|
+
workspace_id: str,
|
|
1103
|
+
request: quan_miao_light_app_20240801_models.RunMarketingInformationExtractRequest,
|
|
1104
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse:
|
|
1105
|
+
"""
|
|
1106
|
+
@summary 营销信息抽取服务
|
|
1107
|
+
|
|
1108
|
+
@param request: RunMarketingInformationExtractRequest
|
|
1109
|
+
@return: RunMarketingInformationExtractResponse
|
|
1110
|
+
"""
|
|
1111
|
+
runtime = util_models.RuntimeOptions()
|
|
1112
|
+
headers = {}
|
|
1113
|
+
return self.run_marketing_information_extract_with_options(workspace_id, request, headers, runtime)
|
|
1114
|
+
|
|
1115
|
+
async def run_marketing_information_extract_async(
|
|
1116
|
+
self,
|
|
1117
|
+
workspace_id: str,
|
|
1118
|
+
request: quan_miao_light_app_20240801_models.RunMarketingInformationExtractRequest,
|
|
1119
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationExtractResponse:
|
|
1120
|
+
"""
|
|
1121
|
+
@summary 营销信息抽取服务
|
|
1122
|
+
|
|
1123
|
+
@param request: RunMarketingInformationExtractRequest
|
|
1124
|
+
@return: RunMarketingInformationExtractResponse
|
|
1125
|
+
"""
|
|
1126
|
+
runtime = util_models.RuntimeOptions()
|
|
1127
|
+
headers = {}
|
|
1128
|
+
return await self.run_marketing_information_extract_with_options_async(workspace_id, request, headers, runtime)
|
|
1129
|
+
|
|
1130
|
+
def run_marketing_information_writing_with_options(
|
|
1131
|
+
self,
|
|
1132
|
+
workspace_id: str,
|
|
1133
|
+
request: quan_miao_light_app_20240801_models.RunMarketingInformationWritingRequest,
|
|
1134
|
+
headers: Dict[str, str],
|
|
1135
|
+
runtime: util_models.RuntimeOptions,
|
|
1136
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse:
|
|
1137
|
+
"""
|
|
1138
|
+
@summary 营销文案写作服务
|
|
1139
|
+
|
|
1140
|
+
@param request: RunMarketingInformationWritingRequest
|
|
1141
|
+
@param headers: map
|
|
1142
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1143
|
+
@return: RunMarketingInformationWritingResponse
|
|
1144
|
+
"""
|
|
1145
|
+
UtilClient.validate_model(request)
|
|
1146
|
+
body = {}
|
|
1147
|
+
if not UtilClient.is_unset(request.custom_limitation):
|
|
1148
|
+
body['customLimitation'] = request.custom_limitation
|
|
1149
|
+
if not UtilClient.is_unset(request.custom_prompt):
|
|
1150
|
+
body['customPrompt'] = request.custom_prompt
|
|
1151
|
+
if not UtilClient.is_unset(request.input_example):
|
|
1152
|
+
body['inputExample'] = request.input_example
|
|
1153
|
+
if not UtilClient.is_unset(request.model_id):
|
|
1154
|
+
body['modelId'] = request.model_id
|
|
1155
|
+
if not UtilClient.is_unset(request.output_example):
|
|
1156
|
+
body['outputExample'] = request.output_example
|
|
1157
|
+
if not UtilClient.is_unset(request.source_material):
|
|
1158
|
+
body['sourceMaterial'] = request.source_material
|
|
1159
|
+
if not UtilClient.is_unset(request.writing_type):
|
|
1160
|
+
body['writingType'] = request.writing_type
|
|
1161
|
+
req = open_api_models.OpenApiRequest(
|
|
1162
|
+
headers=headers,
|
|
1163
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1164
|
+
)
|
|
1165
|
+
params = open_api_models.Params(
|
|
1166
|
+
action='RunMarketingInformationWriting',
|
|
1167
|
+
version='2024-08-01',
|
|
1168
|
+
protocol='HTTPS',
|
|
1169
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runMarketingInformationWriting',
|
|
1170
|
+
method='POST',
|
|
1171
|
+
auth_type='AK',
|
|
1172
|
+
style='ROA',
|
|
1173
|
+
req_body_type='formData',
|
|
1174
|
+
body_type='json'
|
|
1175
|
+
)
|
|
1176
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1177
|
+
return TeaCore.from_map(
|
|
1178
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse(),
|
|
1179
|
+
self.call_api(params, req, runtime)
|
|
1180
|
+
)
|
|
1181
|
+
else:
|
|
1182
|
+
return TeaCore.from_map(
|
|
1183
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse(),
|
|
1184
|
+
self.execute(params, req, runtime)
|
|
1185
|
+
)
|
|
1186
|
+
|
|
1187
|
+
async def run_marketing_information_writing_with_options_async(
|
|
1188
|
+
self,
|
|
1189
|
+
workspace_id: str,
|
|
1190
|
+
request: quan_miao_light_app_20240801_models.RunMarketingInformationWritingRequest,
|
|
1191
|
+
headers: Dict[str, str],
|
|
1192
|
+
runtime: util_models.RuntimeOptions,
|
|
1193
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse:
|
|
1194
|
+
"""
|
|
1195
|
+
@summary 营销文案写作服务
|
|
1196
|
+
|
|
1197
|
+
@param request: RunMarketingInformationWritingRequest
|
|
1198
|
+
@param headers: map
|
|
1199
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1200
|
+
@return: RunMarketingInformationWritingResponse
|
|
1201
|
+
"""
|
|
1202
|
+
UtilClient.validate_model(request)
|
|
1203
|
+
body = {}
|
|
1204
|
+
if not UtilClient.is_unset(request.custom_limitation):
|
|
1205
|
+
body['customLimitation'] = request.custom_limitation
|
|
1206
|
+
if not UtilClient.is_unset(request.custom_prompt):
|
|
1207
|
+
body['customPrompt'] = request.custom_prompt
|
|
1208
|
+
if not UtilClient.is_unset(request.input_example):
|
|
1209
|
+
body['inputExample'] = request.input_example
|
|
1210
|
+
if not UtilClient.is_unset(request.model_id):
|
|
1211
|
+
body['modelId'] = request.model_id
|
|
1212
|
+
if not UtilClient.is_unset(request.output_example):
|
|
1213
|
+
body['outputExample'] = request.output_example
|
|
1214
|
+
if not UtilClient.is_unset(request.source_material):
|
|
1215
|
+
body['sourceMaterial'] = request.source_material
|
|
1216
|
+
if not UtilClient.is_unset(request.writing_type):
|
|
1217
|
+
body['writingType'] = request.writing_type
|
|
1218
|
+
req = open_api_models.OpenApiRequest(
|
|
1219
|
+
headers=headers,
|
|
1220
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1221
|
+
)
|
|
1222
|
+
params = open_api_models.Params(
|
|
1223
|
+
action='RunMarketingInformationWriting',
|
|
1224
|
+
version='2024-08-01',
|
|
1225
|
+
protocol='HTTPS',
|
|
1226
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runMarketingInformationWriting',
|
|
1227
|
+
method='POST',
|
|
1228
|
+
auth_type='AK',
|
|
1229
|
+
style='ROA',
|
|
1230
|
+
req_body_type='formData',
|
|
1231
|
+
body_type='json'
|
|
1232
|
+
)
|
|
1233
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1234
|
+
return TeaCore.from_map(
|
|
1235
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse(),
|
|
1236
|
+
await self.call_api_async(params, req, runtime)
|
|
1237
|
+
)
|
|
1238
|
+
else:
|
|
1239
|
+
return TeaCore.from_map(
|
|
1240
|
+
quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse(),
|
|
1241
|
+
await self.execute_async(params, req, runtime)
|
|
1242
|
+
)
|
|
1243
|
+
|
|
1244
|
+
def run_marketing_information_writing(
|
|
1245
|
+
self,
|
|
1246
|
+
workspace_id: str,
|
|
1247
|
+
request: quan_miao_light_app_20240801_models.RunMarketingInformationWritingRequest,
|
|
1248
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse:
|
|
1249
|
+
"""
|
|
1250
|
+
@summary 营销文案写作服务
|
|
1251
|
+
|
|
1252
|
+
@param request: RunMarketingInformationWritingRequest
|
|
1253
|
+
@return: RunMarketingInformationWritingResponse
|
|
1254
|
+
"""
|
|
1255
|
+
runtime = util_models.RuntimeOptions()
|
|
1256
|
+
headers = {}
|
|
1257
|
+
return self.run_marketing_information_writing_with_options(workspace_id, request, headers, runtime)
|
|
1258
|
+
|
|
1259
|
+
async def run_marketing_information_writing_async(
|
|
1260
|
+
self,
|
|
1261
|
+
workspace_id: str,
|
|
1262
|
+
request: quan_miao_light_app_20240801_models.RunMarketingInformationWritingRequest,
|
|
1263
|
+
) -> quan_miao_light_app_20240801_models.RunMarketingInformationWritingResponse:
|
|
1264
|
+
"""
|
|
1265
|
+
@summary 营销文案写作服务
|
|
1266
|
+
|
|
1267
|
+
@param request: RunMarketingInformationWritingRequest
|
|
1268
|
+
@return: RunMarketingInformationWritingResponse
|
|
1269
|
+
"""
|
|
1270
|
+
runtime = util_models.RuntimeOptions()
|
|
1271
|
+
headers = {}
|
|
1272
|
+
return await self.run_marketing_information_writing_with_options_async(workspace_id, request, headers, runtime)
|
|
1273
|
+
|
|
1274
|
+
def run_network_content_audit_with_options(
|
|
1275
|
+
self,
|
|
1276
|
+
workspace_id: str,
|
|
1277
|
+
tmp_req: quan_miao_light_app_20240801_models.RunNetworkContentAuditRequest,
|
|
1278
|
+
headers: Dict[str, str],
|
|
1279
|
+
runtime: util_models.RuntimeOptions,
|
|
1280
|
+
) -> quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse:
|
|
1281
|
+
"""
|
|
1282
|
+
@summary 轻应用-网络内容审核
|
|
1283
|
+
|
|
1284
|
+
@param tmp_req: RunNetworkContentAuditRequest
|
|
1285
|
+
@param headers: map
|
|
1286
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1287
|
+
@return: RunNetworkContentAuditResponse
|
|
1288
|
+
"""
|
|
1289
|
+
UtilClient.validate_model(tmp_req)
|
|
1290
|
+
request = quan_miao_light_app_20240801_models.RunNetworkContentAuditShrinkRequest()
|
|
1291
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
1292
|
+
if not UtilClient.is_unset(tmp_req.tags):
|
|
1293
|
+
request.tags_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.tags, 'tags', 'json')
|
|
1294
|
+
body = {}
|
|
1295
|
+
if not UtilClient.is_unset(request.business_type):
|
|
1296
|
+
body['businessType'] = request.business_type
|
|
1297
|
+
if not UtilClient.is_unset(request.content):
|
|
1298
|
+
body['content'] = request.content
|
|
1299
|
+
if not UtilClient.is_unset(request.extra_info):
|
|
1300
|
+
body['extraInfo'] = request.extra_info
|
|
1301
|
+
if not UtilClient.is_unset(request.model_id):
|
|
1302
|
+
body['modelId'] = request.model_id
|
|
1303
|
+
if not UtilClient.is_unset(request.output_format):
|
|
1304
|
+
body['outputFormat'] = request.output_format
|
|
1305
|
+
if not UtilClient.is_unset(request.tags_shrink):
|
|
1306
|
+
body['tags'] = request.tags_shrink
|
|
1307
|
+
if not UtilClient.is_unset(request.task_description):
|
|
1308
|
+
body['taskDescription'] = request.task_description
|
|
1309
|
+
req = open_api_models.OpenApiRequest(
|
|
1310
|
+
headers=headers,
|
|
1311
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1312
|
+
)
|
|
1313
|
+
params = open_api_models.Params(
|
|
1314
|
+
action='RunNetworkContentAudit',
|
|
1315
|
+
version='2024-08-01',
|
|
1316
|
+
protocol='HTTPS',
|
|
1317
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runNetworkContentAudit',
|
|
1318
|
+
method='POST',
|
|
1319
|
+
auth_type='AK',
|
|
1320
|
+
style='ROA',
|
|
1321
|
+
req_body_type='formData',
|
|
1322
|
+
body_type='json'
|
|
1323
|
+
)
|
|
1324
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1325
|
+
return TeaCore.from_map(
|
|
1326
|
+
quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse(),
|
|
1327
|
+
self.call_api(params, req, runtime)
|
|
1328
|
+
)
|
|
1329
|
+
else:
|
|
1330
|
+
return TeaCore.from_map(
|
|
1331
|
+
quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse(),
|
|
1332
|
+
self.execute(params, req, runtime)
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
async def run_network_content_audit_with_options_async(
|
|
1336
|
+
self,
|
|
1337
|
+
workspace_id: str,
|
|
1338
|
+
tmp_req: quan_miao_light_app_20240801_models.RunNetworkContentAuditRequest,
|
|
1339
|
+
headers: Dict[str, str],
|
|
1340
|
+
runtime: util_models.RuntimeOptions,
|
|
1341
|
+
) -> quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse:
|
|
1342
|
+
"""
|
|
1343
|
+
@summary 轻应用-网络内容审核
|
|
1344
|
+
|
|
1345
|
+
@param tmp_req: RunNetworkContentAuditRequest
|
|
1346
|
+
@param headers: map
|
|
1347
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1348
|
+
@return: RunNetworkContentAuditResponse
|
|
1349
|
+
"""
|
|
1350
|
+
UtilClient.validate_model(tmp_req)
|
|
1351
|
+
request = quan_miao_light_app_20240801_models.RunNetworkContentAuditShrinkRequest()
|
|
1352
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
1353
|
+
if not UtilClient.is_unset(tmp_req.tags):
|
|
1354
|
+
request.tags_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.tags, 'tags', 'json')
|
|
1355
|
+
body = {}
|
|
1356
|
+
if not UtilClient.is_unset(request.business_type):
|
|
1357
|
+
body['businessType'] = request.business_type
|
|
1358
|
+
if not UtilClient.is_unset(request.content):
|
|
1359
|
+
body['content'] = request.content
|
|
1360
|
+
if not UtilClient.is_unset(request.extra_info):
|
|
1361
|
+
body['extraInfo'] = request.extra_info
|
|
1362
|
+
if not UtilClient.is_unset(request.model_id):
|
|
1363
|
+
body['modelId'] = request.model_id
|
|
1364
|
+
if not UtilClient.is_unset(request.output_format):
|
|
1365
|
+
body['outputFormat'] = request.output_format
|
|
1366
|
+
if not UtilClient.is_unset(request.tags_shrink):
|
|
1367
|
+
body['tags'] = request.tags_shrink
|
|
1368
|
+
if not UtilClient.is_unset(request.task_description):
|
|
1369
|
+
body['taskDescription'] = request.task_description
|
|
1370
|
+
req = open_api_models.OpenApiRequest(
|
|
1371
|
+
headers=headers,
|
|
1372
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1373
|
+
)
|
|
1374
|
+
params = open_api_models.Params(
|
|
1375
|
+
action='RunNetworkContentAudit',
|
|
1376
|
+
version='2024-08-01',
|
|
1377
|
+
protocol='HTTPS',
|
|
1378
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runNetworkContentAudit',
|
|
1379
|
+
method='POST',
|
|
1380
|
+
auth_type='AK',
|
|
1381
|
+
style='ROA',
|
|
1382
|
+
req_body_type='formData',
|
|
1383
|
+
body_type='json'
|
|
1384
|
+
)
|
|
1385
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1386
|
+
return TeaCore.from_map(
|
|
1387
|
+
quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse(),
|
|
1388
|
+
await self.call_api_async(params, req, runtime)
|
|
1389
|
+
)
|
|
1390
|
+
else:
|
|
1391
|
+
return TeaCore.from_map(
|
|
1392
|
+
quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse(),
|
|
1393
|
+
await self.execute_async(params, req, runtime)
|
|
1394
|
+
)
|
|
1395
|
+
|
|
1396
|
+
def run_network_content_audit(
|
|
1397
|
+
self,
|
|
1398
|
+
workspace_id: str,
|
|
1399
|
+
request: quan_miao_light_app_20240801_models.RunNetworkContentAuditRequest,
|
|
1400
|
+
) -> quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse:
|
|
1401
|
+
"""
|
|
1402
|
+
@summary 轻应用-网络内容审核
|
|
1403
|
+
|
|
1404
|
+
@param request: RunNetworkContentAuditRequest
|
|
1405
|
+
@return: RunNetworkContentAuditResponse
|
|
1406
|
+
"""
|
|
1407
|
+
runtime = util_models.RuntimeOptions()
|
|
1408
|
+
headers = {}
|
|
1409
|
+
return self.run_network_content_audit_with_options(workspace_id, request, headers, runtime)
|
|
1410
|
+
|
|
1411
|
+
async def run_network_content_audit_async(
|
|
1412
|
+
self,
|
|
1413
|
+
workspace_id: str,
|
|
1414
|
+
request: quan_miao_light_app_20240801_models.RunNetworkContentAuditRequest,
|
|
1415
|
+
) -> quan_miao_light_app_20240801_models.RunNetworkContentAuditResponse:
|
|
1416
|
+
"""
|
|
1417
|
+
@summary 轻应用-网络内容审核
|
|
1418
|
+
|
|
1419
|
+
@param request: RunNetworkContentAuditRequest
|
|
1420
|
+
@return: RunNetworkContentAuditResponse
|
|
1421
|
+
"""
|
|
1422
|
+
runtime = util_models.RuntimeOptions()
|
|
1423
|
+
headers = {}
|
|
1424
|
+
return await self.run_network_content_audit_with_options_async(workspace_id, request, headers, runtime)
|
|
1425
|
+
|
|
1426
|
+
def run_script_chat_with_options(
|
|
1427
|
+
self,
|
|
1428
|
+
workspace_id: str,
|
|
1429
|
+
request: quan_miao_light_app_20240801_models.RunScriptChatRequest,
|
|
1430
|
+
headers: Dict[str, str],
|
|
1431
|
+
runtime: util_models.RuntimeOptions,
|
|
1432
|
+
) -> quan_miao_light_app_20240801_models.RunScriptChatResponse:
|
|
1433
|
+
"""
|
|
1434
|
+
@summary 长剧本创作
|
|
1435
|
+
|
|
1436
|
+
@param request: RunScriptChatRequest
|
|
1437
|
+
@param headers: map
|
|
1438
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1439
|
+
@return: RunScriptChatResponse
|
|
1440
|
+
"""
|
|
1441
|
+
UtilClient.validate_model(request)
|
|
1442
|
+
body = {}
|
|
1443
|
+
if not UtilClient.is_unset(request.prompt):
|
|
1444
|
+
body['prompt'] = request.prompt
|
|
1445
|
+
if not UtilClient.is_unset(request.task_id):
|
|
1446
|
+
body['taskId'] = request.task_id
|
|
1447
|
+
req = open_api_models.OpenApiRequest(
|
|
1448
|
+
headers=headers,
|
|
1449
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1450
|
+
)
|
|
1451
|
+
params = open_api_models.Params(
|
|
1452
|
+
action='RunScriptChat',
|
|
1453
|
+
version='2024-08-01',
|
|
1454
|
+
protocol='HTTPS',
|
|
1455
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptChat',
|
|
1456
|
+
method='POST',
|
|
1457
|
+
auth_type='AK',
|
|
1458
|
+
style='ROA',
|
|
1459
|
+
req_body_type='formData',
|
|
1460
|
+
body_type='json'
|
|
1461
|
+
)
|
|
1462
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1463
|
+
return TeaCore.from_map(
|
|
1464
|
+
quan_miao_light_app_20240801_models.RunScriptChatResponse(),
|
|
1465
|
+
self.call_api(params, req, runtime)
|
|
1466
|
+
)
|
|
1467
|
+
else:
|
|
1468
|
+
return TeaCore.from_map(
|
|
1469
|
+
quan_miao_light_app_20240801_models.RunScriptChatResponse(),
|
|
1470
|
+
self.execute(params, req, runtime)
|
|
1471
|
+
)
|
|
1472
|
+
|
|
1473
|
+
async def run_script_chat_with_options_async(
|
|
1474
|
+
self,
|
|
1475
|
+
workspace_id: str,
|
|
1476
|
+
request: quan_miao_light_app_20240801_models.RunScriptChatRequest,
|
|
1477
|
+
headers: Dict[str, str],
|
|
1478
|
+
runtime: util_models.RuntimeOptions,
|
|
1479
|
+
) -> quan_miao_light_app_20240801_models.RunScriptChatResponse:
|
|
1480
|
+
"""
|
|
1481
|
+
@summary 长剧本创作
|
|
1482
|
+
|
|
1483
|
+
@param request: RunScriptChatRequest
|
|
1484
|
+
@param headers: map
|
|
1485
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1486
|
+
@return: RunScriptChatResponse
|
|
1487
|
+
"""
|
|
1488
|
+
UtilClient.validate_model(request)
|
|
1489
|
+
body = {}
|
|
1490
|
+
if not UtilClient.is_unset(request.prompt):
|
|
1491
|
+
body['prompt'] = request.prompt
|
|
1492
|
+
if not UtilClient.is_unset(request.task_id):
|
|
1493
|
+
body['taskId'] = request.task_id
|
|
1494
|
+
req = open_api_models.OpenApiRequest(
|
|
1495
|
+
headers=headers,
|
|
1496
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1497
|
+
)
|
|
1498
|
+
params = open_api_models.Params(
|
|
1499
|
+
action='RunScriptChat',
|
|
1500
|
+
version='2024-08-01',
|
|
1501
|
+
protocol='HTTPS',
|
|
1502
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptChat',
|
|
1503
|
+
method='POST',
|
|
1504
|
+
auth_type='AK',
|
|
1505
|
+
style='ROA',
|
|
1506
|
+
req_body_type='formData',
|
|
1507
|
+
body_type='json'
|
|
1508
|
+
)
|
|
1509
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1510
|
+
return TeaCore.from_map(
|
|
1511
|
+
quan_miao_light_app_20240801_models.RunScriptChatResponse(),
|
|
1512
|
+
await self.call_api_async(params, req, runtime)
|
|
1513
|
+
)
|
|
1514
|
+
else:
|
|
1515
|
+
return TeaCore.from_map(
|
|
1516
|
+
quan_miao_light_app_20240801_models.RunScriptChatResponse(),
|
|
1517
|
+
await self.execute_async(params, req, runtime)
|
|
1518
|
+
)
|
|
1519
|
+
|
|
1520
|
+
def run_script_chat(
|
|
1521
|
+
self,
|
|
1522
|
+
workspace_id: str,
|
|
1523
|
+
request: quan_miao_light_app_20240801_models.RunScriptChatRequest,
|
|
1524
|
+
) -> quan_miao_light_app_20240801_models.RunScriptChatResponse:
|
|
1525
|
+
"""
|
|
1526
|
+
@summary 长剧本创作
|
|
1527
|
+
|
|
1528
|
+
@param request: RunScriptChatRequest
|
|
1529
|
+
@return: RunScriptChatResponse
|
|
1530
|
+
"""
|
|
1531
|
+
runtime = util_models.RuntimeOptions()
|
|
1532
|
+
headers = {}
|
|
1533
|
+
return self.run_script_chat_with_options(workspace_id, request, headers, runtime)
|
|
1534
|
+
|
|
1535
|
+
async def run_script_chat_async(
|
|
1536
|
+
self,
|
|
1537
|
+
workspace_id: str,
|
|
1538
|
+
request: quan_miao_light_app_20240801_models.RunScriptChatRequest,
|
|
1539
|
+
) -> quan_miao_light_app_20240801_models.RunScriptChatResponse:
|
|
1540
|
+
"""
|
|
1541
|
+
@summary 长剧本创作
|
|
1542
|
+
|
|
1543
|
+
@param request: RunScriptChatRequest
|
|
1544
|
+
@return: RunScriptChatResponse
|
|
1545
|
+
"""
|
|
1546
|
+
runtime = util_models.RuntimeOptions()
|
|
1547
|
+
headers = {}
|
|
1548
|
+
return await self.run_script_chat_with_options_async(workspace_id, request, headers, runtime)
|
|
1549
|
+
|
|
1550
|
+
def run_script_continue_with_options(
|
|
1551
|
+
self,
|
|
1552
|
+
workspace_id: str,
|
|
1553
|
+
request: quan_miao_light_app_20240801_models.RunScriptContinueRequest,
|
|
1554
|
+
headers: Dict[str, str],
|
|
1555
|
+
runtime: util_models.RuntimeOptions,
|
|
1556
|
+
) -> quan_miao_light_app_20240801_models.RunScriptContinueResponse:
|
|
1557
|
+
"""
|
|
1558
|
+
@summary 剧本续写
|
|
1559
|
+
|
|
1560
|
+
@param request: RunScriptContinueRequest
|
|
1561
|
+
@param headers: map
|
|
1562
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1563
|
+
@return: RunScriptContinueResponse
|
|
1564
|
+
"""
|
|
1565
|
+
UtilClient.validate_model(request)
|
|
1566
|
+
body = {}
|
|
1567
|
+
if not UtilClient.is_unset(request.script_summary):
|
|
1568
|
+
body['scriptSummary'] = request.script_summary
|
|
1569
|
+
if not UtilClient.is_unset(request.script_type_keyword):
|
|
1570
|
+
body['scriptTypeKeyword'] = request.script_type_keyword
|
|
1571
|
+
if not UtilClient.is_unset(request.user_provided_content):
|
|
1572
|
+
body['userProvidedContent'] = request.user_provided_content
|
|
1573
|
+
req = open_api_models.OpenApiRequest(
|
|
1574
|
+
headers=headers,
|
|
1575
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1576
|
+
)
|
|
1577
|
+
params = open_api_models.Params(
|
|
1578
|
+
action='RunScriptContinue',
|
|
1579
|
+
version='2024-08-01',
|
|
1580
|
+
protocol='HTTPS',
|
|
1581
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptContinue',
|
|
1582
|
+
method='POST',
|
|
1583
|
+
auth_type='AK',
|
|
1584
|
+
style='ROA',
|
|
1585
|
+
req_body_type='formData',
|
|
1586
|
+
body_type='json'
|
|
1587
|
+
)
|
|
1588
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1589
|
+
return TeaCore.from_map(
|
|
1590
|
+
quan_miao_light_app_20240801_models.RunScriptContinueResponse(),
|
|
1591
|
+
self.call_api(params, req, runtime)
|
|
1592
|
+
)
|
|
1593
|
+
else:
|
|
1594
|
+
return TeaCore.from_map(
|
|
1595
|
+
quan_miao_light_app_20240801_models.RunScriptContinueResponse(),
|
|
1596
|
+
self.execute(params, req, runtime)
|
|
1597
|
+
)
|
|
1598
|
+
|
|
1599
|
+
async def run_script_continue_with_options_async(
|
|
1600
|
+
self,
|
|
1601
|
+
workspace_id: str,
|
|
1602
|
+
request: quan_miao_light_app_20240801_models.RunScriptContinueRequest,
|
|
1603
|
+
headers: Dict[str, str],
|
|
1604
|
+
runtime: util_models.RuntimeOptions,
|
|
1605
|
+
) -> quan_miao_light_app_20240801_models.RunScriptContinueResponse:
|
|
1606
|
+
"""
|
|
1607
|
+
@summary 剧本续写
|
|
1608
|
+
|
|
1609
|
+
@param request: RunScriptContinueRequest
|
|
1610
|
+
@param headers: map
|
|
1611
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1612
|
+
@return: RunScriptContinueResponse
|
|
1613
|
+
"""
|
|
1614
|
+
UtilClient.validate_model(request)
|
|
1615
|
+
body = {}
|
|
1616
|
+
if not UtilClient.is_unset(request.script_summary):
|
|
1617
|
+
body['scriptSummary'] = request.script_summary
|
|
1618
|
+
if not UtilClient.is_unset(request.script_type_keyword):
|
|
1619
|
+
body['scriptTypeKeyword'] = request.script_type_keyword
|
|
1620
|
+
if not UtilClient.is_unset(request.user_provided_content):
|
|
1621
|
+
body['userProvidedContent'] = request.user_provided_content
|
|
1622
|
+
req = open_api_models.OpenApiRequest(
|
|
1623
|
+
headers=headers,
|
|
1624
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1625
|
+
)
|
|
1626
|
+
params = open_api_models.Params(
|
|
1627
|
+
action='RunScriptContinue',
|
|
1628
|
+
version='2024-08-01',
|
|
1629
|
+
protocol='HTTPS',
|
|
1630
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptContinue',
|
|
1631
|
+
method='POST',
|
|
1632
|
+
auth_type='AK',
|
|
1633
|
+
style='ROA',
|
|
1634
|
+
req_body_type='formData',
|
|
1635
|
+
body_type='json'
|
|
1636
|
+
)
|
|
1637
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1638
|
+
return TeaCore.from_map(
|
|
1639
|
+
quan_miao_light_app_20240801_models.RunScriptContinueResponse(),
|
|
1640
|
+
await self.call_api_async(params, req, runtime)
|
|
1641
|
+
)
|
|
1642
|
+
else:
|
|
1643
|
+
return TeaCore.from_map(
|
|
1644
|
+
quan_miao_light_app_20240801_models.RunScriptContinueResponse(),
|
|
1645
|
+
await self.execute_async(params, req, runtime)
|
|
1646
|
+
)
|
|
1647
|
+
|
|
1648
|
+
def run_script_continue(
|
|
1649
|
+
self,
|
|
1650
|
+
workspace_id: str,
|
|
1651
|
+
request: quan_miao_light_app_20240801_models.RunScriptContinueRequest,
|
|
1652
|
+
) -> quan_miao_light_app_20240801_models.RunScriptContinueResponse:
|
|
1653
|
+
"""
|
|
1654
|
+
@summary 剧本续写
|
|
1655
|
+
|
|
1656
|
+
@param request: RunScriptContinueRequest
|
|
1657
|
+
@return: RunScriptContinueResponse
|
|
1658
|
+
"""
|
|
1659
|
+
runtime = util_models.RuntimeOptions()
|
|
1660
|
+
headers = {}
|
|
1661
|
+
return self.run_script_continue_with_options(workspace_id, request, headers, runtime)
|
|
1662
|
+
|
|
1663
|
+
async def run_script_continue_async(
|
|
1664
|
+
self,
|
|
1665
|
+
workspace_id: str,
|
|
1666
|
+
request: quan_miao_light_app_20240801_models.RunScriptContinueRequest,
|
|
1667
|
+
) -> quan_miao_light_app_20240801_models.RunScriptContinueResponse:
|
|
1668
|
+
"""
|
|
1669
|
+
@summary 剧本续写
|
|
1670
|
+
|
|
1671
|
+
@param request: RunScriptContinueRequest
|
|
1672
|
+
@return: RunScriptContinueResponse
|
|
1673
|
+
"""
|
|
1674
|
+
runtime = util_models.RuntimeOptions()
|
|
1675
|
+
headers = {}
|
|
1676
|
+
return await self.run_script_continue_with_options_async(workspace_id, request, headers, runtime)
|
|
1677
|
+
|
|
1678
|
+
def run_script_planning_with_options(
|
|
1679
|
+
self,
|
|
1680
|
+
workspace_id: str,
|
|
1681
|
+
request: quan_miao_light_app_20240801_models.RunScriptPlanningRequest,
|
|
1682
|
+
headers: Dict[str, str],
|
|
1683
|
+
runtime: util_models.RuntimeOptions,
|
|
1684
|
+
) -> quan_miao_light_app_20240801_models.RunScriptPlanningResponse:
|
|
1685
|
+
"""
|
|
1686
|
+
@summary 剧本策划
|
|
1687
|
+
|
|
1688
|
+
@param request: RunScriptPlanningRequest
|
|
1689
|
+
@param headers: map
|
|
1690
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1691
|
+
@return: RunScriptPlanningResponse
|
|
1692
|
+
"""
|
|
1693
|
+
UtilClient.validate_model(request)
|
|
1694
|
+
body = {}
|
|
1695
|
+
if not UtilClient.is_unset(request.additional_note):
|
|
1696
|
+
body['additionalNote'] = request.additional_note
|
|
1697
|
+
if not UtilClient.is_unset(request.dialogue_in_scene):
|
|
1698
|
+
body['dialogueInScene'] = request.dialogue_in_scene
|
|
1699
|
+
if not UtilClient.is_unset(request.plot_conflict):
|
|
1700
|
+
body['plotConflict'] = request.plot_conflict
|
|
1701
|
+
if not UtilClient.is_unset(request.script_name):
|
|
1702
|
+
body['scriptName'] = request.script_name
|
|
1703
|
+
if not UtilClient.is_unset(request.script_shot_count):
|
|
1704
|
+
body['scriptShotCount'] = request.script_shot_count
|
|
1705
|
+
if not UtilClient.is_unset(request.script_summary):
|
|
1706
|
+
body['scriptSummary'] = request.script_summary
|
|
1707
|
+
if not UtilClient.is_unset(request.script_type_keyword):
|
|
1708
|
+
body['scriptTypeKeyword'] = request.script_type_keyword
|
|
1709
|
+
req = open_api_models.OpenApiRequest(
|
|
1710
|
+
headers=headers,
|
|
1711
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1712
|
+
)
|
|
1713
|
+
params = open_api_models.Params(
|
|
1714
|
+
action='RunScriptPlanning',
|
|
1715
|
+
version='2024-08-01',
|
|
1716
|
+
protocol='HTTPS',
|
|
1717
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptPlanning',
|
|
1718
|
+
method='POST',
|
|
1719
|
+
auth_type='AK',
|
|
1720
|
+
style='ROA',
|
|
1721
|
+
req_body_type='formData',
|
|
1722
|
+
body_type='json'
|
|
1723
|
+
)
|
|
1724
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1725
|
+
return TeaCore.from_map(
|
|
1726
|
+
quan_miao_light_app_20240801_models.RunScriptPlanningResponse(),
|
|
1727
|
+
self.call_api(params, req, runtime)
|
|
1728
|
+
)
|
|
1729
|
+
else:
|
|
1730
|
+
return TeaCore.from_map(
|
|
1731
|
+
quan_miao_light_app_20240801_models.RunScriptPlanningResponse(),
|
|
1732
|
+
self.execute(params, req, runtime)
|
|
1733
|
+
)
|
|
1734
|
+
|
|
1735
|
+
async def run_script_planning_with_options_async(
|
|
1736
|
+
self,
|
|
1737
|
+
workspace_id: str,
|
|
1738
|
+
request: quan_miao_light_app_20240801_models.RunScriptPlanningRequest,
|
|
1739
|
+
headers: Dict[str, str],
|
|
1740
|
+
runtime: util_models.RuntimeOptions,
|
|
1741
|
+
) -> quan_miao_light_app_20240801_models.RunScriptPlanningResponse:
|
|
1742
|
+
"""
|
|
1743
|
+
@summary 剧本策划
|
|
1744
|
+
|
|
1745
|
+
@param request: RunScriptPlanningRequest
|
|
1746
|
+
@param headers: map
|
|
1747
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1748
|
+
@return: RunScriptPlanningResponse
|
|
1749
|
+
"""
|
|
1750
|
+
UtilClient.validate_model(request)
|
|
1751
|
+
body = {}
|
|
1752
|
+
if not UtilClient.is_unset(request.additional_note):
|
|
1753
|
+
body['additionalNote'] = request.additional_note
|
|
1754
|
+
if not UtilClient.is_unset(request.dialogue_in_scene):
|
|
1755
|
+
body['dialogueInScene'] = request.dialogue_in_scene
|
|
1756
|
+
if not UtilClient.is_unset(request.plot_conflict):
|
|
1757
|
+
body['plotConflict'] = request.plot_conflict
|
|
1758
|
+
if not UtilClient.is_unset(request.script_name):
|
|
1759
|
+
body['scriptName'] = request.script_name
|
|
1760
|
+
if not UtilClient.is_unset(request.script_shot_count):
|
|
1761
|
+
body['scriptShotCount'] = request.script_shot_count
|
|
1762
|
+
if not UtilClient.is_unset(request.script_summary):
|
|
1763
|
+
body['scriptSummary'] = request.script_summary
|
|
1764
|
+
if not UtilClient.is_unset(request.script_type_keyword):
|
|
1765
|
+
body['scriptTypeKeyword'] = request.script_type_keyword
|
|
1766
|
+
req = open_api_models.OpenApiRequest(
|
|
1767
|
+
headers=headers,
|
|
1768
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1769
|
+
)
|
|
1770
|
+
params = open_api_models.Params(
|
|
1771
|
+
action='RunScriptPlanning',
|
|
1772
|
+
version='2024-08-01',
|
|
1773
|
+
protocol='HTTPS',
|
|
1774
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptPlanning',
|
|
1775
|
+
method='POST',
|
|
1776
|
+
auth_type='AK',
|
|
1777
|
+
style='ROA',
|
|
1778
|
+
req_body_type='formData',
|
|
1779
|
+
body_type='json'
|
|
1780
|
+
)
|
|
1781
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1782
|
+
return TeaCore.from_map(
|
|
1783
|
+
quan_miao_light_app_20240801_models.RunScriptPlanningResponse(),
|
|
1784
|
+
await self.call_api_async(params, req, runtime)
|
|
1785
|
+
)
|
|
1786
|
+
else:
|
|
1787
|
+
return TeaCore.from_map(
|
|
1788
|
+
quan_miao_light_app_20240801_models.RunScriptPlanningResponse(),
|
|
1789
|
+
await self.execute_async(params, req, runtime)
|
|
1790
|
+
)
|
|
1791
|
+
|
|
1792
|
+
def run_script_planning(
|
|
1793
|
+
self,
|
|
1794
|
+
workspace_id: str,
|
|
1795
|
+
request: quan_miao_light_app_20240801_models.RunScriptPlanningRequest,
|
|
1796
|
+
) -> quan_miao_light_app_20240801_models.RunScriptPlanningResponse:
|
|
1797
|
+
"""
|
|
1798
|
+
@summary 剧本策划
|
|
1799
|
+
|
|
1800
|
+
@param request: RunScriptPlanningRequest
|
|
1801
|
+
@return: RunScriptPlanningResponse
|
|
1802
|
+
"""
|
|
1803
|
+
runtime = util_models.RuntimeOptions()
|
|
1804
|
+
headers = {}
|
|
1805
|
+
return self.run_script_planning_with_options(workspace_id, request, headers, runtime)
|
|
1806
|
+
|
|
1807
|
+
async def run_script_planning_async(
|
|
1808
|
+
self,
|
|
1809
|
+
workspace_id: str,
|
|
1810
|
+
request: quan_miao_light_app_20240801_models.RunScriptPlanningRequest,
|
|
1811
|
+
) -> quan_miao_light_app_20240801_models.RunScriptPlanningResponse:
|
|
1812
|
+
"""
|
|
1813
|
+
@summary 剧本策划
|
|
1814
|
+
|
|
1815
|
+
@param request: RunScriptPlanningRequest
|
|
1816
|
+
@return: RunScriptPlanningResponse
|
|
1817
|
+
"""
|
|
1818
|
+
runtime = util_models.RuntimeOptions()
|
|
1819
|
+
headers = {}
|
|
1820
|
+
return await self.run_script_planning_with_options_async(workspace_id, request, headers, runtime)
|
|
1821
|
+
|
|
1822
|
+
def run_script_refine_with_options(
|
|
1823
|
+
self,
|
|
1824
|
+
workspace_id: str,
|
|
1825
|
+
request: quan_miao_light_app_20240801_models.RunScriptRefineRequest,
|
|
1826
|
+
headers: Dict[str, str],
|
|
1827
|
+
runtime: util_models.RuntimeOptions,
|
|
1828
|
+
) -> quan_miao_light_app_20240801_models.RunScriptRefineResponse:
|
|
1829
|
+
"""
|
|
1830
|
+
@summary 剧本对话内容的整理
|
|
1831
|
+
|
|
1832
|
+
@param request: RunScriptRefineRequest
|
|
1833
|
+
@param headers: map
|
|
1834
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1835
|
+
@return: RunScriptRefineResponse
|
|
1836
|
+
"""
|
|
1837
|
+
UtilClient.validate_model(request)
|
|
1838
|
+
body = {}
|
|
1839
|
+
if not UtilClient.is_unset(request.task_id):
|
|
1840
|
+
body['taskId'] = request.task_id
|
|
1841
|
+
req = open_api_models.OpenApiRequest(
|
|
1842
|
+
headers=headers,
|
|
1843
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1844
|
+
)
|
|
1845
|
+
params = open_api_models.Params(
|
|
1846
|
+
action='RunScriptRefine',
|
|
1847
|
+
version='2024-08-01',
|
|
1848
|
+
protocol='HTTPS',
|
|
1849
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptRefine',
|
|
1850
|
+
method='POST',
|
|
1851
|
+
auth_type='AK',
|
|
1852
|
+
style='ROA',
|
|
1853
|
+
req_body_type='formData',
|
|
1854
|
+
body_type='json'
|
|
1855
|
+
)
|
|
1856
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1857
|
+
return TeaCore.from_map(
|
|
1858
|
+
quan_miao_light_app_20240801_models.RunScriptRefineResponse(),
|
|
1859
|
+
self.call_api(params, req, runtime)
|
|
1860
|
+
)
|
|
1861
|
+
else:
|
|
1862
|
+
return TeaCore.from_map(
|
|
1863
|
+
quan_miao_light_app_20240801_models.RunScriptRefineResponse(),
|
|
1864
|
+
self.execute(params, req, runtime)
|
|
1865
|
+
)
|
|
1866
|
+
|
|
1867
|
+
async def run_script_refine_with_options_async(
|
|
1868
|
+
self,
|
|
1869
|
+
workspace_id: str,
|
|
1870
|
+
request: quan_miao_light_app_20240801_models.RunScriptRefineRequest,
|
|
1871
|
+
headers: Dict[str, str],
|
|
1872
|
+
runtime: util_models.RuntimeOptions,
|
|
1873
|
+
) -> quan_miao_light_app_20240801_models.RunScriptRefineResponse:
|
|
1874
|
+
"""
|
|
1875
|
+
@summary 剧本对话内容的整理
|
|
1876
|
+
|
|
1877
|
+
@param request: RunScriptRefineRequest
|
|
1878
|
+
@param headers: map
|
|
1879
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1880
|
+
@return: RunScriptRefineResponse
|
|
1881
|
+
"""
|
|
1882
|
+
UtilClient.validate_model(request)
|
|
1883
|
+
body = {}
|
|
1884
|
+
if not UtilClient.is_unset(request.task_id):
|
|
1885
|
+
body['taskId'] = request.task_id
|
|
1886
|
+
req = open_api_models.OpenApiRequest(
|
|
1887
|
+
headers=headers,
|
|
1888
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1889
|
+
)
|
|
1890
|
+
params = open_api_models.Params(
|
|
1891
|
+
action='RunScriptRefine',
|
|
1892
|
+
version='2024-08-01',
|
|
1893
|
+
protocol='HTTPS',
|
|
1894
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runScriptRefine',
|
|
1895
|
+
method='POST',
|
|
1896
|
+
auth_type='AK',
|
|
1897
|
+
style='ROA',
|
|
1898
|
+
req_body_type='formData',
|
|
1899
|
+
body_type='json'
|
|
1900
|
+
)
|
|
1901
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1902
|
+
return TeaCore.from_map(
|
|
1903
|
+
quan_miao_light_app_20240801_models.RunScriptRefineResponse(),
|
|
1904
|
+
await self.call_api_async(params, req, runtime)
|
|
1905
|
+
)
|
|
1906
|
+
else:
|
|
1907
|
+
return TeaCore.from_map(
|
|
1908
|
+
quan_miao_light_app_20240801_models.RunScriptRefineResponse(),
|
|
1909
|
+
await self.execute_async(params, req, runtime)
|
|
1910
|
+
)
|
|
1911
|
+
|
|
1912
|
+
def run_script_refine(
|
|
1913
|
+
self,
|
|
1914
|
+
workspace_id: str,
|
|
1915
|
+
request: quan_miao_light_app_20240801_models.RunScriptRefineRequest,
|
|
1916
|
+
) -> quan_miao_light_app_20240801_models.RunScriptRefineResponse:
|
|
1917
|
+
"""
|
|
1918
|
+
@summary 剧本对话内容的整理
|
|
1919
|
+
|
|
1920
|
+
@param request: RunScriptRefineRequest
|
|
1921
|
+
@return: RunScriptRefineResponse
|
|
1922
|
+
"""
|
|
1923
|
+
runtime = util_models.RuntimeOptions()
|
|
1924
|
+
headers = {}
|
|
1925
|
+
return self.run_script_refine_with_options(workspace_id, request, headers, runtime)
|
|
1926
|
+
|
|
1927
|
+
async def run_script_refine_async(
|
|
1928
|
+
self,
|
|
1929
|
+
workspace_id: str,
|
|
1930
|
+
request: quan_miao_light_app_20240801_models.RunScriptRefineRequest,
|
|
1931
|
+
) -> quan_miao_light_app_20240801_models.RunScriptRefineResponse:
|
|
1932
|
+
"""
|
|
1933
|
+
@summary 剧本对话内容的整理
|
|
1934
|
+
|
|
1935
|
+
@param request: RunScriptRefineRequest
|
|
1936
|
+
@return: RunScriptRefineResponse
|
|
1937
|
+
"""
|
|
1938
|
+
runtime = util_models.RuntimeOptions()
|
|
1939
|
+
headers = {}
|
|
1940
|
+
return await self.run_script_refine_with_options_async(workspace_id, request, headers, runtime)
|
|
1941
|
+
|
|
1942
|
+
def run_style_writing_with_options(
|
|
1943
|
+
self,
|
|
1944
|
+
workspace_id: str,
|
|
1945
|
+
tmp_req: quan_miao_light_app_20240801_models.RunStyleWritingRequest,
|
|
1946
|
+
headers: Dict[str, str],
|
|
1947
|
+
runtime: util_models.RuntimeOptions,
|
|
1948
|
+
) -> quan_miao_light_app_20240801_models.RunStyleWritingResponse:
|
|
1949
|
+
"""
|
|
1950
|
+
@summary 文体学习和写作推理服务
|
|
1951
|
+
|
|
1952
|
+
@param tmp_req: RunStyleWritingRequest
|
|
1953
|
+
@param headers: map
|
|
1954
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
1955
|
+
@return: RunStyleWritingResponse
|
|
1956
|
+
"""
|
|
1957
|
+
UtilClient.validate_model(tmp_req)
|
|
1958
|
+
request = quan_miao_light_app_20240801_models.RunStyleWritingShrinkRequest()
|
|
1959
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
1960
|
+
if not UtilClient.is_unset(tmp_req.learning_samples):
|
|
1961
|
+
request.learning_samples_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.learning_samples, 'learningSamples', 'json')
|
|
1962
|
+
if not UtilClient.is_unset(tmp_req.reference_materials):
|
|
1963
|
+
request.reference_materials_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.reference_materials, 'referenceMaterials', 'json')
|
|
1964
|
+
body = {}
|
|
1965
|
+
if not UtilClient.is_unset(request.learning_samples_shrink):
|
|
1966
|
+
body['learningSamples'] = request.learning_samples_shrink
|
|
1967
|
+
if not UtilClient.is_unset(request.process_stage):
|
|
1968
|
+
body['processStage'] = request.process_stage
|
|
1969
|
+
if not UtilClient.is_unset(request.reference_materials_shrink):
|
|
1970
|
+
body['referenceMaterials'] = request.reference_materials_shrink
|
|
1971
|
+
if not UtilClient.is_unset(request.style_feature):
|
|
1972
|
+
body['styleFeature'] = request.style_feature
|
|
1973
|
+
if not UtilClient.is_unset(request.use_search):
|
|
1974
|
+
body['useSearch'] = request.use_search
|
|
1975
|
+
if not UtilClient.is_unset(request.writing_theme):
|
|
1976
|
+
body['writingTheme'] = request.writing_theme
|
|
1977
|
+
req = open_api_models.OpenApiRequest(
|
|
1978
|
+
headers=headers,
|
|
1979
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
1980
|
+
)
|
|
1981
|
+
params = open_api_models.Params(
|
|
1982
|
+
action='RunStyleWriting',
|
|
1983
|
+
version='2024-08-01',
|
|
1984
|
+
protocol='HTTPS',
|
|
1985
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runStyleWriting',
|
|
1986
|
+
method='POST',
|
|
1987
|
+
auth_type='AK',
|
|
1988
|
+
style='ROA',
|
|
1989
|
+
req_body_type='formData',
|
|
1990
|
+
body_type='json'
|
|
1991
|
+
)
|
|
1992
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
1993
|
+
return TeaCore.from_map(
|
|
1994
|
+
quan_miao_light_app_20240801_models.RunStyleWritingResponse(),
|
|
1995
|
+
self.call_api(params, req, runtime)
|
|
1996
|
+
)
|
|
1997
|
+
else:
|
|
1998
|
+
return TeaCore.from_map(
|
|
1999
|
+
quan_miao_light_app_20240801_models.RunStyleWritingResponse(),
|
|
2000
|
+
self.execute(params, req, runtime)
|
|
2001
|
+
)
|
|
2002
|
+
|
|
2003
|
+
async def run_style_writing_with_options_async(
|
|
2004
|
+
self,
|
|
2005
|
+
workspace_id: str,
|
|
2006
|
+
tmp_req: quan_miao_light_app_20240801_models.RunStyleWritingRequest,
|
|
2007
|
+
headers: Dict[str, str],
|
|
2008
|
+
runtime: util_models.RuntimeOptions,
|
|
2009
|
+
) -> quan_miao_light_app_20240801_models.RunStyleWritingResponse:
|
|
2010
|
+
"""
|
|
2011
|
+
@summary 文体学习和写作推理服务
|
|
2012
|
+
|
|
2013
|
+
@param tmp_req: RunStyleWritingRequest
|
|
2014
|
+
@param headers: map
|
|
2015
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2016
|
+
@return: RunStyleWritingResponse
|
|
2017
|
+
"""
|
|
2018
|
+
UtilClient.validate_model(tmp_req)
|
|
2019
|
+
request = quan_miao_light_app_20240801_models.RunStyleWritingShrinkRequest()
|
|
2020
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2021
|
+
if not UtilClient.is_unset(tmp_req.learning_samples):
|
|
2022
|
+
request.learning_samples_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.learning_samples, 'learningSamples', 'json')
|
|
2023
|
+
if not UtilClient.is_unset(tmp_req.reference_materials):
|
|
2024
|
+
request.reference_materials_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.reference_materials, 'referenceMaterials', 'json')
|
|
2025
|
+
body = {}
|
|
2026
|
+
if not UtilClient.is_unset(request.learning_samples_shrink):
|
|
2027
|
+
body['learningSamples'] = request.learning_samples_shrink
|
|
2028
|
+
if not UtilClient.is_unset(request.process_stage):
|
|
2029
|
+
body['processStage'] = request.process_stage
|
|
2030
|
+
if not UtilClient.is_unset(request.reference_materials_shrink):
|
|
2031
|
+
body['referenceMaterials'] = request.reference_materials_shrink
|
|
2032
|
+
if not UtilClient.is_unset(request.style_feature):
|
|
2033
|
+
body['styleFeature'] = request.style_feature
|
|
2034
|
+
if not UtilClient.is_unset(request.use_search):
|
|
2035
|
+
body['useSearch'] = request.use_search
|
|
2036
|
+
if not UtilClient.is_unset(request.writing_theme):
|
|
2037
|
+
body['writingTheme'] = request.writing_theme
|
|
2038
|
+
req = open_api_models.OpenApiRequest(
|
|
2039
|
+
headers=headers,
|
|
2040
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2041
|
+
)
|
|
2042
|
+
params = open_api_models.Params(
|
|
2043
|
+
action='RunStyleWriting',
|
|
2044
|
+
version='2024-08-01',
|
|
2045
|
+
protocol='HTTPS',
|
|
2046
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runStyleWriting',
|
|
2047
|
+
method='POST',
|
|
2048
|
+
auth_type='AK',
|
|
2049
|
+
style='ROA',
|
|
2050
|
+
req_body_type='formData',
|
|
2051
|
+
body_type='json'
|
|
2052
|
+
)
|
|
2053
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2054
|
+
return TeaCore.from_map(
|
|
2055
|
+
quan_miao_light_app_20240801_models.RunStyleWritingResponse(),
|
|
2056
|
+
await self.call_api_async(params, req, runtime)
|
|
2057
|
+
)
|
|
2058
|
+
else:
|
|
2059
|
+
return TeaCore.from_map(
|
|
2060
|
+
quan_miao_light_app_20240801_models.RunStyleWritingResponse(),
|
|
2061
|
+
await self.execute_async(params, req, runtime)
|
|
2062
|
+
)
|
|
2063
|
+
|
|
2064
|
+
def run_style_writing(
|
|
2065
|
+
self,
|
|
2066
|
+
workspace_id: str,
|
|
2067
|
+
request: quan_miao_light_app_20240801_models.RunStyleWritingRequest,
|
|
2068
|
+
) -> quan_miao_light_app_20240801_models.RunStyleWritingResponse:
|
|
2069
|
+
"""
|
|
2070
|
+
@summary 文体学习和写作推理服务
|
|
2071
|
+
|
|
2072
|
+
@param request: RunStyleWritingRequest
|
|
2073
|
+
@return: RunStyleWritingResponse
|
|
2074
|
+
"""
|
|
2075
|
+
runtime = util_models.RuntimeOptions()
|
|
2076
|
+
headers = {}
|
|
2077
|
+
return self.run_style_writing_with_options(workspace_id, request, headers, runtime)
|
|
2078
|
+
|
|
2079
|
+
async def run_style_writing_async(
|
|
2080
|
+
self,
|
|
2081
|
+
workspace_id: str,
|
|
2082
|
+
request: quan_miao_light_app_20240801_models.RunStyleWritingRequest,
|
|
2083
|
+
) -> quan_miao_light_app_20240801_models.RunStyleWritingResponse:
|
|
2084
|
+
"""
|
|
2085
|
+
@summary 文体学习和写作推理服务
|
|
2086
|
+
|
|
2087
|
+
@param request: RunStyleWritingRequest
|
|
2088
|
+
@return: RunStyleWritingResponse
|
|
2089
|
+
"""
|
|
2090
|
+
runtime = util_models.RuntimeOptions()
|
|
2091
|
+
headers = {}
|
|
2092
|
+
return await self.run_style_writing_with_options_async(workspace_id, request, headers, runtime)
|
|
2093
|
+
|
|
2094
|
+
def run_tag_mining_analysis_with_options(
|
|
2095
|
+
self,
|
|
2096
|
+
workspace_id: str,
|
|
2097
|
+
tmp_req: quan_miao_light_app_20240801_models.RunTagMiningAnalysisRequest,
|
|
2098
|
+
headers: Dict[str, str],
|
|
2099
|
+
runtime: util_models.RuntimeOptions,
|
|
2100
|
+
) -> quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse:
|
|
2101
|
+
"""
|
|
2102
|
+
@summary 轻应用-标签挖掘
|
|
2103
|
+
|
|
2104
|
+
@param tmp_req: RunTagMiningAnalysisRequest
|
|
2105
|
+
@param headers: map
|
|
2106
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2107
|
+
@return: RunTagMiningAnalysisResponse
|
|
2108
|
+
"""
|
|
2109
|
+
UtilClient.validate_model(tmp_req)
|
|
2110
|
+
request = quan_miao_light_app_20240801_models.RunTagMiningAnalysisShrinkRequest()
|
|
2111
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2112
|
+
if not UtilClient.is_unset(tmp_req.tags):
|
|
2113
|
+
request.tags_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.tags, 'tags', 'json')
|
|
2114
|
+
body = {}
|
|
2115
|
+
if not UtilClient.is_unset(request.business_type):
|
|
2116
|
+
body['businessType'] = request.business_type
|
|
2117
|
+
if not UtilClient.is_unset(request.content):
|
|
2118
|
+
body['content'] = request.content
|
|
2119
|
+
if not UtilClient.is_unset(request.extra_info):
|
|
2120
|
+
body['extraInfo'] = request.extra_info
|
|
2121
|
+
if not UtilClient.is_unset(request.model_id):
|
|
2122
|
+
body['modelId'] = request.model_id
|
|
2123
|
+
if not UtilClient.is_unset(request.output_format):
|
|
2124
|
+
body['outputFormat'] = request.output_format
|
|
2125
|
+
if not UtilClient.is_unset(request.tags_shrink):
|
|
2126
|
+
body['tags'] = request.tags_shrink
|
|
2127
|
+
if not UtilClient.is_unset(request.task_description):
|
|
2128
|
+
body['taskDescription'] = request.task_description
|
|
2129
|
+
req = open_api_models.OpenApiRequest(
|
|
2130
|
+
headers=headers,
|
|
2131
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2132
|
+
)
|
|
2133
|
+
params = open_api_models.Params(
|
|
2134
|
+
action='RunTagMiningAnalysis',
|
|
2135
|
+
version='2024-08-01',
|
|
2136
|
+
protocol='HTTPS',
|
|
2137
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runTagMiningAnalysis',
|
|
2138
|
+
method='POST',
|
|
2139
|
+
auth_type='AK',
|
|
2140
|
+
style='ROA',
|
|
2141
|
+
req_body_type='formData',
|
|
2142
|
+
body_type='json'
|
|
2143
|
+
)
|
|
2144
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2145
|
+
return TeaCore.from_map(
|
|
2146
|
+
quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse(),
|
|
2147
|
+
self.call_api(params, req, runtime)
|
|
2148
|
+
)
|
|
2149
|
+
else:
|
|
2150
|
+
return TeaCore.from_map(
|
|
2151
|
+
quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse(),
|
|
2152
|
+
self.execute(params, req, runtime)
|
|
2153
|
+
)
|
|
2154
|
+
|
|
2155
|
+
async def run_tag_mining_analysis_with_options_async(
|
|
2156
|
+
self,
|
|
2157
|
+
workspace_id: str,
|
|
2158
|
+
tmp_req: quan_miao_light_app_20240801_models.RunTagMiningAnalysisRequest,
|
|
2159
|
+
headers: Dict[str, str],
|
|
2160
|
+
runtime: util_models.RuntimeOptions,
|
|
2161
|
+
) -> quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse:
|
|
2162
|
+
"""
|
|
2163
|
+
@summary 轻应用-标签挖掘
|
|
2164
|
+
|
|
2165
|
+
@param tmp_req: RunTagMiningAnalysisRequest
|
|
2166
|
+
@param headers: map
|
|
2167
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2168
|
+
@return: RunTagMiningAnalysisResponse
|
|
2169
|
+
"""
|
|
2170
|
+
UtilClient.validate_model(tmp_req)
|
|
2171
|
+
request = quan_miao_light_app_20240801_models.RunTagMiningAnalysisShrinkRequest()
|
|
2172
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2173
|
+
if not UtilClient.is_unset(tmp_req.tags):
|
|
2174
|
+
request.tags_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.tags, 'tags', 'json')
|
|
2175
|
+
body = {}
|
|
2176
|
+
if not UtilClient.is_unset(request.business_type):
|
|
2177
|
+
body['businessType'] = request.business_type
|
|
2178
|
+
if not UtilClient.is_unset(request.content):
|
|
2179
|
+
body['content'] = request.content
|
|
2180
|
+
if not UtilClient.is_unset(request.extra_info):
|
|
2181
|
+
body['extraInfo'] = request.extra_info
|
|
2182
|
+
if not UtilClient.is_unset(request.model_id):
|
|
2183
|
+
body['modelId'] = request.model_id
|
|
2184
|
+
if not UtilClient.is_unset(request.output_format):
|
|
2185
|
+
body['outputFormat'] = request.output_format
|
|
2186
|
+
if not UtilClient.is_unset(request.tags_shrink):
|
|
2187
|
+
body['tags'] = request.tags_shrink
|
|
2188
|
+
if not UtilClient.is_unset(request.task_description):
|
|
2189
|
+
body['taskDescription'] = request.task_description
|
|
2190
|
+
req = open_api_models.OpenApiRequest(
|
|
2191
|
+
headers=headers,
|
|
2192
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2193
|
+
)
|
|
2194
|
+
params = open_api_models.Params(
|
|
2195
|
+
action='RunTagMiningAnalysis',
|
|
2196
|
+
version='2024-08-01',
|
|
2197
|
+
protocol='HTTPS',
|
|
2198
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runTagMiningAnalysis',
|
|
2199
|
+
method='POST',
|
|
2200
|
+
auth_type='AK',
|
|
2201
|
+
style='ROA',
|
|
2202
|
+
req_body_type='formData',
|
|
2203
|
+
body_type='json'
|
|
2204
|
+
)
|
|
2205
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2206
|
+
return TeaCore.from_map(
|
|
2207
|
+
quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse(),
|
|
2208
|
+
await self.call_api_async(params, req, runtime)
|
|
2209
|
+
)
|
|
2210
|
+
else:
|
|
2211
|
+
return TeaCore.from_map(
|
|
2212
|
+
quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse(),
|
|
2213
|
+
await self.execute_async(params, req, runtime)
|
|
2214
|
+
)
|
|
2215
|
+
|
|
2216
|
+
def run_tag_mining_analysis(
|
|
2217
|
+
self,
|
|
2218
|
+
workspace_id: str,
|
|
2219
|
+
request: quan_miao_light_app_20240801_models.RunTagMiningAnalysisRequest,
|
|
2220
|
+
) -> quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse:
|
|
2221
|
+
"""
|
|
2222
|
+
@summary 轻应用-标签挖掘
|
|
2223
|
+
|
|
2224
|
+
@param request: RunTagMiningAnalysisRequest
|
|
2225
|
+
@return: RunTagMiningAnalysisResponse
|
|
2226
|
+
"""
|
|
2227
|
+
runtime = util_models.RuntimeOptions()
|
|
2228
|
+
headers = {}
|
|
2229
|
+
return self.run_tag_mining_analysis_with_options(workspace_id, request, headers, runtime)
|
|
2230
|
+
|
|
2231
|
+
async def run_tag_mining_analysis_async(
|
|
2232
|
+
self,
|
|
2233
|
+
workspace_id: str,
|
|
2234
|
+
request: quan_miao_light_app_20240801_models.RunTagMiningAnalysisRequest,
|
|
2235
|
+
) -> quan_miao_light_app_20240801_models.RunTagMiningAnalysisResponse:
|
|
2236
|
+
"""
|
|
2237
|
+
@summary 轻应用-标签挖掘
|
|
2238
|
+
|
|
2239
|
+
@param request: RunTagMiningAnalysisRequest
|
|
2240
|
+
@return: RunTagMiningAnalysisResponse
|
|
2241
|
+
"""
|
|
2242
|
+
runtime = util_models.RuntimeOptions()
|
|
2243
|
+
headers = {}
|
|
2244
|
+
return await self.run_tag_mining_analysis_with_options_async(workspace_id, request, headers, runtime)
|
|
2245
|
+
|
|
2246
|
+
def run_video_analysis_with_options(
|
|
2247
|
+
self,
|
|
2248
|
+
workspace_id: str,
|
|
2249
|
+
tmp_req: quan_miao_light_app_20240801_models.RunVideoAnalysisRequest,
|
|
2250
|
+
headers: Dict[str, str],
|
|
2251
|
+
runtime: util_models.RuntimeOptions,
|
|
2252
|
+
) -> quan_miao_light_app_20240801_models.RunVideoAnalysisResponse:
|
|
2253
|
+
"""
|
|
2254
|
+
@summary 轻应用-视频理解
|
|
2255
|
+
|
|
2256
|
+
@param tmp_req: RunVideoAnalysisRequest
|
|
2257
|
+
@param headers: map
|
|
2258
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2259
|
+
@return: RunVideoAnalysisResponse
|
|
2260
|
+
"""
|
|
2261
|
+
UtilClient.validate_model(tmp_req)
|
|
2262
|
+
request = quan_miao_light_app_20240801_models.RunVideoAnalysisShrinkRequest()
|
|
2263
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2264
|
+
if not UtilClient.is_unset(tmp_req.frame_sample_method):
|
|
2265
|
+
request.frame_sample_method_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.frame_sample_method, 'frameSampleMethod', 'json')
|
|
2266
|
+
if not UtilClient.is_unset(tmp_req.generate_options):
|
|
2267
|
+
request.generate_options_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.generate_options, 'generateOptions', 'json')
|
|
2268
|
+
if not UtilClient.is_unset(tmp_req.video_roles):
|
|
2269
|
+
request.video_roles_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.video_roles, 'videoRoles', 'json')
|
|
2270
|
+
body = {}
|
|
2271
|
+
if not UtilClient.is_unset(request.frame_sample_method_shrink):
|
|
2272
|
+
body['frameSampleMethod'] = request.frame_sample_method_shrink
|
|
2273
|
+
if not UtilClient.is_unset(request.generate_options_shrink):
|
|
2274
|
+
body['generateOptions'] = request.generate_options_shrink
|
|
2275
|
+
if not UtilClient.is_unset(request.language):
|
|
2276
|
+
body['language'] = request.language
|
|
2277
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template):
|
|
2278
|
+
body['modelCustomPromptTemplate'] = request.model_custom_prompt_template
|
|
2279
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template_id):
|
|
2280
|
+
body['modelCustomPromptTemplateId'] = request.model_custom_prompt_template_id
|
|
2281
|
+
if not UtilClient.is_unset(request.model_id):
|
|
2282
|
+
body['modelId'] = request.model_id
|
|
2283
|
+
if not UtilClient.is_unset(request.original_session_id):
|
|
2284
|
+
body['originalSessionId'] = request.original_session_id
|
|
2285
|
+
if not UtilClient.is_unset(request.snapshot_interval):
|
|
2286
|
+
body['snapshotInterval'] = request.snapshot_interval
|
|
2287
|
+
if not UtilClient.is_unset(request.task_id):
|
|
2288
|
+
body['taskId'] = request.task_id
|
|
2289
|
+
if not UtilClient.is_unset(request.video_extra_info):
|
|
2290
|
+
body['videoExtraInfo'] = request.video_extra_info
|
|
2291
|
+
if not UtilClient.is_unset(request.video_model_custom_prompt_template):
|
|
2292
|
+
body['videoModelCustomPromptTemplate'] = request.video_model_custom_prompt_template
|
|
2293
|
+
if not UtilClient.is_unset(request.video_model_id):
|
|
2294
|
+
body['videoModelId'] = request.video_model_id
|
|
2295
|
+
if not UtilClient.is_unset(request.video_roles_shrink):
|
|
2296
|
+
body['videoRoles'] = request.video_roles_shrink
|
|
2297
|
+
if not UtilClient.is_unset(request.video_url):
|
|
2298
|
+
body['videoUrl'] = request.video_url
|
|
2299
|
+
req = open_api_models.OpenApiRequest(
|
|
2300
|
+
headers=headers,
|
|
2301
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2302
|
+
)
|
|
2303
|
+
params = open_api_models.Params(
|
|
2304
|
+
action='RunVideoAnalysis',
|
|
2305
|
+
version='2024-08-01',
|
|
2306
|
+
protocol='HTTPS',
|
|
2307
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runVideoAnalysis',
|
|
2308
|
+
method='POST',
|
|
2309
|
+
auth_type='AK',
|
|
2310
|
+
style='ROA',
|
|
2311
|
+
req_body_type='formData',
|
|
2312
|
+
body_type='json'
|
|
2313
|
+
)
|
|
2314
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2315
|
+
return TeaCore.from_map(
|
|
2316
|
+
quan_miao_light_app_20240801_models.RunVideoAnalysisResponse(),
|
|
2317
|
+
self.call_api(params, req, runtime)
|
|
2318
|
+
)
|
|
2319
|
+
else:
|
|
2320
|
+
return TeaCore.from_map(
|
|
2321
|
+
quan_miao_light_app_20240801_models.RunVideoAnalysisResponse(),
|
|
2322
|
+
self.execute(params, req, runtime)
|
|
2323
|
+
)
|
|
2324
|
+
|
|
2325
|
+
async def run_video_analysis_with_options_async(
|
|
2326
|
+
self,
|
|
2327
|
+
workspace_id: str,
|
|
2328
|
+
tmp_req: quan_miao_light_app_20240801_models.RunVideoAnalysisRequest,
|
|
2329
|
+
headers: Dict[str, str],
|
|
2330
|
+
runtime: util_models.RuntimeOptions,
|
|
2331
|
+
) -> quan_miao_light_app_20240801_models.RunVideoAnalysisResponse:
|
|
2332
|
+
"""
|
|
2333
|
+
@summary 轻应用-视频理解
|
|
2334
|
+
|
|
2335
|
+
@param tmp_req: RunVideoAnalysisRequest
|
|
2336
|
+
@param headers: map
|
|
2337
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2338
|
+
@return: RunVideoAnalysisResponse
|
|
2339
|
+
"""
|
|
2340
|
+
UtilClient.validate_model(tmp_req)
|
|
2341
|
+
request = quan_miao_light_app_20240801_models.RunVideoAnalysisShrinkRequest()
|
|
2342
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2343
|
+
if not UtilClient.is_unset(tmp_req.frame_sample_method):
|
|
2344
|
+
request.frame_sample_method_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.frame_sample_method, 'frameSampleMethod', 'json')
|
|
2345
|
+
if not UtilClient.is_unset(tmp_req.generate_options):
|
|
2346
|
+
request.generate_options_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.generate_options, 'generateOptions', 'json')
|
|
2347
|
+
if not UtilClient.is_unset(tmp_req.video_roles):
|
|
2348
|
+
request.video_roles_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.video_roles, 'videoRoles', 'json')
|
|
2349
|
+
body = {}
|
|
2350
|
+
if not UtilClient.is_unset(request.frame_sample_method_shrink):
|
|
2351
|
+
body['frameSampleMethod'] = request.frame_sample_method_shrink
|
|
2352
|
+
if not UtilClient.is_unset(request.generate_options_shrink):
|
|
2353
|
+
body['generateOptions'] = request.generate_options_shrink
|
|
2354
|
+
if not UtilClient.is_unset(request.language):
|
|
2355
|
+
body['language'] = request.language
|
|
2356
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template):
|
|
2357
|
+
body['modelCustomPromptTemplate'] = request.model_custom_prompt_template
|
|
2358
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template_id):
|
|
2359
|
+
body['modelCustomPromptTemplateId'] = request.model_custom_prompt_template_id
|
|
2360
|
+
if not UtilClient.is_unset(request.model_id):
|
|
2361
|
+
body['modelId'] = request.model_id
|
|
2362
|
+
if not UtilClient.is_unset(request.original_session_id):
|
|
2363
|
+
body['originalSessionId'] = request.original_session_id
|
|
2364
|
+
if not UtilClient.is_unset(request.snapshot_interval):
|
|
2365
|
+
body['snapshotInterval'] = request.snapshot_interval
|
|
2366
|
+
if not UtilClient.is_unset(request.task_id):
|
|
2367
|
+
body['taskId'] = request.task_id
|
|
2368
|
+
if not UtilClient.is_unset(request.video_extra_info):
|
|
2369
|
+
body['videoExtraInfo'] = request.video_extra_info
|
|
2370
|
+
if not UtilClient.is_unset(request.video_model_custom_prompt_template):
|
|
2371
|
+
body['videoModelCustomPromptTemplate'] = request.video_model_custom_prompt_template
|
|
2372
|
+
if not UtilClient.is_unset(request.video_model_id):
|
|
2373
|
+
body['videoModelId'] = request.video_model_id
|
|
2374
|
+
if not UtilClient.is_unset(request.video_roles_shrink):
|
|
2375
|
+
body['videoRoles'] = request.video_roles_shrink
|
|
2376
|
+
if not UtilClient.is_unset(request.video_url):
|
|
2377
|
+
body['videoUrl'] = request.video_url
|
|
2378
|
+
req = open_api_models.OpenApiRequest(
|
|
2379
|
+
headers=headers,
|
|
2380
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2381
|
+
)
|
|
2382
|
+
params = open_api_models.Params(
|
|
2383
|
+
action='RunVideoAnalysis',
|
|
2384
|
+
version='2024-08-01',
|
|
2385
|
+
protocol='HTTPS',
|
|
2386
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/runVideoAnalysis',
|
|
2387
|
+
method='POST',
|
|
2388
|
+
auth_type='AK',
|
|
2389
|
+
style='ROA',
|
|
2390
|
+
req_body_type='formData',
|
|
2391
|
+
body_type='json'
|
|
2392
|
+
)
|
|
2393
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2394
|
+
return TeaCore.from_map(
|
|
2395
|
+
quan_miao_light_app_20240801_models.RunVideoAnalysisResponse(),
|
|
2396
|
+
await self.call_api_async(params, req, runtime)
|
|
2397
|
+
)
|
|
2398
|
+
else:
|
|
2399
|
+
return TeaCore.from_map(
|
|
2400
|
+
quan_miao_light_app_20240801_models.RunVideoAnalysisResponse(),
|
|
2401
|
+
await self.execute_async(params, req, runtime)
|
|
2402
|
+
)
|
|
2403
|
+
|
|
2404
|
+
def run_video_analysis(
|
|
2405
|
+
self,
|
|
2406
|
+
workspace_id: str,
|
|
2407
|
+
request: quan_miao_light_app_20240801_models.RunVideoAnalysisRequest,
|
|
2408
|
+
) -> quan_miao_light_app_20240801_models.RunVideoAnalysisResponse:
|
|
2409
|
+
"""
|
|
2410
|
+
@summary 轻应用-视频理解
|
|
2411
|
+
|
|
2412
|
+
@param request: RunVideoAnalysisRequest
|
|
2413
|
+
@return: RunVideoAnalysisResponse
|
|
2414
|
+
"""
|
|
2415
|
+
runtime = util_models.RuntimeOptions()
|
|
2416
|
+
headers = {}
|
|
2417
|
+
return self.run_video_analysis_with_options(workspace_id, request, headers, runtime)
|
|
2418
|
+
|
|
2419
|
+
async def run_video_analysis_async(
|
|
2420
|
+
self,
|
|
2421
|
+
workspace_id: str,
|
|
2422
|
+
request: quan_miao_light_app_20240801_models.RunVideoAnalysisRequest,
|
|
2423
|
+
) -> quan_miao_light_app_20240801_models.RunVideoAnalysisResponse:
|
|
2424
|
+
"""
|
|
2425
|
+
@summary 轻应用-视频理解
|
|
2426
|
+
|
|
2427
|
+
@param request: RunVideoAnalysisRequest
|
|
2428
|
+
@return: RunVideoAnalysisResponse
|
|
2429
|
+
"""
|
|
2430
|
+
runtime = util_models.RuntimeOptions()
|
|
2431
|
+
headers = {}
|
|
2432
|
+
return await self.run_video_analysis_with_options_async(workspace_id, request, headers, runtime)
|
|
2433
|
+
|
|
2434
|
+
def submit_video_analysis_task_with_options(
|
|
2435
|
+
self,
|
|
2436
|
+
workspace_id: str,
|
|
2437
|
+
tmp_req: quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskRequest,
|
|
2438
|
+
headers: Dict[str, str],
|
|
2439
|
+
runtime: util_models.RuntimeOptions,
|
|
2440
|
+
) -> quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse:
|
|
2441
|
+
"""
|
|
2442
|
+
@summary 轻应用-提交视频理解任务
|
|
2443
|
+
|
|
2444
|
+
@param tmp_req: SubmitVideoAnalysisTaskRequest
|
|
2445
|
+
@param headers: map
|
|
2446
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2447
|
+
@return: SubmitVideoAnalysisTaskResponse
|
|
2448
|
+
"""
|
|
2449
|
+
UtilClient.validate_model(tmp_req)
|
|
2450
|
+
request = quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskShrinkRequest()
|
|
2451
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2452
|
+
if not UtilClient.is_unset(tmp_req.frame_sample_method):
|
|
2453
|
+
request.frame_sample_method_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.frame_sample_method, 'frameSampleMethod', 'json')
|
|
2454
|
+
if not UtilClient.is_unset(tmp_req.generate_options):
|
|
2455
|
+
request.generate_options_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.generate_options, 'generateOptions', 'json')
|
|
2456
|
+
if not UtilClient.is_unset(tmp_req.video_roles):
|
|
2457
|
+
request.video_roles_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.video_roles, 'videoRoles', 'json')
|
|
2458
|
+
body = {}
|
|
2459
|
+
if not UtilClient.is_unset(request.frame_sample_method_shrink):
|
|
2460
|
+
body['frameSampleMethod'] = request.frame_sample_method_shrink
|
|
2461
|
+
if not UtilClient.is_unset(request.generate_options_shrink):
|
|
2462
|
+
body['generateOptions'] = request.generate_options_shrink
|
|
2463
|
+
if not UtilClient.is_unset(request.language):
|
|
2464
|
+
body['language'] = request.language
|
|
2465
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template):
|
|
2466
|
+
body['modelCustomPromptTemplate'] = request.model_custom_prompt_template
|
|
2467
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template_id):
|
|
2468
|
+
body['modelCustomPromptTemplateId'] = request.model_custom_prompt_template_id
|
|
2469
|
+
if not UtilClient.is_unset(request.model_id):
|
|
2470
|
+
body['modelId'] = request.model_id
|
|
2471
|
+
if not UtilClient.is_unset(request.snapshot_interval):
|
|
2472
|
+
body['snapshotInterval'] = request.snapshot_interval
|
|
2473
|
+
if not UtilClient.is_unset(request.video_extra_info):
|
|
2474
|
+
body['videoExtraInfo'] = request.video_extra_info
|
|
2475
|
+
if not UtilClient.is_unset(request.video_model_custom_prompt_template):
|
|
2476
|
+
body['videoModelCustomPromptTemplate'] = request.video_model_custom_prompt_template
|
|
2477
|
+
if not UtilClient.is_unset(request.video_model_id):
|
|
2478
|
+
body['videoModelId'] = request.video_model_id
|
|
2479
|
+
if not UtilClient.is_unset(request.video_roles_shrink):
|
|
2480
|
+
body['videoRoles'] = request.video_roles_shrink
|
|
2481
|
+
if not UtilClient.is_unset(request.video_url):
|
|
2482
|
+
body['videoUrl'] = request.video_url
|
|
2483
|
+
req = open_api_models.OpenApiRequest(
|
|
2484
|
+
headers=headers,
|
|
2485
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2486
|
+
)
|
|
2487
|
+
params = open_api_models.Params(
|
|
2488
|
+
action='SubmitVideoAnalysisTask',
|
|
2489
|
+
version='2024-08-01',
|
|
2490
|
+
protocol='HTTPS',
|
|
2491
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/submitVideoAnalysisTask',
|
|
2492
|
+
method='POST',
|
|
2493
|
+
auth_type='AK',
|
|
2494
|
+
style='ROA',
|
|
2495
|
+
req_body_type='formData',
|
|
2496
|
+
body_type='json'
|
|
2497
|
+
)
|
|
2498
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2499
|
+
return TeaCore.from_map(
|
|
2500
|
+
quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse(),
|
|
2501
|
+
self.call_api(params, req, runtime)
|
|
2502
|
+
)
|
|
2503
|
+
else:
|
|
2504
|
+
return TeaCore.from_map(
|
|
2505
|
+
quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse(),
|
|
2506
|
+
self.execute(params, req, runtime)
|
|
2507
|
+
)
|
|
2508
|
+
|
|
2509
|
+
async def submit_video_analysis_task_with_options_async(
|
|
2510
|
+
self,
|
|
2511
|
+
workspace_id: str,
|
|
2512
|
+
tmp_req: quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskRequest,
|
|
2513
|
+
headers: Dict[str, str],
|
|
2514
|
+
runtime: util_models.RuntimeOptions,
|
|
2515
|
+
) -> quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse:
|
|
2516
|
+
"""
|
|
2517
|
+
@summary 轻应用-提交视频理解任务
|
|
2518
|
+
|
|
2519
|
+
@param tmp_req: SubmitVideoAnalysisTaskRequest
|
|
2520
|
+
@param headers: map
|
|
2521
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2522
|
+
@return: SubmitVideoAnalysisTaskResponse
|
|
2523
|
+
"""
|
|
2524
|
+
UtilClient.validate_model(tmp_req)
|
|
2525
|
+
request = quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskShrinkRequest()
|
|
2526
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
2527
|
+
if not UtilClient.is_unset(tmp_req.frame_sample_method):
|
|
2528
|
+
request.frame_sample_method_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.frame_sample_method, 'frameSampleMethod', 'json')
|
|
2529
|
+
if not UtilClient.is_unset(tmp_req.generate_options):
|
|
2530
|
+
request.generate_options_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.generate_options, 'generateOptions', 'json')
|
|
2531
|
+
if not UtilClient.is_unset(tmp_req.video_roles):
|
|
2532
|
+
request.video_roles_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.video_roles, 'videoRoles', 'json')
|
|
2533
|
+
body = {}
|
|
2534
|
+
if not UtilClient.is_unset(request.frame_sample_method_shrink):
|
|
2535
|
+
body['frameSampleMethod'] = request.frame_sample_method_shrink
|
|
2536
|
+
if not UtilClient.is_unset(request.generate_options_shrink):
|
|
2537
|
+
body['generateOptions'] = request.generate_options_shrink
|
|
2538
|
+
if not UtilClient.is_unset(request.language):
|
|
2539
|
+
body['language'] = request.language
|
|
2540
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template):
|
|
2541
|
+
body['modelCustomPromptTemplate'] = request.model_custom_prompt_template
|
|
2542
|
+
if not UtilClient.is_unset(request.model_custom_prompt_template_id):
|
|
2543
|
+
body['modelCustomPromptTemplateId'] = request.model_custom_prompt_template_id
|
|
2544
|
+
if not UtilClient.is_unset(request.model_id):
|
|
2545
|
+
body['modelId'] = request.model_id
|
|
2546
|
+
if not UtilClient.is_unset(request.snapshot_interval):
|
|
2547
|
+
body['snapshotInterval'] = request.snapshot_interval
|
|
2548
|
+
if not UtilClient.is_unset(request.video_extra_info):
|
|
2549
|
+
body['videoExtraInfo'] = request.video_extra_info
|
|
2550
|
+
if not UtilClient.is_unset(request.video_model_custom_prompt_template):
|
|
2551
|
+
body['videoModelCustomPromptTemplate'] = request.video_model_custom_prompt_template
|
|
2552
|
+
if not UtilClient.is_unset(request.video_model_id):
|
|
2553
|
+
body['videoModelId'] = request.video_model_id
|
|
2554
|
+
if not UtilClient.is_unset(request.video_roles_shrink):
|
|
2555
|
+
body['videoRoles'] = request.video_roles_shrink
|
|
2556
|
+
if not UtilClient.is_unset(request.video_url):
|
|
2557
|
+
body['videoUrl'] = request.video_url
|
|
2558
|
+
req = open_api_models.OpenApiRequest(
|
|
2559
|
+
headers=headers,
|
|
2560
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2561
|
+
)
|
|
2562
|
+
params = open_api_models.Params(
|
|
2563
|
+
action='SubmitVideoAnalysisTask',
|
|
2564
|
+
version='2024-08-01',
|
|
2565
|
+
protocol='HTTPS',
|
|
2566
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/submitVideoAnalysisTask',
|
|
2567
|
+
method='POST',
|
|
2568
|
+
auth_type='AK',
|
|
2569
|
+
style='ROA',
|
|
2570
|
+
req_body_type='formData',
|
|
2571
|
+
body_type='json'
|
|
2572
|
+
)
|
|
2573
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2574
|
+
return TeaCore.from_map(
|
|
2575
|
+
quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse(),
|
|
2576
|
+
await self.call_api_async(params, req, runtime)
|
|
2577
|
+
)
|
|
2578
|
+
else:
|
|
2579
|
+
return TeaCore.from_map(
|
|
2580
|
+
quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse(),
|
|
2581
|
+
await self.execute_async(params, req, runtime)
|
|
2582
|
+
)
|
|
2583
|
+
|
|
2584
|
+
def submit_video_analysis_task(
|
|
2585
|
+
self,
|
|
2586
|
+
workspace_id: str,
|
|
2587
|
+
request: quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskRequest,
|
|
2588
|
+
) -> quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse:
|
|
2589
|
+
"""
|
|
2590
|
+
@summary 轻应用-提交视频理解任务
|
|
2591
|
+
|
|
2592
|
+
@param request: SubmitVideoAnalysisTaskRequest
|
|
2593
|
+
@return: SubmitVideoAnalysisTaskResponse
|
|
2594
|
+
"""
|
|
2595
|
+
runtime = util_models.RuntimeOptions()
|
|
2596
|
+
headers = {}
|
|
2597
|
+
return self.submit_video_analysis_task_with_options(workspace_id, request, headers, runtime)
|
|
2598
|
+
|
|
2599
|
+
async def submit_video_analysis_task_async(
|
|
2600
|
+
self,
|
|
2601
|
+
workspace_id: str,
|
|
2602
|
+
request: quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskRequest,
|
|
2603
|
+
) -> quan_miao_light_app_20240801_models.SubmitVideoAnalysisTaskResponse:
|
|
2604
|
+
"""
|
|
2605
|
+
@summary 轻应用-提交视频理解任务
|
|
2606
|
+
|
|
2607
|
+
@param request: SubmitVideoAnalysisTaskRequest
|
|
2608
|
+
@return: SubmitVideoAnalysisTaskResponse
|
|
2609
|
+
"""
|
|
2610
|
+
runtime = util_models.RuntimeOptions()
|
|
2611
|
+
headers = {}
|
|
2612
|
+
return await self.submit_video_analysis_task_with_options_async(workspace_id, request, headers, runtime)
|
|
2613
|
+
|
|
2614
|
+
def update_video_analysis_config_with_options(
|
|
2615
|
+
self,
|
|
2616
|
+
workspace_id: str,
|
|
2617
|
+
request: quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigRequest,
|
|
2618
|
+
headers: Dict[str, str],
|
|
2619
|
+
runtime: util_models.RuntimeOptions,
|
|
2620
|
+
) -> quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse:
|
|
2621
|
+
"""
|
|
2622
|
+
@summary 视频理解-更新配置
|
|
2623
|
+
|
|
2624
|
+
@param request: UpdateVideoAnalysisConfigRequest
|
|
2625
|
+
@param headers: map
|
|
2626
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2627
|
+
@return: UpdateVideoAnalysisConfigResponse
|
|
2628
|
+
"""
|
|
2629
|
+
UtilClient.validate_model(request)
|
|
2630
|
+
body = {}
|
|
2631
|
+
if not UtilClient.is_unset(request.async_concurrency):
|
|
2632
|
+
body['asyncConcurrency'] = request.async_concurrency
|
|
2633
|
+
req = open_api_models.OpenApiRequest(
|
|
2634
|
+
headers=headers,
|
|
2635
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2636
|
+
)
|
|
2637
|
+
params = open_api_models.Params(
|
|
2638
|
+
action='UpdateVideoAnalysisConfig',
|
|
2639
|
+
version='2024-08-01',
|
|
2640
|
+
protocol='HTTPS',
|
|
2641
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/updateVideoAnalysisConfig',
|
|
2642
|
+
method='PUT',
|
|
2643
|
+
auth_type='AK',
|
|
2644
|
+
style='ROA',
|
|
2645
|
+
req_body_type='formData',
|
|
2646
|
+
body_type='json'
|
|
2647
|
+
)
|
|
2648
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2649
|
+
return TeaCore.from_map(
|
|
2650
|
+
quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse(),
|
|
2651
|
+
self.call_api(params, req, runtime)
|
|
2652
|
+
)
|
|
2653
|
+
else:
|
|
2654
|
+
return TeaCore.from_map(
|
|
2655
|
+
quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse(),
|
|
2656
|
+
self.execute(params, req, runtime)
|
|
2657
|
+
)
|
|
2658
|
+
|
|
2659
|
+
async def update_video_analysis_config_with_options_async(
|
|
2660
|
+
self,
|
|
2661
|
+
workspace_id: str,
|
|
2662
|
+
request: quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigRequest,
|
|
2663
|
+
headers: Dict[str, str],
|
|
2664
|
+
runtime: util_models.RuntimeOptions,
|
|
2665
|
+
) -> quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse:
|
|
2666
|
+
"""
|
|
2667
|
+
@summary 视频理解-更新配置
|
|
2668
|
+
|
|
2669
|
+
@param request: UpdateVideoAnalysisConfigRequest
|
|
2670
|
+
@param headers: map
|
|
2671
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
2672
|
+
@return: UpdateVideoAnalysisConfigResponse
|
|
2673
|
+
"""
|
|
2674
|
+
UtilClient.validate_model(request)
|
|
2675
|
+
body = {}
|
|
2676
|
+
if not UtilClient.is_unset(request.async_concurrency):
|
|
2677
|
+
body['asyncConcurrency'] = request.async_concurrency
|
|
2678
|
+
req = open_api_models.OpenApiRequest(
|
|
2679
|
+
headers=headers,
|
|
2680
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
2681
|
+
)
|
|
2682
|
+
params = open_api_models.Params(
|
|
2683
|
+
action='UpdateVideoAnalysisConfig',
|
|
2684
|
+
version='2024-08-01',
|
|
2685
|
+
protocol='HTTPS',
|
|
2686
|
+
pathname=f'/{OpenApiUtilClient.get_encode_param(workspace_id)}/quanmiao/lightapp/videoAnalysis/updateVideoAnalysisConfig',
|
|
2687
|
+
method='PUT',
|
|
2688
|
+
auth_type='AK',
|
|
2689
|
+
style='ROA',
|
|
2690
|
+
req_body_type='formData',
|
|
2691
|
+
body_type='json'
|
|
2692
|
+
)
|
|
2693
|
+
if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
|
|
2694
|
+
return TeaCore.from_map(
|
|
2695
|
+
quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse(),
|
|
2696
|
+
await self.call_api_async(params, req, runtime)
|
|
2697
|
+
)
|
|
2698
|
+
else:
|
|
2699
|
+
return TeaCore.from_map(
|
|
2700
|
+
quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse(),
|
|
2701
|
+
await self.execute_async(params, req, runtime)
|
|
2702
|
+
)
|
|
2703
|
+
|
|
2704
|
+
def update_video_analysis_config(
|
|
2705
|
+
self,
|
|
2706
|
+
workspace_id: str,
|
|
2707
|
+
request: quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigRequest,
|
|
2708
|
+
) -> quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse:
|
|
2709
|
+
"""
|
|
2710
|
+
@summary 视频理解-更新配置
|
|
2711
|
+
|
|
2712
|
+
@param request: UpdateVideoAnalysisConfigRequest
|
|
2713
|
+
@return: UpdateVideoAnalysisConfigResponse
|
|
2714
|
+
"""
|
|
2715
|
+
runtime = util_models.RuntimeOptions()
|
|
2716
|
+
headers = {}
|
|
2717
|
+
return self.update_video_analysis_config_with_options(workspace_id, request, headers, runtime)
|
|
2718
|
+
|
|
2719
|
+
async def update_video_analysis_config_async(
|
|
2720
|
+
self,
|
|
2721
|
+
workspace_id: str,
|
|
2722
|
+
request: quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigRequest,
|
|
2723
|
+
) -> quan_miao_light_app_20240801_models.UpdateVideoAnalysisConfigResponse:
|
|
2724
|
+
"""
|
|
2725
|
+
@summary 视频理解-更新配置
|
|
2726
|
+
|
|
2727
|
+
@param request: UpdateVideoAnalysisConfigRequest
|
|
2728
|
+
@return: UpdateVideoAnalysisConfigResponse
|
|
2729
|
+
"""
|
|
2730
|
+
runtime = util_models.RuntimeOptions()
|
|
2731
|
+
headers = {}
|
|
2732
|
+
return await self.update_video_analysis_config_with_options_async(workspace_id, request, headers, runtime)
|