I have two intents that both rely on slots that are very similar.
The first intent needs to know what kind of operating system the user has and the possible values are “osx, windows, or linux”.
The second intent also needs to know what kind of operating system but the only options are “osx or windows”. (no “linux”)
Is there a way I could use the same form/slot for both intents but for the second intent, I only want the utter_ask_os to show 2 buttons with osx and windows and not show linux as an option.
The reason I dont just make 2 different slots/forms is because this will confuse the model since the synonyms/training data for both slots will be the same.
Typically we recommend using a generic inform intent to gather information instead of separate intents. You’ve probably seen this in our example, helpdesk, financial and sara/rasa-demo bots. If you haven’t noticed this, take a look.
You could handle this in a form or custom action that responds with the correct set of buttons based upon the intent. Either way, I would split the utter_ask_os in two but you could alternatively create a custom utter_message in your action.
The other approach is do handle this in stories:
## first intent story
* first_intent
- utter_ask_os_all
* os_response{"os": "osx"}
- utter_thanks
## second intent story
* second_intent
- utter_ask_os_win_osx
* os_response{"os": "windows"}
- utter_thanks