Implementing a 'Cheat Code' Feature in Rasa Chatbot to Trigger Specific Action Regardless of User Input

Hi Rasa Community,

I’m working on a feature for my Rasa chatbot and need some advice. I want to implement a ‘cheat code’ mode where, upon the user saying “activate_cheatcode”, the bot enters a special state. In this state, regardless of the user’s input (even if it’s not in the training data or belongs to other intents), the bot should always perform the same action (cheat_code_action). This should continue until the user says “deactivate_cheatcode”. During this period, I also need to log or print the user’s latest input text.

Could anyone guide me on how to:

  1. Trigger cheat_code_action for any input after “activate_cheatcode” is said.
  2. Keep this action consistent for all inputs until “deactivate_cheatcode” is mentioned.
  3. Log or display the user’s input text in this mode.

Any tips or relevant documentation references would be really helpful!

Thanks in advance!

There’s not an out of the box method to handle this. I would consider customizing the REST or socket channel to handle this. Maybe create a cheatcode intent and have the channel override the user utterance when it is in this special mode.

1 Like