Custom Channel Example

Hi,

i’m trying to create my own custom channel. I have the following situation. I want to add some function as preprocessor to the message which the user entered (e.g. Correct spelling mistakes, …). Currently i use the RESTInput Channel and the Telegram Channel. For each channel i want to add a preprocessor for the user message.

I read the documentation which said i should look at the RESTInput channel. If i create a new custom channel (copy of RESTInput) in my root folder (which also contains actions.py, domain.yml, …) and change the credentials.yml with a single row “customchannel”, i got the following message from the run script: Failed to find input channel class for ‘customchannel’. Unknown input channel. Check your credentials configuration to make sure the mentioned channel is not misspelled. If you are creating your own channel, make sure it is a proper name of a class in a module.

Does anyone have a working example of an custom input channel? I saw in the run.py script, that it is using utils.class_from_module_path(module_name) to import the custom class. Where do i know, how i must specify the package? Is “customchannel” enough?

Another question is, how can i start the other channels like Telegram from my custom channel?

i’m using rasa_core 0.11.9

thank you in advance!

Hi Sniffie,

I am not but below url might be helpful for you.