首页 > 解决方案 > 音调分析器教程获取 "code":400,"sub_code":"C00012","error":"Invalid JSON input at line 1, column 2"

问题描述

我正在尝试建议的 json 数据,{"text": "Team, I know that times are tough! Product sales have been disappointing for the past three quarters. We have a competitive product, but we need to do a better job of selling it!"}但没有成功。请指教。

标签: cloud

解决方案


API 文档中有错误。该服务需要不同的 json 格式,如下所示:

{
  "utterances": [
    {
      "text": "Hello, I'm having a problem with your product.",
      "user": "customer"
    },
    {
      "text": "OK, let me know what's going on, please.",
      "user": "agent"
    },
    {
      "text": "Well, nothing is working :(",
      "user": "customer"
    },
    {
      "text": "Sorry to hear that.",
      "user": "agent"
    }
  ]
}

请参阅指定 JSON 输入


推荐阅读