Search code examples
jsonibm-watsonchatbotwatson-conversation

Watson Conversation_Nodes that has no response


So I wrote this JSON code just like the following

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

The problem is that this doesn't count as a response as I've expected and I tried to erase that last "output" thing but it just pops out whenever I click the node again for some reasons. Any suggestion is more than a welcome :D Thanks


Solution

  • Your JSON have some incorrect syntax. You have not closed all JSON values in the context

    For have some answer:

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

    If you don't want one response for the user, give the [] empty like:

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

    I recommend, for you make sure if your Syntax from your JSON is correct here.