GetPredictResult
Call the GetPredictResult operation to retrieve the prediction result of a model.
Debug
Request parameters
Name | Type | Required | Example | Description |
Action | String | Yes | GetPredictResult | A required parameter. Set the value to GetPredictResult. |
Content | String | Yes | DAMO Academy artificial intelligence | The text to predict. For the text length limit, see the help document for the specific model. |
ModelId | Integer | Yes | 1818 | The model group ID. |
ModelVersion | String | Yes | V1 | The model version. |
DetailTag | String | No | true | Specifies whether to return detailed results for a text entity extraction model. Valid values are true and false. |
TopK | Integer | No | 3 | For a key phrase extraction model, this parameter sets the number of top results to return. |
Returned data
Name | Type | Sample value | Description |
Content | String | ["DAMO Academy","artificial intelligence"] | The prediction result. The format is a JSON string. |
RequestId | String | 32CE4E89-218B-4DAE-A103-E6BFA66EE63B | The request ID. |
Examples
Request example
http(s)://[Endpoint]/?Action=GetPredictResult&Content=DAMO Academy artificial intelligence&ModelId=1818&ModelVersion=V1&<Common request parameters>Response example
XML format
<GetPredictResultResponse> <requestId>32CE4E89-218B-4DAE-A103-E6BFA66EE63B</requestId> <content>["DAMO Academy","artificial intelligence"]</content></GetPredictResultResponse>JSON format
{ "content":"[\"DAMO Academy\",\"artificial intelligence\"]", "requestId":"32CE4E89-218B-4DAE-A103-E6BFA66EE63B"}Error codes
HTTP code | Error code | Error message | Description |
403 | Forbiden | You are not authorized to operate on the specified resource. | The user is not authorized to perform the operation on the specified resource. |
503 | ServiceUnavailable | An error occurred while processing your request. | An internal service error occurred. |
404 | ResourceNotFound | The specified Model does not exist. | The specified model does not exist. |
400 | InvalidAccountStatus.ServiceUnavailable | The NLP Auto Machine Learning service has not been activated. | The NLP AutoML service is not activated for the user. |
400 | InvalidAccountStatus.ServiceLimit | The maximum number of free API daily visits is exceeded. | The number of daily API calls exceeds the free quota. |
400 | InvalidParameter.ModelId | The specified modelId is invalid. | The modelId parameter is invalid. |
400 | InvalidParameter.ModelVersion | The specified modelVersion is invalid. | The modelVersion parameter is invalid. |
400 | InvalidContentLength | The length of content exceeds the limit. | The content length is too long. |
500 | InternalError | An error occurred while processing your request. | An unknown error occurred. |
For additional error codes, visit the Error Center.