What is the function of on_new_message and how is it callable in Rasa?
I was trying to create an output channel and found on_new_message function. I am able to create the channel but still wondering what is it doing in Background.
If you want to create an OutputChannel
there is no on_new_message
function.
The on_new_message
function is a callback which gets passed to your InputChannel
. You use it to pass the received message to Rasa Core after you have parsed it. A typical workflow might be:
InputChannel
up.InputChannel
on_new_message
RestInput
as an example) or you use a separate OutputChannel
for that (see class SlackBot
for an example) The documentation of Rasa Core has also a section on how to create custom channels: Creating a new Channel