没有响应的Watson Conversation_Nodes

时间:2017-06-06 16:16:11

标签: json ibm-watson chatbot watson-conversation

所以我写了这个JSON代码,就像下面的

一样
{
  "context": {
    "action": {
      "dates": "$dates",
      "command": [
        "check-dates"
      ]
    },
    "output": {
      "text": {
        "values": [
          "$dates, Do you want to pick this as a designated date?"
        ]
      }
    }
  },
  "output": {}
} 

问题在于,这并不像我预期的那样算作回应,我试图抹去最后一次"输出"事情,但只要我再次点击该节点出于某些原因它就会弹出。任何建议都不仅仅是欢迎:D谢谢

1 个答案:

答案 0 :(得分:0)

您的JSON语法不正确。您尚未关闭上下文中的所有JSON值

有一些答案:

{
  "context": {
    "action": {
      "dates": "$dates",
      "command": [
        "check-dates"
      ]
    }
  },
  "output": {
    "text": {
      "values": [
        "Your answer here."
      ],
      "selection_policy": "sequential"
    }
  }
}

如果您不想为用户提供一个回复,请将[]清空,如:

{
  "context": {
    "action": {
      "dates": "$dates",
      "command": [
        "check-dates"
      ]
    }
  },
  "output": {
    "text": {
      "values": [
        ""
      ],
      "selection_policy": "sequential"
    }
  }
}

我建议您确保JSON中的语法是否正确here