Message object does not recognize text attribute in Custom Component for RASA 2.0

@sreerajm for me it was resolved as follows:

    try:
        message.data['text']
    except KeyError:
        pass

The text now is in a dictionary attribute of the Message object called data. However, you also need to catch a KeyError (at least in my case) as when starting this key does not exist. I am not sure whether this is the best way to do this but it works for me.

3 Likes