Dynamic Forms in rasa

I want to create a form which dynamically determines the required slots which are defined in the domain. I don’t want to change the extraction mechanism.

I did try to accomplish this via a custom FormValidationAction, inside of the required_slots function (without defining extract_myslot) but I am getting the following error message:

No method 'extract_myslot' found for slot 'myslot'. Skipping extraction for this slot.

although I set the form to

form_questionnaire:
    myslot:
      - type: from_entity
        entity: text

as I want myslot to be filled by the entity.

1 Like

Hello @hakrac , welcome to the Forum!

I don’t quite understand what you are doing with the extract_myslot. Can you please post your requested_slots implementation and domain file? Also, It’d be good to know the output of rasa --version.

Did you define all the slots in the domain? myslot must be listed under slots.

@j.mosig I got it working by looking up the source of rasa.

form_questionnaire:
    required_slots: []
    myslot:
      - type: from_entity
        entity: text

As of version 2.6.0 I have to explicitly add the required_slots key in order to dynamicly set the required_slots from within a custom validation action.