How to implement a custom form action with dynamically changing required slots?

I want to implement a custom form action in my chatbot, where the required slots are dynamically generated from an external API, I can’t define those dynamically generated slots in the domain file.

You can probably generate the domain itself dynamically and retrain the model in cloud.

I have same question, do you solve this problem?

I have the same needs. I try to make slots with out limitation by changing slot_mappings method using from_text() to fill the require_slots. Then one user message take up to a slot, we just need set number round slots to represent chatter rounds. But it’s hard to trigger other action in form, because form_policy is prefer than other policy. I want to know how to trigger another action(include defined intent’s action, and the fall_back’s action) in form after slot filled.

Here is an example below. Details in Forms [Handling conditional slot logic]

def required_slots(tracker: Tracker) -> List[Text]: “a list of requires slots that the form has to fill”

    if tracker.get_slot("good_is_valid") == False:
        return ["name", "good"]
    elif tracker.get_slot("mobile_is_use") == True:
       return ["name", "good", "mobile_is_use", "prov_city_district", "detailAddress"]
1 Like