文档

GetPredictResult

调用GetPredictResult获取模型预测结果。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称

类型

是否必选

示例值

描述

Action

String

GetPredictResult

系统规定参数。取值:GetPredictResult。

Content

String

达摩院人工智能

预测文本(文本长度参考不同模型帮助文档)。

ModelId

Integer

1818

模型组ID。

ModelVersion

String

V1

模型版本。

DetailTag

String

true

文本实体抽取模型预测是否返回详细结果,取值true或者false。

TopK

Integer

3

关键短语抽取模型,设置返回top结果数量。

返回数据

名称

类型

示例值

描述

Content

String

[“达摩院”,”人工智能”]

预测结果,格式为JSON字符串。

RequestId

String

32CE4E89-218B-4DAE-A103-E6BFA66EE63B

请求id。

示例

请求示例

http(s)://[Endpoint]/?Action=GetPredictResult&Content=达摩院人工智能&ModelId=1818&ModelVersion=V1&<公共请求参数>

正常返回示例

XML 格式

<GetPredictResultResponse>    <requestId>32CE4E89-218B-4DAE-A103-E6BFA66EE63B</requestId>    <content>[“达摩院”,”人工智能”]</content></GetPredictResultResponse>

JSON 格式

{    “content”:”[\”达摩院\”,\”人工智能\”]”,    “requestId”:”32CE4E89-218B-4DAE-A103-E6BFA66EE63B”}

错误码

HttpCode

错误码

错误信息

描述

403

Forbiden

You are not authorized to operate on the specified resource.

用户未被授权操作指定的资源。

503

ServiceUnavailable

An error occurred while processing your request.

服务内部错误。

404

ResourceNotFound

The specified Model does not exist.

指定的模型不存在。

400

InvalidAccountStatus.ServiceUnavailable

The NLP Auto Machine Learning service has not been activated.

用户未开通NLP自学习服务。

400

InvalidAccountStatus.ServiceLimit

The maximum number of free API daily visits is exceeded.

API每天访问次数超过了免费额度限制。

400

InvalidParameter.ModelId

The specified modelId is invalid.

参数modelId不合法。

400

InvalidParameter.ModelVersion

The specified modelVersion is invalid.

参数modelVersion不合法。

400

InvalidContentLength

The length of content exceeds the limit.

内容长度过长。

500

InternalError

An error occurred while processing your request.

未知错误。

访问错误中心查看更多错误码。

  • 本页导读 (0)
文档反馈