diff options
| author | Zhineng Li <[email protected]> | 2026-02-13 10:54:11 +0800 |
|---|---|---|
| committer | Zhineng Li <[email protected]> | 2026-02-13 10:54:11 +0800 |
| commit | 7347bac4ab7e136157fc94777e6cf87ef9e08599 (patch) | |
| tree | 0dec367dac6e152161a6f7cc0dba6ebbef1f34a2 /data/zh_cn/nlp-automl | |
| download | acs-metadata-full-1.0.0+20260212.tar.gz acs-metadata-full-1.0.0+20260212.zip | |
first commitHEADv1.0.0+20260212main
Diffstat (limited to 'data/zh_cn/nlp-automl')
| -rw-r--r-- | data/zh_cn/nlp-automl/2019-05-29/api-docs.php | 114 | ||||
| -rw-r--r-- | data/zh_cn/nlp-automl/2019-07-01/api-docs.php | 338 | ||||
| -rw-r--r-- | data/zh_cn/nlp-automl/2019-11-11/api-docs.php | 849 |
3 files changed, 1301 insertions, 0 deletions
diff --git a/data/zh_cn/nlp-automl/2019-05-29/api-docs.php b/data/zh_cn/nlp-automl/2019-05-29/api-docs.php new file mode 100644 index 0000000..9e8e218 --- /dev/null +++ b/data/zh_cn/nlp-automl/2019-05-29/api-docs.php @@ -0,0 +1,114 @@ +<?php return [ + 'version' => '1.0', + 'info' => [ + 'style' => 'ROA', + 'product' => 'nlp-automl', + 'version' => '2019-05-29', + ], + 'directories' => [ + [ + 'id' => 0, + 'title' => '其它', + 'type' => 'directory', + 'children' => [ + 'PredictModel', + ], + ], + ], + 'components' => [ + 'schemas' => [], + ], + 'apis' => [ + 'PredictModel' => [ + 'summary' => '模型结果预测', + 'path' => '/api/automl/predict', + 'methods' => [ + 'post', + 'get', + ], + 'schemes' => [ + 'http', + 'https', + ], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => [ + 'FEATUREnlp6HZZI5', + 'FEATUREnlpMXQY7X', + 'FEATUREnlpAOZDQ8', + 'FEATUREnlp6X5BYZ', + 'FEATUREnlp0VR1QU', + 'FEATUREnlp01ENOR', + 'FEATUREnlpM0OA48', + 'FEATUREnlpF61RQU', + 'FEATUREnlpJOUXF2', + 'FEATUREnlpR1YV22', + 'FEATUREnlp97BF9V', + 'FEATUREnlpEZFBRW', + 'FEATUREnlp3ZJX2G', + ], + ], + 'parameters' => [ + [ + 'name' => 'ModelId', + 'in' => 'query', + 'schema' => [ + 'type' => 'integer', + 'format' => 'int64', + 'required' => true, + 'docRequired' => true, + ], + ], + [ + 'name' => 'Content', + 'in' => 'formData', + 'schema' => [ + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Code' => [ + 'type' => 'string', + ], + 'Message' => [ + 'type' => 'string', + ], + 'Data' => [ + 'type' => 'string', + ], + 'RequestId' => [ + 'type' => 'string', + ], + 'Success' => [ + 'type' => 'string', + ], + ], + ], + ], + ], + 'responseDemo' => '', + ], + ], + 'endpoints' => [ + [ + 'regionId' => 'cn-hangzhou', + 'endpoint' => 'nlp-automl.cn-hangzhou.aliyuncs.com', + ], + ], +]; diff --git a/data/zh_cn/nlp-automl/2019-07-01/api-docs.php b/data/zh_cn/nlp-automl/2019-07-01/api-docs.php new file mode 100644 index 0000000..d661e4e --- /dev/null +++ b/data/zh_cn/nlp-automl/2019-07-01/api-docs.php @@ -0,0 +1,338 @@ +<?php return [ + 'version' => '1.0', + 'info' => [ + 'style' => 'RPC', + 'product' => 'nlp-automl', + 'version' => '2019-07-01', + ], + 'directories' => [ + [ + 'id' => 0, + 'title' => '其它', + 'type' => 'directory', + 'children' => [ + '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' => '原文', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => 'hello', + ], + ], + [ + 'name' => 'TargetText', + 'in' => 'query', + 'schema' => [ + 'description' => '译文', + 'type' => 'string', + 'required' => false, + 'example' => '你好', + ], + ], + [ + 'name' => 'ProjectId', + 'in' => 'query', + 'schema' => [ + 'description' => '项目id', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => '1', + ], + ], + [ + 'name' => 'PackageId', + 'in' => 'query', + 'schema' => [ + 'description' => '词包id', + 'type' => 'string', + 'required' => false, + 'docRequired' => true, + 'example' => '1', + 'default' => 'mt_automl', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Code' => [ + 'description' => '接口返回码:200:表示成功。'."\n" + .'其它:表示错误码。错误码详情,请参见错误码。', + 'type' => 'integer', + 'format' => 'int32', + 'example' => '200', + ], + 'Message' => [ + 'description' => '错误信息。错误码对应的错误信息。', + 'type' => 'string', + 'example' => 'parameterError', + ], + 'RequestId' => [ + 'description' => '请求id', + 'type' => 'string', + 'example' => '46E6B40D-2B6C-571B-AC41-86207DE288A5', + ], + 'WordId' => [ + 'description' => '新增成功的词id', + 'type' => 'integer', + 'format' => 'int64', + 'example' => '1', + ], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"parameterError\\",\\n \\"RequestId\\": \\"46E6B40D-2B6C-571B-AC41-86207DE288A5\\",\\n \\"WordId\\": 1\\n}","type":"json"}]', + 'title' => '增加干预数据', + 'summary' => '把待干预的原文和译文添加到ProjectId和PackageId对应的dataSet上。', + 'description' => '请确保在使用该接口前,已充分了解NLP自学习平台产品的收费方式和[价格](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy)', + ], + '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' => '文档id', + 'type' => 'integer', + 'format' => 'int64', + 'required' => true, + 'docRequired' => true, + 'example' => '1000', + ], + ], + [ + 'name' => 'Product', + 'in' => 'query', + 'schema' => [ + 'description' => '产品code', + 'type' => 'string', + 'required' => false, + 'example' => '空', + 'default' => 'mt_automl', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Status' => [ + 'description' => '0:初始化 1:处理中 2:处理成功 3:处理失败', + 'type' => 'integer', + 'format' => 'int32', + 'example' => '2', + ], + 'RequestId' => [ + 'description' => '请求id', + 'type' => 'string', + 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', + ], + 'ResultContent' => [ + 'description' => '预测结果,文件流形式', + 'type' => 'string', + 'example' => 'xxx', + ], + 'XLIFFInfo' => [ + 'description' => 'xliff信息,文件流形式', + 'type' => 'string', + 'example' => 'xxx', + ], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Status\\": 2,\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"ResultContent\\": \\"xxx\\",\\n \\"XLIFFInfo\\": \\"xxx\\"\\n}","type":"json"}]', + 'title' => '获取文档预测结果', + 'summary' => '根据调用PredictMTModelByDoc返回的docId,调用该接口,返回预测后的结果。', + 'description' => '请确保在使用该接口前,已充分了解NLP自学习平台产品的收费方式和[价格](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy)', + ], + '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' => '文件数据内容,文件内容需进过base64编码', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => '[base64 encode content]', + ], + ], + [ + 'name' => 'FileType', + 'in' => 'query', + 'schema' => [ + 'description' => '文件类型', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => 'docx', + ], + ], + [ + 'name' => 'ModelId', + 'in' => 'query', + 'schema' => [ + 'description' => '模型id', + 'type' => 'integer', + 'format' => 'int32', + 'required' => true, + 'docRequired' => true, + 'example' => '1', + ], + ], + [ + 'name' => 'NeedXLIFF', + 'in' => 'query', + 'schema' => [ + 'description' => '是否需要xliff信息', + 'type' => 'boolean', + 'required' => false, + 'example' => 'true', + ], + ], + [ + 'name' => 'ModelVersion', + 'in' => 'query', + 'schema' => [ + 'description' => '模型版本', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => 'v1', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'DocId' => [ + 'description' => '文档id', + 'type' => 'string', + 'example' => '1', + ], + 'RequestId' => [ + 'description' => '请求id', + 'type' => 'string', + 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', + ], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"DocId\\": \\"1\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\"\\n}","type":"json"}]', + 'title' => '提交文档预测任务', + 'summary' => '上传文档内容,指定模型进行预测。', + 'description' => '请确保在使用该接口前,已充分了解NLP自学习平台产品的收费方式和[价格](https://common-buy.aliyun.com/?commodityCode=nlp_bag#/buy)', + ], + ], + 'endpoints' => [ + [ + 'regionId' => 'cn-hangzhou', + 'endpoint' => 'nlp-automl.cn-hangzhou.aliyuncs.com', + ], + ], +]; diff --git a/data/zh_cn/nlp-automl/2019-11-11/api-docs.php b/data/zh_cn/nlp-automl/2019-11-11/api-docs.php new file mode 100644 index 0000000..7eb872f --- /dev/null +++ b/data/zh_cn/nlp-automl/2019-11-11/api-docs.php @@ -0,0 +1,849 @@ +<?php return [ + 'version' => '1.0', + 'info' => [ + 'style' => 'RPC', + 'product' => 'nlp-automl', + 'version' => '2019-11-11', + ], + 'directories' => [ + [ + 'id' => 66230, + 'title' => '预测', + 'type' => 'directory', + 'children' => [ + 'CreateAsyncPredict', + 'GetAsyncPredict', + ], + ], + [ + 'id' => 66233, + 'title' => '模型', + 'type' => 'directory', + 'children' => [ + 'GetPredictResult', + 'RunPreTrainService', + ], + ], + ], + 'components' => [ + 'schemas' => [], + ], + 'apis' => [ + 'CreateAsyncPredict' => [ + 'summary' => '调用CreateAsyncPredict创建一个异步预测。', + 'methods' => [ + 'post', + ], + 'schemes' => [ + 'http', + 'https', + ], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => [ + 'FEATUREnlp2P1OGB', + 'FEATUREnlp6HZZI5', + 'FEATUREnlp8RK87E', + 'FEATUREnlpMXQY7X', + 'FEATUREnlp0537I6', + 'FEATUREnlpAOZDQ8', + 'FEATUREnlpCAMXDD', + 'FEATUREnlpEZFBRW', + 'FEATUREnlpM7P12V', + 'FEATUREnlp3ZJX2G', + 'FEATUREnlpQTX906', + 'FEATUREnlp97BF9V', + 'FEATUREnlpLCH6DG', + 'FEATUREnlpR1YV22', + 'FEATUREnlpDG0HX3', + 'FEATUREnlpJOUXF2', + 'FEATUREnlp9YSZ64', + 'FEATUREnlpF61RQU', + 'FEATUREnlpUZ2C2Y', + 'FEATUREnlpM0OA48', + 'FEATUREnlpZBZJI2', + 'FEATUREnlp01ENOR', + 'FEATUREnlpV1PN9B', + 'FEATUREnlp0VR1QU', + 'FEATUREnlpWB1IYO', + 'FEATUREnlp6X5BYZ', + 'FEATUREnlpX2LEJN', + 'FEATUREnlpLSF30C', + 'FEATUREnlpQ032BR', + 'FEATUREnlpQHAWK2', + 'FEATUREnlpWLVJE2', + 'FEATUREnlp4JXFXB', + 'FEATUREnlp0PKWIK', + 'FEATUREnlp1V7KGA', + 'FEATUREnlpR5NT62', + 'FEATUREnlpUC15C2', + 'FEATUREnlpOT0DNK', + 'FEATUREnlpQBSUD4', + 'FEATUREnlp8ES9UE', + 'FEATUREnlpTE27I1', + 'FEATUREnlp6WE0DC', + 'FEATUREnlpVBPY3Z', + 'FEATUREnlp0MGP51', + 'FEATUREnlpJSUF2I', + ], + ], + 'parameters' => [ + [ + 'name' => 'ModelId', + 'in' => 'formData', + 'schema' => [ + 'title' => '根据服务名称和服务版本创建异步预测的时候,此参数不必传;否则必传;', + 'description' => '模型ID。根据服务名称和服务版本创建异步预测的时候,此参数不必传;否则必传。', + 'type' => 'integer', + 'format' => 'int32', + 'required' => false, + 'docRequired' => false, + 'example' => '1', + ], + ], + [ + 'name' => 'Content', + 'in' => 'formData', + 'schema' => [ + 'description' => '预测内容,最大长度:1024字节。', + 'type' => 'string', + 'required' => false, + 'docRequired' => false, + 'example' => '全国土地利用总体规划', + ], + ], + [ + 'name' => 'ModelVersion', + 'in' => 'formData', + 'schema' => [ + 'description' => '要获取的物模型版本号。不传入此参数,则返回已发布的最新版本。根据模型ID调用异步预测接口的时候传此参数。', + 'type' => 'string', + 'required' => false, + 'docRequired' => false, + 'example' => 'V1', + ], + ], + [ + 'name' => 'DetailTag', + 'in' => 'formData', + 'schema' => [ + 'description' => '文本实体抽取类型模型,是否返回详细抽取结果。可选值:true/false。', + 'type' => 'string', + 'required' => false, + 'example' => 'false', + ], + ], + [ + 'name' => 'TopK', + 'in' => 'formData', + 'schema' => [ + 'description' => '设置返回top结果数量。', + 'type' => 'integer', + 'format' => 'int32', + 'required' => false, + 'example' => '0,3', + ], + ], + [ + 'name' => 'FileType', + 'in' => 'formData', + 'schema' => [ + 'description' => '文件类型', + 'type' => 'string', + 'required' => false, + 'example' => 'text,html,pdf,docx,doc', + ], + ], + [ + 'name' => 'FileUrl', + 'in' => 'formData', + 'schema' => [ + 'description' => '文件HTTP保存地址。', + 'type' => 'string', + 'required' => false, + 'example' => 'http://127.0.0.1/example.docx', + ], + ], + [ + 'name' => 'FileContent', + 'in' => 'formData', + 'schema' => [ + 'description' => '文件内容Base64编码。', + 'type' => 'string', + 'required' => false, + 'example' => '[base64 encode content]', + ], + ], + [ + 'name' => 'FetchContent', + 'in' => 'formData', + 'schema' => [ + 'description' => '返回预测文本', + 'type' => 'string', + 'required' => false, + 'example' => 'true', + ], + ], + [ + 'name' => 'ServiceName', + 'in' => 'formData', + 'schema' => [ + 'title' => '服务名称', + 'description' => '服务名称。', + 'type' => 'string', + 'required' => false, + 'example' => 'ContractNERPretrain', + ], + ], + [ + 'name' => 'ServiceVersion', + 'in' => 'formData', + 'schema' => [ + 'title' => '服务版本', + 'description' => '服务版本。', + 'type' => 'string', + 'required' => false, + 'example' => 'V1', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'AsyncPredictId' => [ + 'description' => '异步预测唯一ID,用于查询异步预测结果。', + 'type' => 'integer', + 'format' => 'int64', + 'example' => '1', + ], + 'RequestId' => [ + 'description' => '请求ID', + 'type' => 'string', + 'example' => 'E5C4531B-8331-5CD5-BEB3-2F8B58A4D680', + ], + ], + ], + ], + ], + 'errorCodes' => [ + 200 => [ + [ + 'errorCode' => '40002', + 'errorMessage' => 'The specified interface is throttled.', + ], + [ + 'errorCode' => '40013', + 'errorMessage' => 'An error occurred while authenticating the model.', + ], + ], + 400 => [ + [ + 'errorCode' => 'InvalidAccountStatus.ServiceUnavailable', + 'errorMessage' => 'The NLP Auto Machine Learning service has not been activated.', + ], + [ + 'errorCode' => 'InvalidAccountStatus.ServiceLimit', + 'errorMessage' => 'The maximum number of free API daily visits is exceeded.', + ], + [ + 'errorCode' => 'InvalidParameter.ModelId', + 'errorMessage' => 'The specified modelId is invalid.', + ], + [ + 'errorCode' => 'InvalidParameter.ModelVersion', + 'errorMessage' => 'The specified modelVersion is invalid.', + ], + [ + 'errorCode' => 'InvalidContentLength', + 'errorMessage' => 'The length of content exceeds the limit.', + ], + [ + 'errorCode' => 'parameterError', + 'errorMessage' => 'The parameter is invalid.', + ], + [ + 'errorCode' => 'predictLimit', + 'errorMessage' => 'The maximum number of submitted tasks is exceeded.', + ], + [ + 'errorCode' => 'postPaidArrearage', + 'errorMessage' => 'The service is not opened or the account is overdue.', + ], + ], + 403 => [ + [ + 'errorCode' => 'Forbbiden', + 'errorMessage' => 'You are not authorized to operate on the specified resource.', + ], + ], + [ + [ + 'errorCode' => 'ResourceNotFound', + 'errorMessage' => 'The specified Model does not exist.', + ], + ], + 500 => [ + [ + 'errorCode' => 'InternalError', + 'errorMessage' => 'An error occurred while processing your request.', + ], + ], + 503 => [ + [ + 'errorCode' => 'ServiceUnavailable', + 'errorMessage' => 'An error occurred while processing your request.', + ], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"AsyncPredictId\\": 1,\\n \\"RequestId\\": \\"E5C4531B-8331-5CD5-BEB3-2F8B58A4D680\\"\\n}","errorExample":""},{"type":"xml","example":"<CreateAsyncPredictResponse>\\r\\n <requestId>A357B459-3EA6-4F68-B285-FFDDF4E4662D</requestId>\\r\\n <asyncPredictId>1634</asyncPredictId>\\r\\n</CreateAsyncPredictResponse>","errorExample":""}]', + 'title' => '创建一个异步预测', + ], + 'GetAsyncPredict' => [ + 'summary' => '调用GetAsyncPredict获取异步预测结果。', + 'methods' => [ + 'get', + ], + 'schemes' => [ + 'http', + 'https', + ], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => [ + 'FEATUREnlp2P1OGB', + 'FEATUREnlp6HZZI5', + 'FEATUREnlp8RK87E', + 'FEATUREnlpMXQY7X', + 'FEATUREnlp0537I6', + 'FEATUREnlpAOZDQ8', + 'FEATUREnlpCAMXDD', + 'FEATUREnlpEZFBRW', + 'FEATUREnlpM7P12V', + 'FEATUREnlp3ZJX2G', + 'FEATUREnlpQTX906', + 'FEATUREnlp97BF9V', + 'FEATUREnlpLCH6DG', + 'FEATUREnlpR1YV22', + 'FEATUREnlpDG0HX3', + 'FEATUREnlpJOUXF2', + 'FEATUREnlp9YSZ64', + 'FEATUREnlpF61RQU', + 'FEATUREnlpUZ2C2Y', + 'FEATUREnlpM0OA48', + 'FEATUREnlpZBZJI2', + 'FEATUREnlp01ENOR', + 'FEATUREnlpV1PN9B', + 'FEATUREnlp0VR1QU', + 'FEATUREnlpWB1IYO', + 'FEATUREnlp6X5BYZ', + 'FEATUREnlpX2LEJN', + 'FEATUREnlpLSF30C', + 'FEATUREnlpQ032BR', + 'FEATUREnlpQHAWK2', + 'FEATUREnlpWLVJE2', + 'FEATUREnlp4JXFXB', + 'FEATUREnlp0PKWIK', + 'FEATUREnlp1V7KGA', + 'FEATUREnlpR5NT62', + 'FEATUREnlpUC15C2', + 'FEATUREnlpOT0DNK', + 'FEATUREnlpQBSUD4', + 'FEATUREnlp8ES9UE', + 'FEATUREnlpTE27I1', + 'FEATUREnlp6WE0DC', + 'FEATUREnlpVBPY3Z', + 'FEATUREnlp0MGP51', + 'FEATUREnlpJSUF2I', + ], + ], + 'parameters' => [ + [ + 'name' => 'AsyncPredictId', + 'in' => 'query', + 'schema' => [ + 'description' => '异步预测ID,通过调用CreateAsyncPredict接口获取。', + 'type' => 'integer', + 'format' => 'int32', + 'required' => true, + 'docRequired' => true, + 'example' => '1629', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'AsyncPredictId' => [ + 'description' => '异步预测ID,通过调用CreateAsyncPredict接口获取。', + 'type' => 'integer', + 'format' => 'int32', + 'example' => '1629', + ], + 'Status' => [ + 'description' => '异步预测状态,状态类型说明:'."\n" + ."\n" + .'- 1:处理中。'."\n" + .'- 2:处理完成。'."\n" + .'- 3:处理失败。', + 'type' => 'integer', + 'format' => 'int32', + 'example' => '2', + ], + 'RequestId' => [ + 'description' => '请求ID。', + 'type' => 'string', + 'example' => 'EBF1AAD7-A3FB-4A78-B5E9-8356324B12B2', + ], + 'Content' => [ + 'description' => '异步预测结果,JSON字符串格式文本。', + 'type' => 'string', + 'example' => 'json string', + ], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + [ + 'errorCode' => 'InvalidAccountStatus.ServiceUnavailable', + 'errorMessage' => 'The NLP Auto Machine Learning service has not been activated.', + ], + [ + 'errorCode' => 'InvalidAccountStatus.ServiceLimit', + 'errorMessage' => 'The maximum number of free API daily visits is exceeded.', + ], + [ + 'errorCode' => 'InvalidParameter.ModelId', + 'errorMessage' => 'The specified modelId is invalid.', + ], + [ + 'errorCode' => 'InvalidParameter.ModelVersion', + 'errorMessage' => 'The specified modelVersion is invalid.', + ], + [ + 'errorCode' => 'InvalidContentLength', + 'errorMessage' => 'The length of content exceeds the limit.', + ], + [ + 'errorCode' => 'Account arrearage', + 'errorMessage' => 'The account is arrearage.', + ], + [ + 'errorCode' => 'PermissionDeny', + 'errorMessage' => 'No RAM permission.', + ], + ], + 403 => [ + [ + 'errorCode' => 'Forbbiden', + 'errorMessage' => 'You are not authorized to operate on the specified resource.', + ], + ], + [ + [ + 'errorCode' => 'ResourceNotFound', + 'errorMessage' => 'The specified Model does not exist.', + ], + ], + 500 => [ + [ + 'errorCode' => 'InternalError', + 'errorMessage' => 'An error occurred while processing your request.', + ], + ], + 503 => [ + [ + 'errorCode' => 'ServiceUnavailable', + 'errorMessage' => 'An error occurred while processing your request.', + ], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"AsyncPredictId\\": 1629,\\n \\"Status\\": 2,\\n \\"RequestId\\": \\"EBF1AAD7-A3FB-4A78-B5E9-8356324B12B2\\",\\n \\"Content\\": \\"json string\\"\\n}","errorExample":""},{"type":"xml","example":"<GetAsyncPredictResponse>\\n <requestId>EBF1AAD7-A3FB-4A78-B5E9-8356324B12B2</requestId>\\n <asyncPredictId>1629</asyncPredictId>\\n <status>2</status>\\n <content></content>\\n</GetAsyncPredictResponse>","errorExample":""}]', + 'title' => '获取异步预测结果', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + ], + 'GetPredictResult' => [ + 'summary' => '调用GetPredictResult获取模型预测结果。', + 'methods' => [ + 'post', + ], + 'schemes' => [ + 'http', + 'https', + ], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => [ + 'FEATUREnlp6HZZI5', + 'FEATUREnlpMXQY7X', + 'FEATUREnlpAOZDQ8', + 'FEATUREnlpEZFBRW', + 'FEATUREnlp3ZJX2G', + 'FEATUREnlp97BF9V', + 'FEATUREnlpR1YV22', + 'FEATUREnlpJOUXF2', + 'FEATUREnlpF61RQU', + 'FEATUREnlpM0OA48', + 'FEATUREnlp01ENOR', + 'FEATUREnlp0VR1QU', + 'FEATUREnlp6X5BYZ', + ], + ], + 'parameters' => [ + [ + 'name' => 'ModelId', + 'in' => 'formData', + 'schema' => [ + 'type' => 'integer', + 'format' => 'int32', + 'required' => true, + 'docRequired' => true, + ], + ], + [ + 'name' => 'Content', + 'in' => 'formData', + 'schema' => [ + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + ], + ], + [ + 'name' => 'ModelVersion', + 'in' => 'formData', + 'schema' => [ + 'type' => 'string', + 'required' => false, + 'docRequired' => true, + ], + ], + [ + 'name' => 'DetailTag', + 'in' => 'formData', + 'schema' => [ + 'type' => 'string', + 'required' => false, + ], + ], + [ + 'name' => 'TopK', + 'in' => 'formData', + 'schema' => [ + 'type' => 'integer', + 'format' => 'int32', + 'required' => false, + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Content' => [ + 'type' => 'string', + ], + 'RequestId' => [ + 'type' => 'string', + ], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + [ + 'errorCode' => 'InvalidAccountStatus.ServiceUnavailable', + 'errorMessage' => 'The NLP Auto Machine Learning service has not been activated.', + ], + [ + 'errorCode' => 'InvalidAccountStatus.ServiceLimit', + 'errorMessage' => 'The maximum number of free API daily visits is exceeded.', + ], + [ + 'errorCode' => 'InvalidParameter.ModelId', + 'errorMessage' => 'The specified modelId is invalid.', + ], + [ + 'errorCode' => 'InvalidParameter.ModelVersion', + 'errorMessage' => 'The specified modelVersion is invalid.', + ], + [ + 'errorCode' => 'InvalidContentLength', + 'errorMessage' => 'The length of content exceeds the limit.', + ], + [ + 'errorCode' => 'parameterError', + 'errorMessage' => 'The parameter is invalid.', + ], + [ + 'errorCode' => 'Account arrearage', + 'errorMessage' => 'The account is arrearage.', + ], + [ + 'errorCode' => 'PermissionDeny', + 'errorMessage' => 'No RAM permission.', + ], + ], + 403 => [ + [ + 'errorCode' => '40003', + 'errorMessage' => 'An error occurred while authenticating the model.', + ], + [ + 'errorCode' => 'Forbbiden', + 'errorMessage' => 'You are not authorized to operate on the specified resource.', + ], + [ + 'errorCode' => '40002', + 'errorMessage' => 'The specified interface is throttled.', + ], + [ + 'errorCode' => '40013', + 'errorMessage' => 'An error occurred while authenticating the model.', + ], + ], + [ + [ + 'errorCode' => 'ResourceNotFound', + 'errorMessage' => 'The specified Model does not exist.', + ], + ], + 500 => [ + [ + 'errorCode' => 'InternalError', + 'errorMessage' => 'An error occurred while processing your request.', + ], + [ + 'errorCode' => 'ModelInferenceFailed', + 'errorMessage' => 'The model inference result is null.', + ], + ], + 503 => [ + [ + 'errorCode' => 'ServiceUnavailable', + 'errorMessage' => 'An error occurred while processing your request.', + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Content\\": \\"\\",\\n \\"RequestId\\": \\"\\"\\n}","type":"json"}]', + 'title' => '获取模型预测结果', + ], + 'RunPreTrainService' => [ + 'summary' => '调用预训练模型服务。', + 'methods' => [ + 'post', + ], + 'schemes' => [ + 'http', + 'https', + ], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => [ + 'FEATUREnlp2P1OGB', + 'FEATUREnlp8RK87E', + 'FEATUREnlp0537I6', + 'FEATUREnlpCAMXDD', + 'FEATUREnlpM7P12V', + 'FEATUREnlpQTX906', + 'FEATUREnlpLCH6DG', + 'FEATUREnlpDG0HX3', + 'FEATUREnlp9YSZ64', + 'FEATUREnlpUZ2C2Y', + 'FEATUREnlpZBZJI2', + 'FEATUREnlpV1PN9B', + 'FEATUREnlpWB1IYO', + 'FEATUREnlpX2LEJN', + 'FEATUREnlpLSF30C', + 'FEATUREnlpQ032BR', + 'FEATUREnlpQHAWK2', + 'FEATUREnlpWLVJE2', + 'FEATUREnlp4JXFXB', + 'FEATUREnlp0PKWIK', + 'FEATUREnlp1V7KGA', + 'FEATUREnlpR5NT62', + 'FEATUREnlpUC15C2', + 'FEATUREnlpOT0DNK', + 'FEATUREnlpQBSUD4', + 'FEATUREnlp8ES9UE', + 'FEATUREnlpTE27I1', + 'FEATUREnlp6WE0DC', + 'FEATUREnlpVBPY3Z', + 'FEATUREnlp0MGP51', + 'FEATUREnlpJSUF2I', + ], + ], + 'parameters' => [ + [ + 'name' => 'ServiceName', + 'in' => 'formData', + 'schema' => [ + 'description' => '服务名称。', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => 'ReviewAnalysis', + ], + ], + [ + 'name' => 'ServiceVersion', + 'in' => 'formData', + 'schema' => [ + 'description' => '服务版本。', + 'type' => 'string', + 'required' => false, + 'docRequired' => false, + 'example' => 'V1', + ], + ], + [ + 'name' => 'PredictContent', + 'in' => 'formData', + 'schema' => [ + 'description' => '预测输入。', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'example' => '{"input":{"content": "这件衣服真好看", "domain": "clothing"}}', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'PredictResult' => [ + 'description' => '模型预测结果。', + 'type' => 'string', + 'example' => '{"cost":"21.812ms","imprs":[{"aspect":"款式","clause":"这件衣服真好看","neg_prob":0.0,"pos_prob":0.566100001335144,"position":"0,7","sentiment":"正"}]},"message":"SUCCESS","tracerId":"7973b50e31dcbea8323460e0134d3226"}', + ], + 'RequestId' => [ + 'description' => '请求ID。', + 'type' => 'string', + 'example' => '7310FFCF-9FE8-4257-AE38-0E1AD828C2CC', + ], + 'BillingCount' => [ + 'description' => '计费次数,对应抵扣资源包数量', + 'type' => 'integer', + 'format' => 'int32', + 'example' => '1', + ], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + [ + 'errorCode' => 'InvalidAccountStatus.ServiceUnavailable', + 'errorMessage' => 'The NLP Auto Machine Learning service has not been activated.', + ], + [ + 'errorCode' => 'InvalidAccountStatus.ServiceLimit', + 'errorMessage' => 'The maximum number of free API daily visits is exceeded.', + ], + [ + 'errorCode' => 'parameterError', + 'errorMessage' => 'The parameter is invalid.', + ], + [ + 'errorCode' => 'predictContentLength', + 'errorMessage' => 'The length of content exceeds the limit.', + ], + [ + 'errorCode' => 'postPaidArrearage', + 'errorMessage' => 'The service is not opened or the account is overdue.', + ], + [ + 'errorCode' => 'PermissionDeny', + 'errorMessage' => 'No RAM permission.', + ], + ], + 404 => [ + [ + 'errorCode' => 'ResourceNotFound', + 'errorMessage' => 'The specified Model does not exist.', + ], + ], + 500 => [ + [ + 'errorCode' => 'ModelInferenceError', + 'errorMessage' => 'Failed to obtain the model prediction result.', + ], + [ + 'errorCode' => 'UnknownError', + 'errorMessage' => 'A server error occurred while processing your request. Please try again later or contact customer support.', + ], + [ + 'errorCode' => 'InternalError', + 'errorMessage' => 'An error occurred while processing your request.', + ], + [ + 'errorCode' => 'predictTimeout', + 'errorMessage' => 'model predict cost greater than 9000ms.', + ], + ], + 503 => [ + [ + 'errorCode' => 'ServiceUnavailable', + 'errorMessage' => 'An error occurred while processing your request.', + ], + ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"PredictResult\\": \\"{\\\\\\"cost\\\\\\":\\\\\\"21.812ms\\\\\\",\\\\\\"imprs\\\\\\":[{\\\\\\"aspect\\\\\\":\\\\\\"款式\\\\\\",\\\\\\"clause\\\\\\":\\\\\\"这件衣服真好看\\\\\\",\\\\\\"neg_prob\\\\\\":0.0,\\\\\\"pos_prob\\\\\\":0.566100001335144,\\\\\\"position\\\\\\":\\\\\\"0,7\\\\\\",\\\\\\"sentiment\\\\\\":\\\\\\"正\\\\\\"}]},\\\\\\"message\\\\\\":\\\\\\"SUCCESS\\\\\\",\\\\\\"tracerId\\\\\\":\\\\\\"7973b50e31dcbea8323460e0134d3226\\\\\\"}\\",\\n \\"RequestId\\": \\"7310FFCF-9FE8-4257-AE38-0E1AD828C2CC\\",\\n \\"BillingCount\\": 1\\n}","errorExample":""},{"type":"xml","example":"<RunPreTrainServiceResponse>\\n <PredictResult>{\\"cost\\":\\"21.812ms\\",\\"imprs\\":[{\\"aspect\\":\\"款式\\",\\"clause\\":\\"这件衣服真好看\\",\\"neg_prob\\":0.0,\\"pos_prob\\":0.566100001335144,\\"position\\":\\"0,7\\",\\"sentiment\\":\\"正\\"}]},\\"message\\":\\"SUCCESS\\",\\"tracerId\\":\\"7973b50e31dcbea8323460e0134d3226\\"}</PredictResult>\\n <RequestId>7310FFCF-9FE8-4257-AE38-0E1AD828C2CC</RequestId>\\n <BillingCount>1</BillingCount>\\n</RunPreTrainServiceResponse>","errorExample":""}]', + 'title' => '调用预训练模型服务', + ], + ], + 'endpoints' => [ + [ + 'regionId' => 'cn-hangzhou', + 'endpoint' => 'nlp-automl.cn-hangzhou.aliyuncs.com', + ], + ], +]; |
