Override user input in Interactive learning module

Hi,

I am trying to automate the user message input while running interactive learning. Idea is to create a script which will fetch the user messages with confidence less than some threshold value from the tracker-store (MongoDB in my case). Then pass those messages in the interactive learning process.

I’m currently looking for the way to override the _enter_user_message method in interactive.py with creating any patch in the rasa core itself.

Any help will be appreciated.

Thanks, :sparkles: :cake:

Mhm, I think for a proof of concept, you could just overwrite that function - monkeypatching in your functionality, e.g. something along these lines should work:

def my_input(sender_id, endpoint):
  my_message = "hey there"
  send_message(endpoint, sender_id, my_message)

import rasa_core.training.interactive
rasa_core.training.interactive._enter_user_message = my_input

Once you have an idea where this is going we can think about how we can make this easier / integrate this better.

1 Like

Maybe RASA has changed a lot. I am looking to override user input in the interactive learning module and also the regular rasa shell.

However, I am unable to _enter_user_message in interactive.py and locate the following snippet:

def my_input(sender_id, endpoint):
  my_message = "hey there"
  send_message(endpoint, sender_id, my_message)

import rasa_core.training.interactive
rasa_core.training.interactive._enter_user_message = my_input

I was wondering if anyone has continued looking into how to override the user input and fetch user messages from your own place.