dariowho/intents

Choose Text Response considering available parameters

dariowho opened this issue · 0 comments

AS A chatbot user
I WANT TO receive responses without parameter placeholders or empty-valued parameters
SO THAT I feel that responses are natural and fluent

Details

This should be native in Dialogflow and seems to be implemented in Snips. Alexa to be checked.

Also, text choiches should be filtered to only include those that match the maximum number of parameters; this is a case where it would be useful:

{
  "intent": {
    "name": "lights.TurnOffLight",
    "parameters": {
      "light_entity": "light.hue_aurelle_cucina",
      "light_area": "kitchen"
    }
  },
  "confidence": 0.7150873095446443,
  "fulfillment": {
    "plaintext": "Switching off light.hue_aurelle_cucina",
    "payloads": {
      "default": [
        {
          "choices": [
            "Couldn't understand which light to turn off..",
            "Switching off light.hue_aurelle_cucina",
            "Switching off light.hue_aurelle_cucina in kitchen",
            "Switching off all lights in kitchen"
          ]
        }
      ]
    }
  }
}