I’m facing an architural problem in my chatbot.
The idea is : while the solution sent by “action_get_error_solution” doesn’t satisfy the user, I go back to this action to find the next solution, but when there aren’t more solution the bot send a message saying ‘no more solutions’ and then ask if the user have other error message.
I want to reproduce the red path below with my custom action.
Hard to say without knowing where the information is stored: is the set of solutions stored somewhere or accessed through an API in a custom action or something?
What i’m getting at is that you could deal with this conditionally inside the action itself, or some intermediate action, which gets as an input how many solutions are left, or can see that if it returns None then there are no more and sets a FollowupAction. However, in my limited experience with Rasa, i am inclined to try put as much in the stories file as possible as the actions are opaque to the LSTM and so may cause headaches down the road.
Anyway, another way to do it would be to have a slot which stores the number of remaining solution, or simply a bool if none are left, and have your query action set that slot as it goes along and so you can write a few stories about what to do when that value is zero
Hope that helps/works!