TestRuleV4_智能对话分析_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
sca:TestRuleV4
全部资源
*

请求参数

字段名称字段详情
IsSchemeDatainteger<int32>

是否为新版质检,0:旧版质检;1:新版质检。默认为 1

示例值:1
TestJsonstring

测试规则请求参数 JSON,详情见请求参数补充说明。

示例值:{"ruleList":[9771],"dialogues":[{"begin":0,"end":760,"hourMinSec":"00:00","role":"客户","identity":"客户","words":"123"},{"begin":21004,"end":21494,"hourMinSec":"00:21","role":"客服","identity":"客服","words":"123"}]}

请求说明

请求入参示例

{
    "ruleList": [
        50298
    ],
    "dialogues": [
        {
            "role": "客服",
            "identity": "客服",
            "words": "你好,这里是 xx",
            "hourMinSec": "00:00",
            "begin": 0
        },
        {
            "words": "我要买毛巾",
            "begin": 1000,
            "role": "客户",
            "identity": "客户",
            "hourMinSec": "00:01"
        }
    ]
}

请求代码示例


import com.alibaba.fastjson.JSONObject;
import com.aliyun.qualitycheck20190115.Client;
import com.aliyun.qualitycheck20190115.models.*;
import com.aliyun.teaopenapi.models.Config;


public class sca {

    private static String ak = "YOUR_ACCESS_KEY_ID";
    private static String sk = "YOUR_ACCESS_KEY_SECRET";

    private static void testRuleV4() throws Exception {
        String json="{\"ruleList\":[50298],\"dialogues\":[{\"role\":\"客服\",\"identity\":\"客服\",\"words\":\"你好,这里是 xx\",\"hourMinSec\":\"00:00\",\"begin\":0},{\"words\":\"我要买毛巾\",\"begin\":1000,\"role\":\"客户\",\"identity\":\"客户\",\"hourMinSec\":\"00:01\"}]}";

        Config config = new Config();
        config.setAccessKeyId(ak).setAccessKeySecret(sk)
                .setEndpoint("qualitycheck.cn-hangzhou.aliyuncs.com")
                .setRegionId("cn-hangzhou").setProtocol("HTTPS");

        Client client = new Client(config);
        TestRuleV4Request result = new TestRuleV4Request();

        result.setTestJson(json);

        TestRuleV4Response response = client.testRuleV4(result);
        System.out.println(JSONObject.toJSONString(response));
    }


    public static void main(String[] args) throws Exception {
        testRuleV4();
    }
}

返回参数

字段名称字段详情
Dataobject

完整返回内容。

RequestIdstring

请求 ID。

示例值:96138D8D-XXXX-4E41-XXXX-77AED1088BBD
Successboolean

请求是否成功,调用方可根据此字段来判断请求是否成功:true 表示成功;false/null 表示失败。

示例值:true
Codestring

结果代码,200 表示成功,若为别的值则表示失败,调用方可根据此字段判断失败原因。

示例值:200
Messagestring

出错时表示出错详情,成功时为 successful。

示例值:successful
HttpStatusCodeinteger<int32>

HTTP 状态码。

示例值:200

返回示例

变更历史

变更时间变更内容概要操作
2024-03-12
删除返回参数

相关示例