How from_intent slot mapping type is actually supposed to be used?

The docs mention this example:

    - type: from_intent
      value: my_value
      intent: intent_name
      not_intent: excluded_intent

When a form has this type of slot mapping, it seem it just asks until the user gives the desired response. What’s the point of this? It will always set the same value in the end, so why ask at all?

I thought you could declare specific values for specific intents (more than one value alternative for the slot mapping, depending on the intent), but I don’t see how to declare anything like it in the docs.

Nevermind. After trying a while, it seems you can define multiple type elements. So, for example to map to a bool slot, you could do something like:

    - type: from_intent
      value: true
      intent: affirm
    - type: from_intent
      value: false
      intent: deny

Hope it helps someone.

1 Like