Can an intent have multiple responses based on channel the message is recieved from?

The use case is very simple, we want to deploy our Rasa assistant across various platforms. We wish to deploy the same assistant across all these platforms as that would save us a lot of development time. The issue is we do not want the assistant to respond to some of the questions in the same manner on all platforms. Example:

  1. What is the weather in London? (channel: socketio) Ans. Its raining, better carry your umbrella!
  2. What is the weather in New York (channel: slack) Ans. Download the app for more information.

Hi @chtnnh, you can define channel-specific responses in your domain.yml file like this:

responses:
  utter_weather:
    - text: "It's raining, better carry your umbrella!"
      channel: "socketio"
    - text: "Download the app for more info."
      channel: "slack"
1 Like

Hi @b-quachtran, thanks for the reply. Is there a policy I should include in the model pipeline to ensure this works? Thank you, chtnnh

This will work out of the box!

Thank you @akelad

Is this possible in the responses.md file for chitchat? We are using ResponseSelector as a policy. @akelad

Would this work as well ??

actions:
- some_actions_in_action_file
responses:
  utter_weather:
    - text: some_actions_in_action_file
      channel: "facebook"
    - text: "Download the app for more info."
      channel: "slack"
1 Like