antchain-antdigital-creativerender 2.0.3__tar.gz
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.
- antchain_antdigital_creativerender-2.0.3/PKG-INFO +23 -0
- antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/PKG-INFO +23 -0
- antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/SOURCES.txt +9 -0
- antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/dependency_links.txt +1 -0
- antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/requires.txt +3 -0
- antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/top_level.txt +1 -0
- antchain_antdigital_creativerender-2.0.3/antchain_sdk_creativerender/__init__.py +1 -0
- antchain_antdigital_creativerender-2.0.3/antchain_sdk_creativerender/client.py +444 -0
- antchain_antdigital_creativerender-2.0.3/antchain_sdk_creativerender/models.py +980 -0
- antchain_antdigital_creativerender-2.0.3/setup.cfg +4 -0
- antchain_antdigital_creativerender-2.0.3/setup.py +78 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: antchain_antdigital_creativerender
|
|
3
|
+
Version: 2.0.3
|
|
4
|
+
Summary: Ant Chain CREATIVERENDER SDK Library for Python
|
|
5
|
+
Home-page: https://github.com/alipay/antchain-openapi-prod-sdk
|
|
6
|
+
Author: Ant Chain SDK
|
|
7
|
+
Author-email: sdk-team@alibabacloud.com
|
|
8
|
+
License: Apache License 2.0
|
|
9
|
+
Description: UNKNOWN
|
|
10
|
+
Keywords: antchain,creativerender
|
|
11
|
+
Platform: any
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Requires-Python: >=3.6
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: antchain-antdigital-creativerender
|
|
3
|
+
Version: 2.0.3
|
|
4
|
+
Summary: Ant Chain CREATIVERENDER SDK Library for Python
|
|
5
|
+
Home-page: https://github.com/alipay/antchain-openapi-prod-sdk
|
|
6
|
+
Author: Ant Chain SDK
|
|
7
|
+
Author-email: sdk-team@alibabacloud.com
|
|
8
|
+
License: Apache License 2.0
|
|
9
|
+
Description: UNKNOWN
|
|
10
|
+
Keywords: antchain,creativerender
|
|
11
|
+
Platform: any
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Requires-Python: >=3.6
|
|
23
|
+
Description-Content-Type: text/markdown
|
antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/SOURCES.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
setup.py
|
|
2
|
+
antchain_antdigital_creativerender.egg-info/PKG-INFO
|
|
3
|
+
antchain_antdigital_creativerender.egg-info/SOURCES.txt
|
|
4
|
+
antchain_antdigital_creativerender.egg-info/dependency_links.txt
|
|
5
|
+
antchain_antdigital_creativerender.egg-info/requires.txt
|
|
6
|
+
antchain_antdigital_creativerender.egg-info/top_level.txt
|
|
7
|
+
antchain_sdk_creativerender/__init__.py
|
|
8
|
+
antchain_sdk_creativerender/client.py
|
|
9
|
+
antchain_sdk_creativerender/models.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
antchain_antdigital_creativerender-2.0.3/antchain_antdigital_creativerender.egg-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
antchain_sdk_creativerender
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.3"
|
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# This file is auto-generated, don't edit it. Thanks.
|
|
3
|
+
import time
|
|
4
|
+
|
|
5
|
+
from Tea.exceptions import TeaException, UnretryableException
|
|
6
|
+
from Tea.request import TeaRequest
|
|
7
|
+
from Tea.core import TeaCore
|
|
8
|
+
from antchain_alipay_util.antchain_utils import AntchainUtils
|
|
9
|
+
from typing import Dict
|
|
10
|
+
|
|
11
|
+
from antchain_sdk_creativerender import models as creativerender_models
|
|
12
|
+
from alibabacloud_tea_util.client import Client as UtilClient
|
|
13
|
+
from alibabacloud_tea_util import models as util_models
|
|
14
|
+
from alibabacloud_rpc_util.client import Client as RPCUtilClient
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Client:
|
|
18
|
+
_endpoint: str = None
|
|
19
|
+
_region_id: str = None
|
|
20
|
+
_access_key_id: str = None
|
|
21
|
+
_access_key_secret: str = None
|
|
22
|
+
_protocol: str = None
|
|
23
|
+
_user_agent: str = None
|
|
24
|
+
_read_timeout: int = None
|
|
25
|
+
_connect_timeout: int = None
|
|
26
|
+
_http_proxy: str = None
|
|
27
|
+
_https_proxy: str = None
|
|
28
|
+
_socks_5proxy: str = None
|
|
29
|
+
_socks_5net_work: str = None
|
|
30
|
+
_no_proxy: str = None
|
|
31
|
+
_max_idle_conns: int = None
|
|
32
|
+
_security_token: str = None
|
|
33
|
+
_max_idle_time_millis: int = None
|
|
34
|
+
_keep_alive_duration_millis: int = None
|
|
35
|
+
_max_requests: int = None
|
|
36
|
+
_max_requests_per_host: int = None
|
|
37
|
+
|
|
38
|
+
def __init__(
|
|
39
|
+
self,
|
|
40
|
+
config: creativerender_models.Config,
|
|
41
|
+
):
|
|
42
|
+
"""
|
|
43
|
+
Init client with Config
|
|
44
|
+
@param config: config contains the necessary information to create a client
|
|
45
|
+
"""
|
|
46
|
+
if UtilClient.is_unset(config):
|
|
47
|
+
raise TeaException({
|
|
48
|
+
'code': 'ParameterMissing',
|
|
49
|
+
'message': "'config' can not be unset"
|
|
50
|
+
})
|
|
51
|
+
self._access_key_id = config.access_key_id
|
|
52
|
+
self._access_key_secret = config.access_key_secret
|
|
53
|
+
self._security_token = config.security_token
|
|
54
|
+
self._endpoint = config.endpoint
|
|
55
|
+
self._protocol = config.protocol
|
|
56
|
+
self._user_agent = config.user_agent
|
|
57
|
+
self._read_timeout = UtilClient.default_number(config.read_timeout, 20000)
|
|
58
|
+
self._connect_timeout = UtilClient.default_number(config.connect_timeout, 20000)
|
|
59
|
+
self._http_proxy = config.http_proxy
|
|
60
|
+
self._https_proxy = config.https_proxy
|
|
61
|
+
self._no_proxy = config.no_proxy
|
|
62
|
+
self._socks_5proxy = config.socks_5proxy
|
|
63
|
+
self._socks_5net_work = config.socks_5net_work
|
|
64
|
+
self._max_idle_conns = UtilClient.default_number(config.max_idle_conns, 60000)
|
|
65
|
+
self._max_idle_time_millis = UtilClient.default_number(config.max_idle_time_millis, 5)
|
|
66
|
+
self._keep_alive_duration_millis = UtilClient.default_number(config.keep_alive_duration_millis, 5000)
|
|
67
|
+
self._max_requests = UtilClient.default_number(config.max_requests, 100)
|
|
68
|
+
self._max_requests_per_host = UtilClient.default_number(config.max_requests_per_host, 100)
|
|
69
|
+
|
|
70
|
+
def do_request(
|
|
71
|
+
self,
|
|
72
|
+
version: str,
|
|
73
|
+
action: str,
|
|
74
|
+
protocol: str,
|
|
75
|
+
method: str,
|
|
76
|
+
pathname: str,
|
|
77
|
+
request: dict,
|
|
78
|
+
headers: Dict[str, str],
|
|
79
|
+
runtime: util_models.RuntimeOptions,
|
|
80
|
+
) -> dict:
|
|
81
|
+
"""
|
|
82
|
+
Encapsulate the request and invoke the network
|
|
83
|
+
@param action: api name
|
|
84
|
+
@param protocol: http or https
|
|
85
|
+
@param method: e.g. GET
|
|
86
|
+
@param pathname: pathname of every api
|
|
87
|
+
@param request: which contains request params
|
|
88
|
+
@param runtime: which controls some details of call api, such as retry times
|
|
89
|
+
@return: the response
|
|
90
|
+
"""
|
|
91
|
+
runtime.validate()
|
|
92
|
+
_runtime = {
|
|
93
|
+
'timeouted': 'retry',
|
|
94
|
+
'readTimeout': UtilClient.default_number(runtime.read_timeout, self._read_timeout),
|
|
95
|
+
'connectTimeout': UtilClient.default_number(runtime.connect_timeout, self._connect_timeout),
|
|
96
|
+
'httpProxy': UtilClient.default_string(runtime.http_proxy, self._http_proxy),
|
|
97
|
+
'httpsProxy': UtilClient.default_string(runtime.https_proxy, self._https_proxy),
|
|
98
|
+
'noProxy': UtilClient.default_string(runtime.no_proxy, self._no_proxy),
|
|
99
|
+
'maxIdleConns': UtilClient.default_number(runtime.max_idle_conns, self._max_idle_conns),
|
|
100
|
+
'maxIdleTimeMillis': self._max_idle_time_millis,
|
|
101
|
+
'keepAliveDuration': self._keep_alive_duration_millis,
|
|
102
|
+
'maxRequests': self._max_requests,
|
|
103
|
+
'maxRequestsPerHost': self._max_requests_per_host,
|
|
104
|
+
'retry': {
|
|
105
|
+
'retryable': runtime.autoretry,
|
|
106
|
+
'maxAttempts': UtilClient.default_number(runtime.max_attempts, 3)
|
|
107
|
+
},
|
|
108
|
+
'backoff': {
|
|
109
|
+
'policy': UtilClient.default_string(runtime.backoff_policy, 'no'),
|
|
110
|
+
'period': UtilClient.default_number(runtime.backoff_period, 1)
|
|
111
|
+
},
|
|
112
|
+
'ignoreSSL': runtime.ignore_ssl,
|
|
113
|
+
# DataPart represents a structured blob.
|
|
114
|
+
}
|
|
115
|
+
_last_request = None
|
|
116
|
+
_last_exception = None
|
|
117
|
+
_now = time.time()
|
|
118
|
+
_retry_times = 0
|
|
119
|
+
while TeaCore.allow_retry(_runtime.get('retry'), _retry_times, _now):
|
|
120
|
+
if _retry_times > 0:
|
|
121
|
+
_backoff_time = TeaCore.get_backoff_time(_runtime.get('backoff'), _retry_times)
|
|
122
|
+
if _backoff_time > 0:
|
|
123
|
+
TeaCore.sleep(_backoff_time)
|
|
124
|
+
_retry_times = _retry_times + 1
|
|
125
|
+
try:
|
|
126
|
+
_request = TeaRequest()
|
|
127
|
+
_request.protocol = UtilClient.default_string(self._protocol, protocol)
|
|
128
|
+
_request.method = method
|
|
129
|
+
_request.pathname = pathname
|
|
130
|
+
_request.query = {
|
|
131
|
+
'method': action,
|
|
132
|
+
'version': version,
|
|
133
|
+
'sign_type': 'HmacSHA1',
|
|
134
|
+
'req_time': AntchainUtils.get_timestamp(),
|
|
135
|
+
'req_msg_id': AntchainUtils.get_nonce(),
|
|
136
|
+
'access_key': self._access_key_id,
|
|
137
|
+
'base_sdk_version': 'TeaSDK-2.0',
|
|
138
|
+
'sdk_version': '2.0.3',
|
|
139
|
+
'_prod_code': 'CREATIVERENDER',
|
|
140
|
+
'_prod_channel': 'default'
|
|
141
|
+
}
|
|
142
|
+
if not UtilClient.empty(self._security_token):
|
|
143
|
+
_request.query['security_token'] = self._security_token
|
|
144
|
+
_request.headers = TeaCore.merge({
|
|
145
|
+
'host': UtilClient.default_string(self._endpoint, 'openapi.antchain.antgroup.com'),
|
|
146
|
+
'user-agent': UtilClient.get_user_agent(self._user_agent)
|
|
147
|
+
}, headers)
|
|
148
|
+
tmp = UtilClient.anyify_map_value(RPCUtilClient.query(request))
|
|
149
|
+
_request.body = UtilClient.to_form_string(tmp)
|
|
150
|
+
_request.headers['content-type'] = 'application/x-www-form-urlencoded'
|
|
151
|
+
signed_param = TeaCore.merge(_request.query,
|
|
152
|
+
RPCUtilClient.query(request))
|
|
153
|
+
_request.query['sign'] = AntchainUtils.get_signature(signed_param, self._access_key_secret)
|
|
154
|
+
_last_request = _request
|
|
155
|
+
_response = TeaCore.do_action(_request, _runtime)
|
|
156
|
+
raw = UtilClient.read_as_string(_response.body)
|
|
157
|
+
obj = UtilClient.parse_json(raw)
|
|
158
|
+
res = UtilClient.assert_as_map(obj)
|
|
159
|
+
resp = UtilClient.assert_as_map(res.get('response'))
|
|
160
|
+
if AntchainUtils.has_error(raw, self._access_key_secret):
|
|
161
|
+
raise TeaException({
|
|
162
|
+
'message': resp.get('result_msg'),
|
|
163
|
+
'data': resp,
|
|
164
|
+
'code': resp.get('result_code')
|
|
165
|
+
})
|
|
166
|
+
return resp
|
|
167
|
+
except Exception as e:
|
|
168
|
+
if TeaCore.is_retryable(e):
|
|
169
|
+
_last_exception = e
|
|
170
|
+
continue
|
|
171
|
+
raise e
|
|
172
|
+
raise UnretryableException(_last_request, _last_exception)
|
|
173
|
+
|
|
174
|
+
async def do_request_async(
|
|
175
|
+
self,
|
|
176
|
+
version: str,
|
|
177
|
+
action: str,
|
|
178
|
+
protocol: str,
|
|
179
|
+
method: str,
|
|
180
|
+
pathname: str,
|
|
181
|
+
request: dict,
|
|
182
|
+
headers: Dict[str, str],
|
|
183
|
+
runtime: util_models.RuntimeOptions,
|
|
184
|
+
) -> dict:
|
|
185
|
+
"""
|
|
186
|
+
Encapsulate the request and invoke the network
|
|
187
|
+
@param action: api name
|
|
188
|
+
@param protocol: http or https
|
|
189
|
+
@param method: e.g. GET
|
|
190
|
+
@param pathname: pathname of every api
|
|
191
|
+
@param request: which contains request params
|
|
192
|
+
@param runtime: which controls some details of call api, such as retry times
|
|
193
|
+
@return: the response
|
|
194
|
+
"""
|
|
195
|
+
runtime.validate()
|
|
196
|
+
_runtime = {
|
|
197
|
+
'timeouted': 'retry',
|
|
198
|
+
'readTimeout': UtilClient.default_number(runtime.read_timeout, self._read_timeout),
|
|
199
|
+
'connectTimeout': UtilClient.default_number(runtime.connect_timeout, self._connect_timeout),
|
|
200
|
+
'httpProxy': UtilClient.default_string(runtime.http_proxy, self._http_proxy),
|
|
201
|
+
'httpsProxy': UtilClient.default_string(runtime.https_proxy, self._https_proxy),
|
|
202
|
+
'noProxy': UtilClient.default_string(runtime.no_proxy, self._no_proxy),
|
|
203
|
+
'maxIdleConns': UtilClient.default_number(runtime.max_idle_conns, self._max_idle_conns),
|
|
204
|
+
'maxIdleTimeMillis': self._max_idle_time_millis,
|
|
205
|
+
'keepAliveDuration': self._keep_alive_duration_millis,
|
|
206
|
+
'maxRequests': self._max_requests,
|
|
207
|
+
'maxRequestsPerHost': self._max_requests_per_host,
|
|
208
|
+
'retry': {
|
|
209
|
+
'retryable': runtime.autoretry,
|
|
210
|
+
'maxAttempts': UtilClient.default_number(runtime.max_attempts, 3)
|
|
211
|
+
},
|
|
212
|
+
'backoff': {
|
|
213
|
+
'policy': UtilClient.default_string(runtime.backoff_policy, 'no'),
|
|
214
|
+
'period': UtilClient.default_number(runtime.backoff_period, 1)
|
|
215
|
+
},
|
|
216
|
+
'ignoreSSL': runtime.ignore_ssl,
|
|
217
|
+
# DataPart represents a structured blob.
|
|
218
|
+
}
|
|
219
|
+
_last_request = None
|
|
220
|
+
_last_exception = None
|
|
221
|
+
_now = time.time()
|
|
222
|
+
_retry_times = 0
|
|
223
|
+
while TeaCore.allow_retry(_runtime.get('retry'), _retry_times, _now):
|
|
224
|
+
if _retry_times > 0:
|
|
225
|
+
_backoff_time = TeaCore.get_backoff_time(_runtime.get('backoff'), _retry_times)
|
|
226
|
+
if _backoff_time > 0:
|
|
227
|
+
TeaCore.sleep(_backoff_time)
|
|
228
|
+
_retry_times = _retry_times + 1
|
|
229
|
+
try:
|
|
230
|
+
_request = TeaRequest()
|
|
231
|
+
_request.protocol = UtilClient.default_string(self._protocol, protocol)
|
|
232
|
+
_request.method = method
|
|
233
|
+
_request.pathname = pathname
|
|
234
|
+
_request.query = {
|
|
235
|
+
'method': action,
|
|
236
|
+
'version': version,
|
|
237
|
+
'sign_type': 'HmacSHA1',
|
|
238
|
+
'req_time': AntchainUtils.get_timestamp(),
|
|
239
|
+
'req_msg_id': AntchainUtils.get_nonce(),
|
|
240
|
+
'access_key': self._access_key_id,
|
|
241
|
+
'base_sdk_version': 'TeaSDK-2.0',
|
|
242
|
+
'sdk_version': '2.0.3',
|
|
243
|
+
'_prod_code': 'CREATIVERENDER',
|
|
244
|
+
'_prod_channel': 'default'
|
|
245
|
+
}
|
|
246
|
+
if not UtilClient.empty(self._security_token):
|
|
247
|
+
_request.query['security_token'] = self._security_token
|
|
248
|
+
_request.headers = TeaCore.merge({
|
|
249
|
+
'host': UtilClient.default_string(self._endpoint, 'openapi.antchain.antgroup.com'),
|
|
250
|
+
'user-agent': UtilClient.get_user_agent(self._user_agent)
|
|
251
|
+
}, headers)
|
|
252
|
+
tmp = UtilClient.anyify_map_value(RPCUtilClient.query(request))
|
|
253
|
+
_request.body = UtilClient.to_form_string(tmp)
|
|
254
|
+
_request.headers['content-type'] = 'application/x-www-form-urlencoded'
|
|
255
|
+
signed_param = TeaCore.merge(_request.query,
|
|
256
|
+
RPCUtilClient.query(request))
|
|
257
|
+
_request.query['sign'] = AntchainUtils.get_signature(signed_param, self._access_key_secret)
|
|
258
|
+
_last_request = _request
|
|
259
|
+
_response = await TeaCore.async_do_action(_request, _runtime)
|
|
260
|
+
raw = await UtilClient.read_as_string_async(_response.body)
|
|
261
|
+
obj = UtilClient.parse_json(raw)
|
|
262
|
+
res = UtilClient.assert_as_map(obj)
|
|
263
|
+
resp = UtilClient.assert_as_map(res.get('response'))
|
|
264
|
+
if AntchainUtils.has_error(raw, self._access_key_secret):
|
|
265
|
+
raise TeaException({
|
|
266
|
+
'message': resp.get('result_msg'),
|
|
267
|
+
'data': resp,
|
|
268
|
+
'code': resp.get('result_code')
|
|
269
|
+
})
|
|
270
|
+
return resp
|
|
271
|
+
except Exception as e:
|
|
272
|
+
if TeaCore.is_retryable(e):
|
|
273
|
+
_last_exception = e
|
|
274
|
+
continue
|
|
275
|
+
raise e
|
|
276
|
+
raise UnretryableException(_last_request, _last_exception)
|
|
277
|
+
|
|
278
|
+
def exec_antcloud_marketingagent_chat_creative(
|
|
279
|
+
self,
|
|
280
|
+
request: creativerender_models.ExecAntcloudMarketingagentChatCreativeRequest,
|
|
281
|
+
) -> creativerender_models.ExecAntcloudMarketingagentChatCreativeResponse:
|
|
282
|
+
"""
|
|
283
|
+
Description: 创意素材中心chat生图接口
|
|
284
|
+
Summary: 创意素材中心chat生图接口
|
|
285
|
+
"""
|
|
286
|
+
runtime = util_models.RuntimeOptions()
|
|
287
|
+
headers = {}
|
|
288
|
+
return self.exec_antcloud_marketingagent_chat_creative_ex(request, headers, runtime)
|
|
289
|
+
|
|
290
|
+
async def exec_antcloud_marketingagent_chat_creative_async(
|
|
291
|
+
self,
|
|
292
|
+
request: creativerender_models.ExecAntcloudMarketingagentChatCreativeRequest,
|
|
293
|
+
) -> creativerender_models.ExecAntcloudMarketingagentChatCreativeResponse:
|
|
294
|
+
"""
|
|
295
|
+
Description: 创意素材中心chat生图接口
|
|
296
|
+
Summary: 创意素材中心chat生图接口
|
|
297
|
+
"""
|
|
298
|
+
runtime = util_models.RuntimeOptions()
|
|
299
|
+
headers = {}
|
|
300
|
+
return await self.exec_antcloud_marketingagent_chat_creative_ex_async(request, headers, runtime)
|
|
301
|
+
|
|
302
|
+
def exec_antcloud_marketingagent_chat_creative_ex(
|
|
303
|
+
self,
|
|
304
|
+
request: creativerender_models.ExecAntcloudMarketingagentChatCreativeRequest,
|
|
305
|
+
headers: Dict[str, str],
|
|
306
|
+
runtime: util_models.RuntimeOptions,
|
|
307
|
+
) -> creativerender_models.ExecAntcloudMarketingagentChatCreativeResponse:
|
|
308
|
+
"""
|
|
309
|
+
Description: 创意素材中心chat生图接口
|
|
310
|
+
Summary: 创意素材中心chat生图接口
|
|
311
|
+
"""
|
|
312
|
+
UtilClient.validate_model(request)
|
|
313
|
+
return TeaCore.from_map(
|
|
314
|
+
creativerender_models.ExecAntcloudMarketingagentChatCreativeResponse(),
|
|
315
|
+
self.do_request('1.0', 'antcloud.marketingagent.chat.creative.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
async def exec_antcloud_marketingagent_chat_creative_ex_async(
|
|
319
|
+
self,
|
|
320
|
+
request: creativerender_models.ExecAntcloudMarketingagentChatCreativeRequest,
|
|
321
|
+
headers: Dict[str, str],
|
|
322
|
+
runtime: util_models.RuntimeOptions,
|
|
323
|
+
) -> creativerender_models.ExecAntcloudMarketingagentChatCreativeResponse:
|
|
324
|
+
"""
|
|
325
|
+
Description: 创意素材中心chat生图接口
|
|
326
|
+
Summary: 创意素材中心chat生图接口
|
|
327
|
+
"""
|
|
328
|
+
UtilClient.validate_model(request)
|
|
329
|
+
return TeaCore.from_map(
|
|
330
|
+
creativerender_models.ExecAntcloudMarketingagentChatCreativeResponse(),
|
|
331
|
+
await self.do_request_async('1.0', 'antcloud.marketingagent.chat.creative.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
def exec_antcloud_marketingagent_creative_chat(
|
|
335
|
+
self,
|
|
336
|
+
request: creativerender_models.ExecAntcloudMarketingagentCreativeChatRequest,
|
|
337
|
+
) -> creativerender_models.ExecAntcloudMarketingagentCreativeChatResponse:
|
|
338
|
+
"""
|
|
339
|
+
Description: 创意素材chat接口
|
|
340
|
+
Summary: 创意素材chat接口
|
|
341
|
+
"""
|
|
342
|
+
runtime = util_models.RuntimeOptions()
|
|
343
|
+
headers = {}
|
|
344
|
+
return self.exec_antcloud_marketingagent_creative_chat_ex(request, headers, runtime)
|
|
345
|
+
|
|
346
|
+
async def exec_antcloud_marketingagent_creative_chat_async(
|
|
347
|
+
self,
|
|
348
|
+
request: creativerender_models.ExecAntcloudMarketingagentCreativeChatRequest,
|
|
349
|
+
) -> creativerender_models.ExecAntcloudMarketingagentCreativeChatResponse:
|
|
350
|
+
"""
|
|
351
|
+
Description: 创意素材chat接口
|
|
352
|
+
Summary: 创意素材chat接口
|
|
353
|
+
"""
|
|
354
|
+
runtime = util_models.RuntimeOptions()
|
|
355
|
+
headers = {}
|
|
356
|
+
return await self.exec_antcloud_marketingagent_creative_chat_ex_async(request, headers, runtime)
|
|
357
|
+
|
|
358
|
+
def exec_antcloud_marketingagent_creative_chat_ex(
|
|
359
|
+
self,
|
|
360
|
+
request: creativerender_models.ExecAntcloudMarketingagentCreativeChatRequest,
|
|
361
|
+
headers: Dict[str, str],
|
|
362
|
+
runtime: util_models.RuntimeOptions,
|
|
363
|
+
) -> creativerender_models.ExecAntcloudMarketingagentCreativeChatResponse:
|
|
364
|
+
"""
|
|
365
|
+
Description: 创意素材chat接口
|
|
366
|
+
Summary: 创意素材chat接口
|
|
367
|
+
"""
|
|
368
|
+
UtilClient.validate_model(request)
|
|
369
|
+
return TeaCore.from_map(
|
|
370
|
+
creativerender_models.ExecAntcloudMarketingagentCreativeChatResponse(),
|
|
371
|
+
self.do_request('1.0', 'antcloud.marketingagent.creative.chat.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
async def exec_antcloud_marketingagent_creative_chat_ex_async(
|
|
375
|
+
self,
|
|
376
|
+
request: creativerender_models.ExecAntcloudMarketingagentCreativeChatRequest,
|
|
377
|
+
headers: Dict[str, str],
|
|
378
|
+
runtime: util_models.RuntimeOptions,
|
|
379
|
+
) -> creativerender_models.ExecAntcloudMarketingagentCreativeChatResponse:
|
|
380
|
+
"""
|
|
381
|
+
Description: 创意素材chat接口
|
|
382
|
+
Summary: 创意素材chat接口
|
|
383
|
+
"""
|
|
384
|
+
UtilClient.validate_model(request)
|
|
385
|
+
return TeaCore.from_map(
|
|
386
|
+
creativerender_models.ExecAntcloudMarketingagentCreativeChatResponse(),
|
|
387
|
+
await self.do_request_async('1.0', 'antcloud.marketingagent.creative.chat.exec', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
def query_antcloud_marketingagent_creative_result(
|
|
391
|
+
self,
|
|
392
|
+
request: creativerender_models.QueryAntcloudMarketingagentCreativeResultRequest,
|
|
393
|
+
) -> creativerender_models.QueryAntcloudMarketingagentCreativeResultResponse:
|
|
394
|
+
"""
|
|
395
|
+
Description: chat结果查询接口
|
|
396
|
+
Summary: chat结果查询接口
|
|
397
|
+
"""
|
|
398
|
+
runtime = util_models.RuntimeOptions()
|
|
399
|
+
headers = {}
|
|
400
|
+
return self.query_antcloud_marketingagent_creative_result_ex(request, headers, runtime)
|
|
401
|
+
|
|
402
|
+
async def query_antcloud_marketingagent_creative_result_async(
|
|
403
|
+
self,
|
|
404
|
+
request: creativerender_models.QueryAntcloudMarketingagentCreativeResultRequest,
|
|
405
|
+
) -> creativerender_models.QueryAntcloudMarketingagentCreativeResultResponse:
|
|
406
|
+
"""
|
|
407
|
+
Description: chat结果查询接口
|
|
408
|
+
Summary: chat结果查询接口
|
|
409
|
+
"""
|
|
410
|
+
runtime = util_models.RuntimeOptions()
|
|
411
|
+
headers = {}
|
|
412
|
+
return await self.query_antcloud_marketingagent_creative_result_ex_async(request, headers, runtime)
|
|
413
|
+
|
|
414
|
+
def query_antcloud_marketingagent_creative_result_ex(
|
|
415
|
+
self,
|
|
416
|
+
request: creativerender_models.QueryAntcloudMarketingagentCreativeResultRequest,
|
|
417
|
+
headers: Dict[str, str],
|
|
418
|
+
runtime: util_models.RuntimeOptions,
|
|
419
|
+
) -> creativerender_models.QueryAntcloudMarketingagentCreativeResultResponse:
|
|
420
|
+
"""
|
|
421
|
+
Description: chat结果查询接口
|
|
422
|
+
Summary: chat结果查询接口
|
|
423
|
+
"""
|
|
424
|
+
UtilClient.validate_model(request)
|
|
425
|
+
return TeaCore.from_map(
|
|
426
|
+
creativerender_models.QueryAntcloudMarketingagentCreativeResultResponse(),
|
|
427
|
+
self.do_request('1.0', 'antcloud.marketingagent.creative.result.query', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
async def query_antcloud_marketingagent_creative_result_ex_async(
|
|
431
|
+
self,
|
|
432
|
+
request: creativerender_models.QueryAntcloudMarketingagentCreativeResultRequest,
|
|
433
|
+
headers: Dict[str, str],
|
|
434
|
+
runtime: util_models.RuntimeOptions,
|
|
435
|
+
) -> creativerender_models.QueryAntcloudMarketingagentCreativeResultResponse:
|
|
436
|
+
"""
|
|
437
|
+
Description: chat结果查询接口
|
|
438
|
+
Summary: chat结果查询接口
|
|
439
|
+
"""
|
|
440
|
+
UtilClient.validate_model(request)
|
|
441
|
+
return TeaCore.from_map(
|
|
442
|
+
creativerender_models.QueryAntcloudMarketingagentCreativeResultResponse(),
|
|
443
|
+
await self.do_request_async('1.0', 'antcloud.marketingagent.creative.result.query', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime)
|
|
444
|
+
)
|