1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
<?php return [
'version' => '1.0',
'info' => ['style' => 'RPC', 'product' => 'nlp-automl', 'version' => '2019-07-01'],
'directories' => ['AddMTInterveneWord', 'GetPredictDoc', 'PredictMTModelByDoc'],
'components' => [
'schemas' => [],
],
'apis' => [
'AddMTInterveneWord' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
[
'APP' => [],
],
[
'PrivateKey' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'SourceText',
'in' => 'query',
'schema' => ['description' => 'The source text.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'hello', 'title' => ''],
],
[
'name' => 'TargetText',
'in' => 'query',
'schema' => ['description' => 'The target text.', 'type' => 'string', 'required' => false, 'example' => '你好', 'title' => ''],
],
[
'name' => 'ProjectId',
'in' => 'query',
'schema' => ['description' => 'The project ID.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '1', 'title' => ''],
],
[
'name' => 'PackageId',
'in' => 'query',
'schema' => ['description' => 'The word package ID.', 'type' => 'string', 'required' => false, 'docRequired' => true, 'default' => 'mt_automl', 'example' => '1', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The response code. Valid values:'."\n"
.'- 200: success.'."\n"
.'- Other values: error codes. For more information, see error codes.', 'type' => 'integer', 'format' => 'int32', 'example' => '200', 'title' => ''],
'Message' => ['description' => 'The error message corresponding to the error code.', 'type' => 'string', 'example' => 'parameterError', 'title' => ''],
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '46E6B40D-2B6C-571B-AC41-86207DE288A5', 'title' => ''],
'WordId' => ['description' => 'The ID of the successfully added word.', 'type' => 'integer', 'format' => 'int64', 'example' => '1', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"parameterError\\",\\n \\"RequestId\\": \\"46E6B40D-2B6C-571B-AC41-86207DE288A5\\",\\n \\"WordId\\": 1\\n}","type":"json"}]',
'title' => 'Add intervention data',
'summary' => 'Adds the source text and target text to be intervened to the dataset corresponding to the specified ProjectId and PackageId.',
'description' => 'Before using this operation, make sure that you fully understand the billing method and [pricing](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy) of the NLP Self-learning Platform.',
'changeSet' => [
['createdAt' => '2022-03-07T07:22:38.000Z', 'description' => 'Response parameters changed, Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '30', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddMTInterveneWord'],
],
'product' => ['code' => 'nlp', 'title' => '自然语言处理'],
],
],
'GetPredictDoc' => [
'methods' => ['head', 'post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
[
'APP' => [],
],
[
'PrivateKey' => [],
],
[
'BearerToken' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'DocId',
'in' => 'query',
'schema' => ['description' => 'The document ID.', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'example' => '1000', 'title' => ''],
],
[
'name' => 'Product',
'in' => 'query',
'schema' => ['description' => 'The product code.', 'type' => 'string', 'required' => false, 'default' => 'mt_automl', 'example' => '空', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Status' => ['description' => 'The processing status. Valid values:'."\n"
.'- 0: initialization'."\n"
.'- 1: processing'."\n"
.'- 2: processing succeeded'."\n"
.'- 3: processing failed.', 'type' => 'integer', 'format' => 'int32', 'example' => '2', 'title' => ''],
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', 'title' => ''],
'ResultContent' => ['description' => 'The prediction result, in file stream format.', 'type' => 'string', 'example' => 'xxx', 'title' => ''],
'XLIFFInfo' => ['description' => 'The XLIFF information, in file stream format.', 'type' => 'string', 'example' => 'xxx', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Status\\": 2,\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"ResultContent\\": \\"xxx\\",\\n \\"XLIFFInfo\\": \\"xxx\\"\\n}","type":"json"}]',
'title' => 'Retrieve document prediction result',
'summary' => 'Retrieves the prediction result of a document based on the docId returned by PredictMTModelByDoc.',
'description' => 'Before using this operation, make sure that you fully understand the billing of NLP AutoLearning and its [pricing](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy).',
'changeSet' => [
['createdAt' => '2024-07-04T02:12:17.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPredictDoc'],
],
'product' => ['code' => 'nlp', 'title' => '自然语言处理'],
],
],
'PredictMTModelByDoc' => [
'methods' => ['head', 'post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
[
'APP' => [],
],
[
'PrivateKey' => [],
],
[
'BearerToken' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
'name' => 'FileContent',
'in' => 'formData',
'schema' => ['description' => 'The file data content. The file content must be processed with Base64 encoding.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '[base64 encode content]', 'title' => ''],
],
[
'name' => 'FileType',
'in' => 'query',
'schema' => ['description' => 'The file type.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'docx', 'title' => ''],
],
[
'name' => 'ModelId',
'in' => 'query',
'schema' => ['description' => 'The model ID.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'docRequired' => true, 'example' => '1', 'title' => ''],
],
[
'name' => 'NeedXLIFF',
'in' => 'query',
'schema' => ['description' => 'Specifies whether XLIFF information is required.', 'type' => 'boolean', 'required' => false, 'example' => 'true', 'title' => ''],
],
[
'name' => 'ModelVersion',
'in' => 'query',
'schema' => ['description' => 'The model version.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'v1', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'DocId' => ['description' => 'The document ID.', 'type' => 'string', 'example' => '1', 'title' => ''],
'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"DocId\\": \\"1\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\"\\n}","type":"json"}]',
'title' => 'Submit a document prediction task',
'summary' => 'Uploads document content and uses a specified model for prediction.',
'description' => 'Before using this operation, make sure that you fully understand the billing method and [pricing](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy) of NLP Self-learning Platform.',
'changeSet' => [
['createdAt' => '2024-07-04T02:12:17.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'PredictMTModelByDoc'],
],
'product' => ['code' => 'nlp', 'title' => '自然语言处理'],
],
],
],
'endpoints' => [
['regionId' => 'cn-hangzhou', 'regionName' => 'China (Hangzhou)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'nlp-automl.cn-hangzhou.aliyuncs.com', 'endpoint' => 'nlp-automl.cn-hangzhou.aliyuncs.com', 'vpc' => 'nlp-automl-vpc.cn-hangzhou.aliyuncs.com'],
],
'errorCodes' => [
['code' => '40001', 'message' => 'The quota for calling the model is exceeded.', 'http_code' => 403, 'description' => ''],
['code' => '40002', 'message' => 'The specified interface is throttled.', 'http_code' => 403, 'description' => 'The specified interface is throttled.'],
['code' => '40003', 'message' => 'An error occurred while authenticating the model.', 'http_code' => 403, 'description' => ''],
['code' => '40004', 'message' => 'A server error occurred while processing your request. Please try again later or contact customer support.', 'http_code' => 200, 'description' => 'A server error occurred while processing your request. Please try again later or contact customer support.'],
['code' => '40013', 'message' => 'An error occurred while authenticating the model.', 'http_code' => 403, 'description' => ''],
['code' => 'Account arrearage', 'message' => 'The account is arrearage.', 'http_code' => 400, 'description' => 'Account Arrears'],
['code' => 'BaseModelNotFound', 'message' => 'The base model is not found.', 'http_code' => 400, 'description' => ''],
['code' => 'createModelConcurrency', 'message' => 'Creating multiple models at the same time is not allowed.', 'http_code' => 400, 'description' => ''],
['code' => 'DataCenter.IllegalDatasetId', 'message' => 'The format of the dataset ID is invalid.', 'http_code' => 403, 'description' => ''],
['code' => 'DataCenter.IllegalDatasetRecord', 'message' => 'The format of the dataset record is invalid.', 'http_code' => 403, 'description' => ''],
['code' => 'dataFormatError', 'message' => 'The number of data bars added exceeds 500.', 'http_code' => 400, 'description' => ''],
['code' => 'DocParseError', 'message' => 'The version of the uploaded DOC file is too early to support parsing. You are advised to replace the DOCX file with the latest version.', 'http_code' => 400, 'description' => ''],
['code' => 'FileParseError', 'message' => 'The uploaded file failed to be parsed.', 'http_code' => 500, 'description' => ''],
['code' => 'Forbbiden', 'message' => 'You are not authorized to operate on the specified resource.', 'http_code' => 403, 'description' => 'You are not authorized to operate on the specified resource.'],
['code' => 'InternalError', 'message' => 'An error occurred while processing your request.', 'http_code' => 500, 'description' => 'An error occurred while processing your request.'],
['code' => 'InvalidAccountStatus.ServiceLimit', 'message' => 'The maximum number of free API daily visits is exceeded.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidAccountStatus.ServiceUnavailable', 'message' => 'The NLP Auto Machine Learning service has not been activated.', 'http_code' => 400, 'description' => 'The NLP Auto Machine Learning service has not been activated.'],
['code' => 'InvalidContentLength', 'message' => 'The length of content exceeds the limit.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter', 'message' => 'The parameter is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.ModelId', 'message' => 'The specified modelId is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidParameter.ModelVersion', 'message' => 'The specified modelVersion is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'InvalidServiceName', 'message' => 'The service does not exist.', 'http_code' => 400, 'description' => 'The service is not exists.'],
['code' => 'ModelCenter.CreateModelLimit', 'message' => 'The maximum number of models you created is exceeded.', 'http_code' => 403, 'description' => ''],
['code' => 'ModelCenter.DeployModelLimit', 'message' => 'The maximum number of online models is exceeded. You cannot deploy the model.', 'http_code' => 403, 'description' => ''],
['code' => 'ModelCenter.IllegalModelName', 'message' => 'The format of the model name is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.MinTrainingcount', 'message' => 'The number of model training records is less than 4.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.ModelNotFound', 'message' => 'The model information is not found.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.ModelNotInProject', 'message' => 'The model is not in the specified project.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.ModelStatusError', 'message' => 'The model status is abnormal.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.NoDatasetOnline', 'message' => 'The status of the training dataset is not online.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.NoPermission', 'message' => 'You are not authorized to perform the operation.', 'http_code' => 403, 'description' => ''],
['code' => 'ModelCenter.NotFoundConfig', 'message' => 'The configuration information of the model type is not found.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelCenter.OnlineModelLimit', 'message' => 'The maximum number of online models is exceeded.', 'http_code' => 403, 'description' => ''],
['code' => 'ModelGroupNotFound', 'message' => 'The model group is not found.', 'http_code' => 400, 'description' => ''],
['code' => 'ModelInferenceError', 'message' => 'Failed to obtain the model prediction result.', 'http_code' => 500, 'description' => 'Get model predict result error.'],
['code' => 'ModelInferenceFailed', 'message' => 'The model inference result is null.', 'http_code' => 500, 'description' => ''],
['code' => 'NotFoundUploadDataError', 'message' => 'No data set is created.', 'http_code' => 400, 'description' => ''],
['code' => 'parameterError', 'message' => 'The parameter is invalid.', 'http_code' => 400, 'description' => ''],
['code' => 'PermissionDeny', 'message' => 'No RAM permission.', 'http_code' => 400, 'description' => 'No permission to change the account'],
['code' => 'postPaidArrearage', 'message' => 'The service is not opened or the account is overdue.', 'http_code' => 400, 'description' => ''],
['code' => 'postpaidArrearageError', 'message' => 'You have an overdue payment.', 'http_code' => 400, 'description' => ''],
['code' => 'predictContentLength', 'message' => 'The length of content exceeds the limit.', 'http_code' => 400, 'description' => ''],
['code' => 'predictLimit', 'message' => 'The maximum number of submitted tasks is exceeded.', 'http_code' => 400, 'description' => ''],
['code' => 'predictQpsLimit', 'message' => 'The maximum number of queries-per-second is exceeded.', 'http_code' => 403, 'description' => ''],
['code' => 'predictTimeout', 'message' => 'model predict cost greater than 9000ms.', 'http_code' => 500, 'description' => ''],
['code' => 'queryExceedMaxDuration', 'message' => 'The query data exceeds the upper limit.', 'http_code' => 400, 'description' => ''],
['code' => 'ResourceNotFound', 'message' => 'The specified Model does not exist.', 'http_code' => 404, 'description' => 'The specified Model does not exist.'],
['code' => 'ServiceUnavailable', 'message' => 'An error occurred while processing your request.', 'http_code' => 503, 'description' => 'An error occurred while processing your request.'],
['code' => 'UnknownError', 'message' => 'A server error occurred while processing your request. Please try again later or contact customer support.', 'http_code' => 500, 'description' => 'A server error occurred while processing your request. Please try again later or contact customer support.'],
],
'changeSet' => [
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'GetPredictDoc'],
['description' => 'Error codes changed', 'api' => 'PredictMTModelByDoc'],
],
'createdAt' => '2024-07-04T02:12:21.000Z',
'description' => '',
],
[
'apis' => [
['description' => 'Response parameters changed, Error codes changed', 'api' => 'AddMTInterveneWord'],
],
'createdAt' => '2022-03-07T07:23:44.000Z',
'description' => '修改AddMTInterveneWord这个接口的返回的message和wordId的数据类型,其他接口从public修改为private',
],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetPredictDoc'],
['threshold' => '5', 'countWindow' => 1, 'regionId' => '*', 'api' => 'PredictMTModelByDoc'],
['threshold' => '30', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AddMTInterveneWord'],
],
'product' => ['code' => 'nlp', 'title' => 'nlp-automl'],
],
];
|