Custom channel rasa

I’m trying to create a custom channel in rasa. My credentials file is:

rest:

ChannelInputChannel:

rasa:
  url: "http://localhost:5002/api"

My channel file is in the rasa main directory:

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import logging

from flask import Blueprint, request, jsonify

from rasa_core.channels.channel import UserMessage
from rasa_core.channels.direct import CollectingOutputChannel
from rasa_core.channels.rest import HttpInputComponent
from rasa_core.channels.channel import InputChannel

logger = logging.getLogger(__name__)


class ChannelInputChannel(InputChannel):
    """A simple web bot that listens on a url and responds."""

    @classmethod
    def name(self) -> Text:
        return "channel_input_channel"

    def blueprint(self, on_new_message):
        custom_webhook = Blueprint('custom_webhook', __name__) 

I’m getting this error:

Exception: Failed to find input channel class for 'ChannelInputChannel'. 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.

What should I do?

What’s the name of the python file. Typically, you’d place this in a sub-directory like the example which would be in ./mypackage/MyIO.py with an __init__.py in the mypackage directory.

Hello,

I’m facing the same problem, I’ve created a new channel for WhatsApp and created a whatsappchannel.py file in the same directory of credentials.yml
`

projectFolder
|__ credentials.yml
|__ whatsappchannel.py

`

you suggest making it like this: `

projectFolder
|__credentials.yml
|__ mypackage/
      |__whatsappchannel.py

`

Am I right?