alibabacloud-lingmou20250527 1.0.0__py3-none-any.whl → 1.2.0__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_lingmou20250527/__init__.py +1 -1
- alibabacloud_lingmou20250527/client.py +684 -0
- alibabacloud_lingmou20250527/models.py +1239 -138
- {alibabacloud_lingmou20250527-1.0.0.dist-info → alibabacloud_lingmou20250527-1.2.0.dist-info}/METADATA +2 -2
- alibabacloud_lingmou20250527-1.2.0.dist-info/RECORD +8 -0
- alibabacloud_lingmou20250527-1.0.0.dist-info/RECORD +0 -8
- {alibabacloud_lingmou20250527-1.0.0.dist-info → alibabacloud_lingmou20250527-1.2.0.dist-info}/LICENSE +0 -0
- {alibabacloud_lingmou20250527-1.0.0.dist-info → alibabacloud_lingmou20250527-1.2.0.dist-info}/WHEEL +0 -0
- {alibabacloud_lingmou20250527-1.0.0.dist-info → alibabacloud_lingmou20250527-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.
|
|
1
|
+
__version__ = '1.2.0'
|
|
@@ -41,6 +41,338 @@ class Client(OpenApiClient):
|
|
|
41
41
|
return endpoint_map.get(region_id)
|
|
42
42
|
return EndpointUtilClient.get_endpoint_rules(product_id, region_id, endpoint_rule, network, suffix)
|
|
43
43
|
|
|
44
|
+
def close_chat_instance_sessions_with_options(
|
|
45
|
+
self,
|
|
46
|
+
instance_id: str,
|
|
47
|
+
tmp_req: ling_mou_20250527_models.CloseChatInstanceSessionsRequest,
|
|
48
|
+
headers: Dict[str, str],
|
|
49
|
+
runtime: util_models.RuntimeOptions,
|
|
50
|
+
) -> ling_mou_20250527_models.CloseChatInstanceSessionsResponse:
|
|
51
|
+
"""
|
|
52
|
+
@summary 关闭会话实例session
|
|
53
|
+
|
|
54
|
+
@param tmp_req: CloseChatInstanceSessionsRequest
|
|
55
|
+
@param headers: map
|
|
56
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
57
|
+
@return: CloseChatInstanceSessionsResponse
|
|
58
|
+
"""
|
|
59
|
+
UtilClient.validate_model(tmp_req)
|
|
60
|
+
request = ling_mou_20250527_models.CloseChatInstanceSessionsShrinkRequest()
|
|
61
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
62
|
+
if not UtilClient.is_unset(tmp_req.session_ids):
|
|
63
|
+
request.session_ids_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.session_ids, 'sessionIds', 'json')
|
|
64
|
+
body = {}
|
|
65
|
+
if not UtilClient.is_unset(request.session_ids_shrink):
|
|
66
|
+
body['sessionIds'] = request.session_ids_shrink
|
|
67
|
+
req = open_api_models.OpenApiRequest(
|
|
68
|
+
headers=headers,
|
|
69
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
70
|
+
)
|
|
71
|
+
params = open_api_models.Params(
|
|
72
|
+
action='CloseChatInstanceSessions',
|
|
73
|
+
version='2025-05-27',
|
|
74
|
+
protocol='HTTPS',
|
|
75
|
+
pathname=f'/openapi/chat/instances/{OpenApiUtilClient.get_encode_param(instance_id)}/sessions/close',
|
|
76
|
+
method='PUT',
|
|
77
|
+
auth_type='AK',
|
|
78
|
+
style='ROA',
|
|
79
|
+
req_body_type='formData',
|
|
80
|
+
body_type='json'
|
|
81
|
+
)
|
|
82
|
+
return TeaCore.from_map(
|
|
83
|
+
ling_mou_20250527_models.CloseChatInstanceSessionsResponse(),
|
|
84
|
+
self.call_api(params, req, runtime)
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
async def close_chat_instance_sessions_with_options_async(
|
|
88
|
+
self,
|
|
89
|
+
instance_id: str,
|
|
90
|
+
tmp_req: ling_mou_20250527_models.CloseChatInstanceSessionsRequest,
|
|
91
|
+
headers: Dict[str, str],
|
|
92
|
+
runtime: util_models.RuntimeOptions,
|
|
93
|
+
) -> ling_mou_20250527_models.CloseChatInstanceSessionsResponse:
|
|
94
|
+
"""
|
|
95
|
+
@summary 关闭会话实例session
|
|
96
|
+
|
|
97
|
+
@param tmp_req: CloseChatInstanceSessionsRequest
|
|
98
|
+
@param headers: map
|
|
99
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
100
|
+
@return: CloseChatInstanceSessionsResponse
|
|
101
|
+
"""
|
|
102
|
+
UtilClient.validate_model(tmp_req)
|
|
103
|
+
request = ling_mou_20250527_models.CloseChatInstanceSessionsShrinkRequest()
|
|
104
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
105
|
+
if not UtilClient.is_unset(tmp_req.session_ids):
|
|
106
|
+
request.session_ids_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.session_ids, 'sessionIds', 'json')
|
|
107
|
+
body = {}
|
|
108
|
+
if not UtilClient.is_unset(request.session_ids_shrink):
|
|
109
|
+
body['sessionIds'] = request.session_ids_shrink
|
|
110
|
+
req = open_api_models.OpenApiRequest(
|
|
111
|
+
headers=headers,
|
|
112
|
+
body=OpenApiUtilClient.parse_to_map(body)
|
|
113
|
+
)
|
|
114
|
+
params = open_api_models.Params(
|
|
115
|
+
action='CloseChatInstanceSessions',
|
|
116
|
+
version='2025-05-27',
|
|
117
|
+
protocol='HTTPS',
|
|
118
|
+
pathname=f'/openapi/chat/instances/{OpenApiUtilClient.get_encode_param(instance_id)}/sessions/close',
|
|
119
|
+
method='PUT',
|
|
120
|
+
auth_type='AK',
|
|
121
|
+
style='ROA',
|
|
122
|
+
req_body_type='formData',
|
|
123
|
+
body_type='json'
|
|
124
|
+
)
|
|
125
|
+
return TeaCore.from_map(
|
|
126
|
+
ling_mou_20250527_models.CloseChatInstanceSessionsResponse(),
|
|
127
|
+
await self.call_api_async(params, req, runtime)
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def close_chat_instance_sessions(
|
|
131
|
+
self,
|
|
132
|
+
instance_id: str,
|
|
133
|
+
request: ling_mou_20250527_models.CloseChatInstanceSessionsRequest,
|
|
134
|
+
) -> ling_mou_20250527_models.CloseChatInstanceSessionsResponse:
|
|
135
|
+
"""
|
|
136
|
+
@summary 关闭会话实例session
|
|
137
|
+
|
|
138
|
+
@param request: CloseChatInstanceSessionsRequest
|
|
139
|
+
@return: CloseChatInstanceSessionsResponse
|
|
140
|
+
"""
|
|
141
|
+
runtime = util_models.RuntimeOptions()
|
|
142
|
+
headers = {}
|
|
143
|
+
return self.close_chat_instance_sessions_with_options(instance_id, request, headers, runtime)
|
|
144
|
+
|
|
145
|
+
async def close_chat_instance_sessions_async(
|
|
146
|
+
self,
|
|
147
|
+
instance_id: str,
|
|
148
|
+
request: ling_mou_20250527_models.CloseChatInstanceSessionsRequest,
|
|
149
|
+
) -> ling_mou_20250527_models.CloseChatInstanceSessionsResponse:
|
|
150
|
+
"""
|
|
151
|
+
@summary 关闭会话实例session
|
|
152
|
+
|
|
153
|
+
@param request: CloseChatInstanceSessionsRequest
|
|
154
|
+
@return: CloseChatInstanceSessionsResponse
|
|
155
|
+
"""
|
|
156
|
+
runtime = util_models.RuntimeOptions()
|
|
157
|
+
headers = {}
|
|
158
|
+
return await self.close_chat_instance_sessions_with_options_async(instance_id, request, headers, runtime)
|
|
159
|
+
|
|
160
|
+
def create_background_pic_with_options(
|
|
161
|
+
self,
|
|
162
|
+
request: ling_mou_20250527_models.CreateBackgroundPicRequest,
|
|
163
|
+
headers: Dict[str, str],
|
|
164
|
+
runtime: util_models.RuntimeOptions,
|
|
165
|
+
) -> ling_mou_20250527_models.CreateBackgroundPicResponse:
|
|
166
|
+
"""
|
|
167
|
+
@summary 创建背景素材
|
|
168
|
+
|
|
169
|
+
@param request: CreateBackgroundPicRequest
|
|
170
|
+
@param headers: map
|
|
171
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
172
|
+
@return: CreateBackgroundPicResponse
|
|
173
|
+
"""
|
|
174
|
+
UtilClient.validate_model(request)
|
|
175
|
+
query = {}
|
|
176
|
+
if not UtilClient.is_unset(request.filename):
|
|
177
|
+
query['filename'] = request.filename
|
|
178
|
+
if not UtilClient.is_unset(request.oss_key):
|
|
179
|
+
query['ossKey'] = request.oss_key
|
|
180
|
+
req = open_api_models.OpenApiRequest(
|
|
181
|
+
headers=headers,
|
|
182
|
+
query=OpenApiUtilClient.query(query)
|
|
183
|
+
)
|
|
184
|
+
params = open_api_models.Params(
|
|
185
|
+
action='CreateBackgroundPic',
|
|
186
|
+
version='2025-05-27',
|
|
187
|
+
protocol='HTTPS',
|
|
188
|
+
pathname=f'/openapi/chat/createBackgroundPic',
|
|
189
|
+
method='POST',
|
|
190
|
+
auth_type='AK',
|
|
191
|
+
style='ROA',
|
|
192
|
+
req_body_type='json',
|
|
193
|
+
body_type='json'
|
|
194
|
+
)
|
|
195
|
+
return TeaCore.from_map(
|
|
196
|
+
ling_mou_20250527_models.CreateBackgroundPicResponse(),
|
|
197
|
+
self.call_api(params, req, runtime)
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
async def create_background_pic_with_options_async(
|
|
201
|
+
self,
|
|
202
|
+
request: ling_mou_20250527_models.CreateBackgroundPicRequest,
|
|
203
|
+
headers: Dict[str, str],
|
|
204
|
+
runtime: util_models.RuntimeOptions,
|
|
205
|
+
) -> ling_mou_20250527_models.CreateBackgroundPicResponse:
|
|
206
|
+
"""
|
|
207
|
+
@summary 创建背景素材
|
|
208
|
+
|
|
209
|
+
@param request: CreateBackgroundPicRequest
|
|
210
|
+
@param headers: map
|
|
211
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
212
|
+
@return: CreateBackgroundPicResponse
|
|
213
|
+
"""
|
|
214
|
+
UtilClient.validate_model(request)
|
|
215
|
+
query = {}
|
|
216
|
+
if not UtilClient.is_unset(request.filename):
|
|
217
|
+
query['filename'] = request.filename
|
|
218
|
+
if not UtilClient.is_unset(request.oss_key):
|
|
219
|
+
query['ossKey'] = request.oss_key
|
|
220
|
+
req = open_api_models.OpenApiRequest(
|
|
221
|
+
headers=headers,
|
|
222
|
+
query=OpenApiUtilClient.query(query)
|
|
223
|
+
)
|
|
224
|
+
params = open_api_models.Params(
|
|
225
|
+
action='CreateBackgroundPic',
|
|
226
|
+
version='2025-05-27',
|
|
227
|
+
protocol='HTTPS',
|
|
228
|
+
pathname=f'/openapi/chat/createBackgroundPic',
|
|
229
|
+
method='POST',
|
|
230
|
+
auth_type='AK',
|
|
231
|
+
style='ROA',
|
|
232
|
+
req_body_type='json',
|
|
233
|
+
body_type='json'
|
|
234
|
+
)
|
|
235
|
+
return TeaCore.from_map(
|
|
236
|
+
ling_mou_20250527_models.CreateBackgroundPicResponse(),
|
|
237
|
+
await self.call_api_async(params, req, runtime)
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
def create_background_pic(
|
|
241
|
+
self,
|
|
242
|
+
request: ling_mou_20250527_models.CreateBackgroundPicRequest,
|
|
243
|
+
) -> ling_mou_20250527_models.CreateBackgroundPicResponse:
|
|
244
|
+
"""
|
|
245
|
+
@summary 创建背景素材
|
|
246
|
+
|
|
247
|
+
@param request: CreateBackgroundPicRequest
|
|
248
|
+
@return: CreateBackgroundPicResponse
|
|
249
|
+
"""
|
|
250
|
+
runtime = util_models.RuntimeOptions()
|
|
251
|
+
headers = {}
|
|
252
|
+
return self.create_background_pic_with_options(request, headers, runtime)
|
|
253
|
+
|
|
254
|
+
async def create_background_pic_async(
|
|
255
|
+
self,
|
|
256
|
+
request: ling_mou_20250527_models.CreateBackgroundPicRequest,
|
|
257
|
+
) -> ling_mou_20250527_models.CreateBackgroundPicResponse:
|
|
258
|
+
"""
|
|
259
|
+
@summary 创建背景素材
|
|
260
|
+
|
|
261
|
+
@param request: CreateBackgroundPicRequest
|
|
262
|
+
@return: CreateBackgroundPicResponse
|
|
263
|
+
"""
|
|
264
|
+
runtime = util_models.RuntimeOptions()
|
|
265
|
+
headers = {}
|
|
266
|
+
return await self.create_background_pic_with_options_async(request, headers, runtime)
|
|
267
|
+
|
|
268
|
+
def create_chat_config_with_options(
|
|
269
|
+
self,
|
|
270
|
+
request: ling_mou_20250527_models.CreateChatConfigRequest,
|
|
271
|
+
headers: Dict[str, str],
|
|
272
|
+
runtime: util_models.RuntimeOptions,
|
|
273
|
+
) -> ling_mou_20250527_models.CreateChatConfigResponse:
|
|
274
|
+
"""
|
|
275
|
+
@summary 背景配置
|
|
276
|
+
|
|
277
|
+
@param request: CreateChatConfigRequest
|
|
278
|
+
@param headers: map
|
|
279
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
280
|
+
@return: CreateChatConfigResponse
|
|
281
|
+
"""
|
|
282
|
+
UtilClient.validate_model(request)
|
|
283
|
+
query = {}
|
|
284
|
+
if not UtilClient.is_unset(request.avatar_id):
|
|
285
|
+
query['avatarId'] = request.avatar_id
|
|
286
|
+
if not UtilClient.is_unset(request.background_id):
|
|
287
|
+
query['backgroundId'] = request.background_id
|
|
288
|
+
req = open_api_models.OpenApiRequest(
|
|
289
|
+
headers=headers,
|
|
290
|
+
query=OpenApiUtilClient.query(query)
|
|
291
|
+
)
|
|
292
|
+
params = open_api_models.Params(
|
|
293
|
+
action='CreateChatConfig',
|
|
294
|
+
version='2025-05-27',
|
|
295
|
+
protocol='HTTPS',
|
|
296
|
+
pathname=f'/openapi/chat/createChatConfig',
|
|
297
|
+
method='POST',
|
|
298
|
+
auth_type='AK',
|
|
299
|
+
style='ROA',
|
|
300
|
+
req_body_type='json',
|
|
301
|
+
body_type='json'
|
|
302
|
+
)
|
|
303
|
+
return TeaCore.from_map(
|
|
304
|
+
ling_mou_20250527_models.CreateChatConfigResponse(),
|
|
305
|
+
self.call_api(params, req, runtime)
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
async def create_chat_config_with_options_async(
|
|
309
|
+
self,
|
|
310
|
+
request: ling_mou_20250527_models.CreateChatConfigRequest,
|
|
311
|
+
headers: Dict[str, str],
|
|
312
|
+
runtime: util_models.RuntimeOptions,
|
|
313
|
+
) -> ling_mou_20250527_models.CreateChatConfigResponse:
|
|
314
|
+
"""
|
|
315
|
+
@summary 背景配置
|
|
316
|
+
|
|
317
|
+
@param request: CreateChatConfigRequest
|
|
318
|
+
@param headers: map
|
|
319
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
320
|
+
@return: CreateChatConfigResponse
|
|
321
|
+
"""
|
|
322
|
+
UtilClient.validate_model(request)
|
|
323
|
+
query = {}
|
|
324
|
+
if not UtilClient.is_unset(request.avatar_id):
|
|
325
|
+
query['avatarId'] = request.avatar_id
|
|
326
|
+
if not UtilClient.is_unset(request.background_id):
|
|
327
|
+
query['backgroundId'] = request.background_id
|
|
328
|
+
req = open_api_models.OpenApiRequest(
|
|
329
|
+
headers=headers,
|
|
330
|
+
query=OpenApiUtilClient.query(query)
|
|
331
|
+
)
|
|
332
|
+
params = open_api_models.Params(
|
|
333
|
+
action='CreateChatConfig',
|
|
334
|
+
version='2025-05-27',
|
|
335
|
+
protocol='HTTPS',
|
|
336
|
+
pathname=f'/openapi/chat/createChatConfig',
|
|
337
|
+
method='POST',
|
|
338
|
+
auth_type='AK',
|
|
339
|
+
style='ROA',
|
|
340
|
+
req_body_type='json',
|
|
341
|
+
body_type='json'
|
|
342
|
+
)
|
|
343
|
+
return TeaCore.from_map(
|
|
344
|
+
ling_mou_20250527_models.CreateChatConfigResponse(),
|
|
345
|
+
await self.call_api_async(params, req, runtime)
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
def create_chat_config(
|
|
349
|
+
self,
|
|
350
|
+
request: ling_mou_20250527_models.CreateChatConfigRequest,
|
|
351
|
+
) -> ling_mou_20250527_models.CreateChatConfigResponse:
|
|
352
|
+
"""
|
|
353
|
+
@summary 背景配置
|
|
354
|
+
|
|
355
|
+
@param request: CreateChatConfigRequest
|
|
356
|
+
@return: CreateChatConfigResponse
|
|
357
|
+
"""
|
|
358
|
+
runtime = util_models.RuntimeOptions()
|
|
359
|
+
headers = {}
|
|
360
|
+
return self.create_chat_config_with_options(request, headers, runtime)
|
|
361
|
+
|
|
362
|
+
async def create_chat_config_async(
|
|
363
|
+
self,
|
|
364
|
+
request: ling_mou_20250527_models.CreateChatConfigRequest,
|
|
365
|
+
) -> ling_mou_20250527_models.CreateChatConfigResponse:
|
|
366
|
+
"""
|
|
367
|
+
@summary 背景配置
|
|
368
|
+
|
|
369
|
+
@param request: CreateChatConfigRequest
|
|
370
|
+
@return: CreateChatConfigResponse
|
|
371
|
+
"""
|
|
372
|
+
runtime = util_models.RuntimeOptions()
|
|
373
|
+
headers = {}
|
|
374
|
+
return await self.create_chat_config_with_options_async(request, headers, runtime)
|
|
375
|
+
|
|
44
376
|
def create_chat_session_with_options(
|
|
45
377
|
self,
|
|
46
378
|
id: str,
|
|
@@ -156,3 +488,355 @@ class Client(OpenApiClient):
|
|
|
156
488
|
runtime = util_models.RuntimeOptions()
|
|
157
489
|
headers = {}
|
|
158
490
|
return await self.create_chat_session_with_options_async(id, request, headers, runtime)
|
|
491
|
+
|
|
492
|
+
def create_no_train_pic_avatar_with_options(
|
|
493
|
+
self,
|
|
494
|
+
request: ling_mou_20250527_models.CreateNoTrainPicAvatarRequest,
|
|
495
|
+
headers: Dict[str, str],
|
|
496
|
+
runtime: util_models.RuntimeOptions,
|
|
497
|
+
) -> ling_mou_20250527_models.CreateNoTrainPicAvatarResponse:
|
|
498
|
+
"""
|
|
499
|
+
@summary 创建对话免训照片数字人
|
|
500
|
+
|
|
501
|
+
@param request: CreateNoTrainPicAvatarRequest
|
|
502
|
+
@param headers: map
|
|
503
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
504
|
+
@return: CreateNoTrainPicAvatarResponse
|
|
505
|
+
"""
|
|
506
|
+
UtilClient.validate_model(request)
|
|
507
|
+
query = {}
|
|
508
|
+
if not UtilClient.is_unset(request.expressiveness):
|
|
509
|
+
query['expressiveness'] = request.expressiveness
|
|
510
|
+
if not UtilClient.is_unset(request.gender):
|
|
511
|
+
query['gender'] = request.gender
|
|
512
|
+
if not UtilClient.is_unset(request.generate_assets):
|
|
513
|
+
query['generateAssets'] = request.generate_assets
|
|
514
|
+
if not UtilClient.is_unset(request.image_oss_path):
|
|
515
|
+
query['imageOssPath'] = request.image_oss_path
|
|
516
|
+
if not UtilClient.is_unset(request.jwt_token):
|
|
517
|
+
query['jwtToken'] = request.jwt_token
|
|
518
|
+
if not UtilClient.is_unset(request.name):
|
|
519
|
+
query['name'] = request.name
|
|
520
|
+
if not UtilClient.is_unset(request.transparent):
|
|
521
|
+
query['transparent'] = request.transparent
|
|
522
|
+
req = open_api_models.OpenApiRequest(
|
|
523
|
+
headers=headers,
|
|
524
|
+
query=OpenApiUtilClient.query(query)
|
|
525
|
+
)
|
|
526
|
+
params = open_api_models.Params(
|
|
527
|
+
action='CreateNoTrainPicAvatar',
|
|
528
|
+
version='2025-05-27',
|
|
529
|
+
protocol='HTTPS',
|
|
530
|
+
pathname=f'/openapi/chat/createNoTrainPicAvatar',
|
|
531
|
+
method='POST',
|
|
532
|
+
auth_type='AK',
|
|
533
|
+
style='ROA',
|
|
534
|
+
req_body_type='json',
|
|
535
|
+
body_type='json'
|
|
536
|
+
)
|
|
537
|
+
return TeaCore.from_map(
|
|
538
|
+
ling_mou_20250527_models.CreateNoTrainPicAvatarResponse(),
|
|
539
|
+
self.call_api(params, req, runtime)
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
async def create_no_train_pic_avatar_with_options_async(
|
|
543
|
+
self,
|
|
544
|
+
request: ling_mou_20250527_models.CreateNoTrainPicAvatarRequest,
|
|
545
|
+
headers: Dict[str, str],
|
|
546
|
+
runtime: util_models.RuntimeOptions,
|
|
547
|
+
) -> ling_mou_20250527_models.CreateNoTrainPicAvatarResponse:
|
|
548
|
+
"""
|
|
549
|
+
@summary 创建对话免训照片数字人
|
|
550
|
+
|
|
551
|
+
@param request: CreateNoTrainPicAvatarRequest
|
|
552
|
+
@param headers: map
|
|
553
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
554
|
+
@return: CreateNoTrainPicAvatarResponse
|
|
555
|
+
"""
|
|
556
|
+
UtilClient.validate_model(request)
|
|
557
|
+
query = {}
|
|
558
|
+
if not UtilClient.is_unset(request.expressiveness):
|
|
559
|
+
query['expressiveness'] = request.expressiveness
|
|
560
|
+
if not UtilClient.is_unset(request.gender):
|
|
561
|
+
query['gender'] = request.gender
|
|
562
|
+
if not UtilClient.is_unset(request.generate_assets):
|
|
563
|
+
query['generateAssets'] = request.generate_assets
|
|
564
|
+
if not UtilClient.is_unset(request.image_oss_path):
|
|
565
|
+
query['imageOssPath'] = request.image_oss_path
|
|
566
|
+
if not UtilClient.is_unset(request.jwt_token):
|
|
567
|
+
query['jwtToken'] = request.jwt_token
|
|
568
|
+
if not UtilClient.is_unset(request.name):
|
|
569
|
+
query['name'] = request.name
|
|
570
|
+
if not UtilClient.is_unset(request.transparent):
|
|
571
|
+
query['transparent'] = request.transparent
|
|
572
|
+
req = open_api_models.OpenApiRequest(
|
|
573
|
+
headers=headers,
|
|
574
|
+
query=OpenApiUtilClient.query(query)
|
|
575
|
+
)
|
|
576
|
+
params = open_api_models.Params(
|
|
577
|
+
action='CreateNoTrainPicAvatar',
|
|
578
|
+
version='2025-05-27',
|
|
579
|
+
protocol='HTTPS',
|
|
580
|
+
pathname=f'/openapi/chat/createNoTrainPicAvatar',
|
|
581
|
+
method='POST',
|
|
582
|
+
auth_type='AK',
|
|
583
|
+
style='ROA',
|
|
584
|
+
req_body_type='json',
|
|
585
|
+
body_type='json'
|
|
586
|
+
)
|
|
587
|
+
return TeaCore.from_map(
|
|
588
|
+
ling_mou_20250527_models.CreateNoTrainPicAvatarResponse(),
|
|
589
|
+
await self.call_api_async(params, req, runtime)
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
def create_no_train_pic_avatar(
|
|
593
|
+
self,
|
|
594
|
+
request: ling_mou_20250527_models.CreateNoTrainPicAvatarRequest,
|
|
595
|
+
) -> ling_mou_20250527_models.CreateNoTrainPicAvatarResponse:
|
|
596
|
+
"""
|
|
597
|
+
@summary 创建对话免训照片数字人
|
|
598
|
+
|
|
599
|
+
@param request: CreateNoTrainPicAvatarRequest
|
|
600
|
+
@return: CreateNoTrainPicAvatarResponse
|
|
601
|
+
"""
|
|
602
|
+
runtime = util_models.RuntimeOptions()
|
|
603
|
+
headers = {}
|
|
604
|
+
return self.create_no_train_pic_avatar_with_options(request, headers, runtime)
|
|
605
|
+
|
|
606
|
+
async def create_no_train_pic_avatar_async(
|
|
607
|
+
self,
|
|
608
|
+
request: ling_mou_20250527_models.CreateNoTrainPicAvatarRequest,
|
|
609
|
+
) -> ling_mou_20250527_models.CreateNoTrainPicAvatarResponse:
|
|
610
|
+
"""
|
|
611
|
+
@summary 创建对话免训照片数字人
|
|
612
|
+
|
|
613
|
+
@param request: CreateNoTrainPicAvatarRequest
|
|
614
|
+
@return: CreateNoTrainPicAvatarResponse
|
|
615
|
+
"""
|
|
616
|
+
runtime = util_models.RuntimeOptions()
|
|
617
|
+
headers = {}
|
|
618
|
+
return await self.create_no_train_pic_avatar_with_options_async(request, headers, runtime)
|
|
619
|
+
|
|
620
|
+
def get_upload_policy_with_options(
|
|
621
|
+
self,
|
|
622
|
+
request: ling_mou_20250527_models.GetUploadPolicyRequest,
|
|
623
|
+
headers: Dict[str, str],
|
|
624
|
+
runtime: util_models.RuntimeOptions,
|
|
625
|
+
) -> ling_mou_20250527_models.GetUploadPolicyResponse:
|
|
626
|
+
"""
|
|
627
|
+
@summary 获取对话免训图片素材上传凭证
|
|
628
|
+
|
|
629
|
+
@param request: GetUploadPolicyRequest
|
|
630
|
+
@param headers: map
|
|
631
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
632
|
+
@return: GetUploadPolicyResponse
|
|
633
|
+
"""
|
|
634
|
+
UtilClient.validate_model(request)
|
|
635
|
+
query = {}
|
|
636
|
+
if not UtilClient.is_unset(request.jwt_token):
|
|
637
|
+
query['jwtToken'] = request.jwt_token
|
|
638
|
+
if not UtilClient.is_unset(request.type):
|
|
639
|
+
query['type'] = request.type
|
|
640
|
+
req = open_api_models.OpenApiRequest(
|
|
641
|
+
headers=headers,
|
|
642
|
+
query=OpenApiUtilClient.query(query)
|
|
643
|
+
)
|
|
644
|
+
params = open_api_models.Params(
|
|
645
|
+
action='GetUploadPolicy',
|
|
646
|
+
version='2025-05-27',
|
|
647
|
+
protocol='HTTPS',
|
|
648
|
+
pathname=f'/openapi/chat/getUploadPolicy',
|
|
649
|
+
method='GET',
|
|
650
|
+
auth_type='AK',
|
|
651
|
+
style='ROA',
|
|
652
|
+
req_body_type='json',
|
|
653
|
+
body_type='json'
|
|
654
|
+
)
|
|
655
|
+
return TeaCore.from_map(
|
|
656
|
+
ling_mou_20250527_models.GetUploadPolicyResponse(),
|
|
657
|
+
self.call_api(params, req, runtime)
|
|
658
|
+
)
|
|
659
|
+
|
|
660
|
+
async def get_upload_policy_with_options_async(
|
|
661
|
+
self,
|
|
662
|
+
request: ling_mou_20250527_models.GetUploadPolicyRequest,
|
|
663
|
+
headers: Dict[str, str],
|
|
664
|
+
runtime: util_models.RuntimeOptions,
|
|
665
|
+
) -> ling_mou_20250527_models.GetUploadPolicyResponse:
|
|
666
|
+
"""
|
|
667
|
+
@summary 获取对话免训图片素材上传凭证
|
|
668
|
+
|
|
669
|
+
@param request: GetUploadPolicyRequest
|
|
670
|
+
@param headers: map
|
|
671
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
672
|
+
@return: GetUploadPolicyResponse
|
|
673
|
+
"""
|
|
674
|
+
UtilClient.validate_model(request)
|
|
675
|
+
query = {}
|
|
676
|
+
if not UtilClient.is_unset(request.jwt_token):
|
|
677
|
+
query['jwtToken'] = request.jwt_token
|
|
678
|
+
if not UtilClient.is_unset(request.type):
|
|
679
|
+
query['type'] = request.type
|
|
680
|
+
req = open_api_models.OpenApiRequest(
|
|
681
|
+
headers=headers,
|
|
682
|
+
query=OpenApiUtilClient.query(query)
|
|
683
|
+
)
|
|
684
|
+
params = open_api_models.Params(
|
|
685
|
+
action='GetUploadPolicy',
|
|
686
|
+
version='2025-05-27',
|
|
687
|
+
protocol='HTTPS',
|
|
688
|
+
pathname=f'/openapi/chat/getUploadPolicy',
|
|
689
|
+
method='GET',
|
|
690
|
+
auth_type='AK',
|
|
691
|
+
style='ROA',
|
|
692
|
+
req_body_type='json',
|
|
693
|
+
body_type='json'
|
|
694
|
+
)
|
|
695
|
+
return TeaCore.from_map(
|
|
696
|
+
ling_mou_20250527_models.GetUploadPolicyResponse(),
|
|
697
|
+
await self.call_api_async(params, req, runtime)
|
|
698
|
+
)
|
|
699
|
+
|
|
700
|
+
def get_upload_policy(
|
|
701
|
+
self,
|
|
702
|
+
request: ling_mou_20250527_models.GetUploadPolicyRequest,
|
|
703
|
+
) -> ling_mou_20250527_models.GetUploadPolicyResponse:
|
|
704
|
+
"""
|
|
705
|
+
@summary 获取对话免训图片素材上传凭证
|
|
706
|
+
|
|
707
|
+
@param request: GetUploadPolicyRequest
|
|
708
|
+
@return: GetUploadPolicyResponse
|
|
709
|
+
"""
|
|
710
|
+
runtime = util_models.RuntimeOptions()
|
|
711
|
+
headers = {}
|
|
712
|
+
return self.get_upload_policy_with_options(request, headers, runtime)
|
|
713
|
+
|
|
714
|
+
async def get_upload_policy_async(
|
|
715
|
+
self,
|
|
716
|
+
request: ling_mou_20250527_models.GetUploadPolicyRequest,
|
|
717
|
+
) -> ling_mou_20250527_models.GetUploadPolicyResponse:
|
|
718
|
+
"""
|
|
719
|
+
@summary 获取对话免训图片素材上传凭证
|
|
720
|
+
|
|
721
|
+
@param request: GetUploadPolicyRequest
|
|
722
|
+
@return: GetUploadPolicyResponse
|
|
723
|
+
"""
|
|
724
|
+
runtime = util_models.RuntimeOptions()
|
|
725
|
+
headers = {}
|
|
726
|
+
return await self.get_upload_policy_with_options_async(request, headers, runtime)
|
|
727
|
+
|
|
728
|
+
def query_chat_instance_sessions_with_options(
|
|
729
|
+
self,
|
|
730
|
+
instance_id: str,
|
|
731
|
+
tmp_req: ling_mou_20250527_models.QueryChatInstanceSessionsRequest,
|
|
732
|
+
headers: Dict[str, str],
|
|
733
|
+
runtime: util_models.RuntimeOptions,
|
|
734
|
+
) -> ling_mou_20250527_models.QueryChatInstanceSessionsResponse:
|
|
735
|
+
"""
|
|
736
|
+
@summary 查询会话实例session
|
|
737
|
+
|
|
738
|
+
@param tmp_req: QueryChatInstanceSessionsRequest
|
|
739
|
+
@param headers: map
|
|
740
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
741
|
+
@return: QueryChatInstanceSessionsResponse
|
|
742
|
+
"""
|
|
743
|
+
UtilClient.validate_model(tmp_req)
|
|
744
|
+
request = ling_mou_20250527_models.QueryChatInstanceSessionsShrinkRequest()
|
|
745
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
746
|
+
if not UtilClient.is_unset(tmp_req.session_ids):
|
|
747
|
+
request.session_ids_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.session_ids, 'sessionIds', 'json')
|
|
748
|
+
query = {}
|
|
749
|
+
if not UtilClient.is_unset(request.session_ids_shrink):
|
|
750
|
+
query['sessionIds'] = request.session_ids_shrink
|
|
751
|
+
req = open_api_models.OpenApiRequest(
|
|
752
|
+
headers=headers,
|
|
753
|
+
query=OpenApiUtilClient.query(query)
|
|
754
|
+
)
|
|
755
|
+
params = open_api_models.Params(
|
|
756
|
+
action='QueryChatInstanceSessions',
|
|
757
|
+
version='2025-05-27',
|
|
758
|
+
protocol='HTTPS',
|
|
759
|
+
pathname=f'/openapi/chat/instances/{OpenApiUtilClient.get_encode_param(instance_id)}/sessions',
|
|
760
|
+
method='GET',
|
|
761
|
+
auth_type='AK',
|
|
762
|
+
style='ROA',
|
|
763
|
+
req_body_type='json',
|
|
764
|
+
body_type='json'
|
|
765
|
+
)
|
|
766
|
+
return TeaCore.from_map(
|
|
767
|
+
ling_mou_20250527_models.QueryChatInstanceSessionsResponse(),
|
|
768
|
+
self.call_api(params, req, runtime)
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
async def query_chat_instance_sessions_with_options_async(
|
|
772
|
+
self,
|
|
773
|
+
instance_id: str,
|
|
774
|
+
tmp_req: ling_mou_20250527_models.QueryChatInstanceSessionsRequest,
|
|
775
|
+
headers: Dict[str, str],
|
|
776
|
+
runtime: util_models.RuntimeOptions,
|
|
777
|
+
) -> ling_mou_20250527_models.QueryChatInstanceSessionsResponse:
|
|
778
|
+
"""
|
|
779
|
+
@summary 查询会话实例session
|
|
780
|
+
|
|
781
|
+
@param tmp_req: QueryChatInstanceSessionsRequest
|
|
782
|
+
@param headers: map
|
|
783
|
+
@param runtime: runtime options for this request RuntimeOptions
|
|
784
|
+
@return: QueryChatInstanceSessionsResponse
|
|
785
|
+
"""
|
|
786
|
+
UtilClient.validate_model(tmp_req)
|
|
787
|
+
request = ling_mou_20250527_models.QueryChatInstanceSessionsShrinkRequest()
|
|
788
|
+
OpenApiUtilClient.convert(tmp_req, request)
|
|
789
|
+
if not UtilClient.is_unset(tmp_req.session_ids):
|
|
790
|
+
request.session_ids_shrink = OpenApiUtilClient.array_to_string_with_specified_style(tmp_req.session_ids, 'sessionIds', 'json')
|
|
791
|
+
query = {}
|
|
792
|
+
if not UtilClient.is_unset(request.session_ids_shrink):
|
|
793
|
+
query['sessionIds'] = request.session_ids_shrink
|
|
794
|
+
req = open_api_models.OpenApiRequest(
|
|
795
|
+
headers=headers,
|
|
796
|
+
query=OpenApiUtilClient.query(query)
|
|
797
|
+
)
|
|
798
|
+
params = open_api_models.Params(
|
|
799
|
+
action='QueryChatInstanceSessions',
|
|
800
|
+
version='2025-05-27',
|
|
801
|
+
protocol='HTTPS',
|
|
802
|
+
pathname=f'/openapi/chat/instances/{OpenApiUtilClient.get_encode_param(instance_id)}/sessions',
|
|
803
|
+
method='GET',
|
|
804
|
+
auth_type='AK',
|
|
805
|
+
style='ROA',
|
|
806
|
+
req_body_type='json',
|
|
807
|
+
body_type='json'
|
|
808
|
+
)
|
|
809
|
+
return TeaCore.from_map(
|
|
810
|
+
ling_mou_20250527_models.QueryChatInstanceSessionsResponse(),
|
|
811
|
+
await self.call_api_async(params, req, runtime)
|
|
812
|
+
)
|
|
813
|
+
|
|
814
|
+
def query_chat_instance_sessions(
|
|
815
|
+
self,
|
|
816
|
+
instance_id: str,
|
|
817
|
+
request: ling_mou_20250527_models.QueryChatInstanceSessionsRequest,
|
|
818
|
+
) -> ling_mou_20250527_models.QueryChatInstanceSessionsResponse:
|
|
819
|
+
"""
|
|
820
|
+
@summary 查询会话实例session
|
|
821
|
+
|
|
822
|
+
@param request: QueryChatInstanceSessionsRequest
|
|
823
|
+
@return: QueryChatInstanceSessionsResponse
|
|
824
|
+
"""
|
|
825
|
+
runtime = util_models.RuntimeOptions()
|
|
826
|
+
headers = {}
|
|
827
|
+
return self.query_chat_instance_sessions_with_options(instance_id, request, headers, runtime)
|
|
828
|
+
|
|
829
|
+
async def query_chat_instance_sessions_async(
|
|
830
|
+
self,
|
|
831
|
+
instance_id: str,
|
|
832
|
+
request: ling_mou_20250527_models.QueryChatInstanceSessionsRequest,
|
|
833
|
+
) -> ling_mou_20250527_models.QueryChatInstanceSessionsResponse:
|
|
834
|
+
"""
|
|
835
|
+
@summary 查询会话实例session
|
|
836
|
+
|
|
837
|
+
@param request: QueryChatInstanceSessionsRequest
|
|
838
|
+
@return: QueryChatInstanceSessionsResponse
|
|
839
|
+
"""
|
|
840
|
+
runtime = util_models.RuntimeOptions()
|
|
841
|
+
headers = {}
|
|
842
|
+
return await self.query_chat_instance_sessions_with_options_async(instance_id, request, headers, runtime)
|