Search code examples
chatbotrasa-nlurasa-core

How to detect chat platform in actions.py with RASA?


I just updated Rasa Core to version 0.11.12 and I still got the error message:

"AttributeError: 'Tracker' object has no attribute 'latest_input_channel'"

"AttributeError: 'Tracker' object has no attribute 'get_latest_input_channel'"

"AttributeError: 'Tracker' object has no attribute 'get_latest_input_channel()'"

Follow the doc at: https://rasa.com/docs/core/0.11.12/_modules/rasa_core/trackers. I think this attribute should be in the tracker now.

Has anyone run into the same problem?


Solution

  • Finally I found the solution. Just get input_channel from Events.

    input_channel = tracker.events[1]['input_channel']
    

    Hope the input_channel will be fixed for next release of RASA.

    I also updated in community: https://forum.rasa.com/t/how-to-detect-chat-platform-in-actions-py/2991/5