Hello, I am starting with rasa and I would like to know if it is possible to have an action that is constantly checked, that is, I have an external part that is responsible for measuring the temperature and humidity of a plant, I would like it to be checking all the time and in case of reaching the point decided by me that the bot informs the user for example of lack of irrigation. In normal Python I would know how to do it but with Rasa I don’t know if it changes anything. Do you have any idea how to do it or do you know of any documentation I can read about this?
Chatbots are mostly bi-directional meaning the conversation between a user and a bot.
In your case it sounds like a one direction notification. You can build a bot that asks the user to subscribe to a alert based system. create a separate program that does the temperature and humidity checks based on sensors and triggers an intent that would create an action which would push a notification to the user channel(sms/messenger etc…)
All data captured and managed in a database. In principle, you are using Rasa for any conversations which is often bi-directional in nature. so capture interactions with Rasa while run independent programs for triggering notifications.
In Rasa, you can create a couple of stories/rules to handle subscriptions to such events
- intent: subscribe
action: action_form_subscribe ## form which can ask for preferences
- intent: trigger_alert #triggered by a program
action: action_push_alert
- intent: trigger_alert #triggered by a program
action: action_push_alert
intent: user_ask_to_stop #triggered by user
action: action_unsubscribe
- intent: trigger_alert #triggered by a program
action: action_push_alert
intent: change_alert_data
action: action_subscribtion_form
- intent: unsubscribe #triggered by user
action: action_unsubscribe
Yes, I explained myself wrong, it is bidirectional but the part where the user asks and the bot answers is under my control. I also know how to make the bot start the conversation but I don’t know how to make the bot interrupt a storie, i.e. the user asks about the temperature, … And for x reason the bot should report that it needs water. My question is how to make this change of conversation. Whoever asks about the temperature is asking about fertilisers, irrigation systems, …
My question is if there is something special to be done so that it checks every few minutes, for example if it needs water, so that it does not need the user’s intervention to report at any time.
I am not sure if this is what you are looking for but there are pause/resume events which lets you pause the conversation unless you make a background tasks to check temperature through sensors and report back.
you have actions that can pause/resume a conversation. This is true during hand off when the conversation is intentionally paused by the bot. thus following conversations with the users will be skipped in the tracker store and no predictions will be made unless you resume the conversation through another event