I am trying to create a dynamic form that gets the slots from an external tool. The use case is that the user chooses an item from a catalog, and each item has different list of parameters that needs to be collected. I understand that I need to use the
FormValidationAction and override
required_slots according to this documentation: Forms
Here are my questions:
- I don’t know what the parameters will be, and how many of them. Is there more elegant way to add the slots than the fixed number of variables defined in the domain with names variable1, variable2, etc, with corresponding extract_, and action_ask_ actions that do exactly the same?
- The questions for the parameters are stored in the external tool. I am extracting the questions in parameters in the required_slots method, and want to pass them to the action_ask methods. I tried to use a slot for this, but it seems that when the action_ask method is called, the slot is not yet filled. Do I need to use a global variable storing the forms for all conversations, or there is a way to use some Rasa mechanisms for that?
- The most important - When I implement the required extract_ actions, the action_ask actions are ignored and the form tries to fill all additional slots without asking the user. What am I missing?