We are trying to connect our message pipeline to Rasa and would like to get channel specific responses over a single REST endpoint, e.g. (via postman):
http://localhost:5005/webhooks/mychannel/webhook/
{
"sender": "alex",
"message": "hi",
"input_channel": "mychannel"
}
#also tried:
{
"sender": "alex",
"message": "hi",
"input_channel": "whatsapp"
}
domain.yml excerpt (model was deleted completely and retrained):
responses:
utter_greet:
- channel: "mychannel"
text: "Custom Channel"
- channel: "whatsapp"
text: "Whatsapp Channel"
- text: "Default Channel"
The channel is set in credentials.yml and the logs show, that the custom webhook endpoint is registered. credentials.yml:
rest:
my_connector.CustomChannel:
The connector implementation is basically identical to rasa.core.channels.channel.RestInput
with:
class CustomChannel(InputChannel):
@classmethod
def name(cls) -> Text:
return "mychannel"
@staticmethod
async def on_message_wrapper...
The result is always:
[
{
"recipient_id": "alex",
"text": "Default Channel"
}
]
Versions:
rasa==1.8.3
rasa-sdk==1.10.1
rasa-x==0.26.3
What did I miss?