Generate new slots at runtime

Hi, we use a custom FormAction, which calls another service to get a form model. This form model specifies, which ‘slots’ are needed to be filled by this form.

So far, we have pre-specified all the slots in the domain-file, but we’d like to generate the slots from the model. If we use a non-specified slot now, Rasa will throw an error ‘trying to set non-existent slot …’.

A possible solution I thought of, would be to generate a domain-file at runtime and train and load another model via the REST API. I havent tried this yet, so im not 100% this will work out as expected. Is there a simpler solution to the problem?

hey Heiner!

If these are unfeaturized slots, then I could see an argument for just allowing these slots to be set by the actions without throwing any warning.

I think that shouldn’t be the default behaviour, but we can have a flag like allow_undefined_slots that enables this behaviour.

Sounds like this should fix this issue.

So what’s the procedure now. If Id like to have this feature soon, I should go and make a PR myself? Or does it need to pass some other process?

hi @IgNoRaNt23 - it’d be awesome if you tackled this! before you do any work, please create an issue with your proposed solution so we can check if it clashes with anything.