Examples

Here is an example of how to use the classify API.

curl -X GET 'https://api.botfuel.io/trainer/api/v0/classify'\
'?sentence=Does+a+power+plant+need+water%3F' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
// Response
[
  {
    "answers": [
      [
        {
          "payload": {
            "value": "There are four power plants on site. It is very unlikely that all four will experience a shortage."
          },
          "type": "text"
        }
      ]
    ],
    "id": "5b1a39cd185ab00011783338",
    "label": "powerplant",
    "probability": 0.9,
    "resolvePrompt": "Is there a power plant nearby?",
    "type": "QnA"
  },
  {
    "id": "5b100a2501a795001193e174",
    "label": "wateringplant",
    "probability": 0.8.
    "resolvePrompt": "Do you want to water a plant?",
    "type": "Intent"
  }
]