Are there ways to create completely dynamic forms?


I am in a team that has a website that executes different actions through API. We want to automatically generate all the different actions from our website to Rasa forms, and everytime we create a new action on our website have it automatically create a form on Rasa. We added python FormActions, but it seems all the slots and entities need to be written staticly in the domain.yml Is there an option to actually generate slots, entities and questions in the FormAction or with other classes in python without using static files? Are we doing something wrong?

Hi @eliranw,

you’re doing nothing wrong :slight_smile:

You will need to at least always add the form name to the domain file as the model has to know about which things it can execute in response to user utterance. I could imagine you could just define 1 placeholder form, and then dynamically switch the implementation during execution based on the conversation state (e.g. slots, last intent). However, you’d loose the ability to write stories / rules for this.

Another issue is that you currently need at least one slot mapping to be present in your domain.yml. So you can’t define a form without any slot mappings (only custom mappings). I created an issue as this is we want to solve soon.