对话机器人服务 CBS-问答统计:响应示例

时间:2024-04-07 15:57:33

响应示例

状态码:200

成功响应示例

{
    "interval":"day",
    "startutc":1613059200000,
    "endutc":1613720547615,
    "time_zone":"+08:00",
    "total":
       {
           "question_count":179,
           "direct_count":86,
           "recommend_count":4,
           "notmatch_count":85,
           "chat_count":0,
           "invalid_count":2,
           "dialog_count":2,
           "direct_rate":0.480,
           "recommend_rate":0.022,
           "notmatch_rate":0.475,
           "dialog_rate":0.011,
           "chat_rate":0.000,
           "invalid_rate":0.011
       },
    "intervals":[
       {
           "start":"2021-02-14",
           "question_count":28,
          "direct_count":7,
          "recommend_count":0,
          "notmatch_count":21,
          "chat_count":0,
          "invalid_count":0,
          "dialog_count":0,
          "direct_rate":0.250,
          "recommend_rate":0.000,
          "notmatch_rate":0.750,
          "dialog_rate":0.000,
          "chat_rate":0.000,
          "invalid_rate":0.000
       },
      {
          "start":"2021-02-15",
          "question_count":2,
          "direct_count":0,
          "recommend_count":0,
          "notmatch_count":2,
          "chat_count":0,
          "invalid_count":0,
          "dialog_count":0,
          "direct_rate":0.000,
          "recommend_rate":0.000,
          "notmatch_rate":1.000,
          "dialog_rate":0.000,
          "chat_rate":0.000,
          "invalid_rate":0.000
       },
      {
          "start":"2021-02-19",
          "question_count":149,
          "direct_count":79,
          "recommend_count":4,
          "notmatch_count":62,
          "chat_count":0,
          "invalid_count":2,
          "dialog_count":2,
          "direct_rate":0.530,
          "recommend_rate":0.027,
          "notmatch_rate":0.416,
          "dialog_rate":0.013,
          "chat_rate":0.000,
          "invalid_rate":0.013
       }
    ]
}

状态码:400

失败响应示例

{
    "error_code":"CBS.0021",
    "error_msg":"request parameter error"
}
support.huaweicloud.com/api-cbs/cbs_03_0117.html