Rasa core sdk tracker.latest_message.entities

Hi,

I am trying to get the duckling whole output but while retriving the entity in custom file it is only giving me entity value as a consequence of which I am not able to find other relevant information earlier I was getting the values using this code

next((e for e in tracker.latest_message.entities if
                                 e['entity'] == 'time'), None)

Now I am forced to use


next(tracker.get_latest_entity_values('time'), None)

as a result of which I am loosing all the other important information of the duckling.

Kindly help me how can I handle this situation. The above code is not working with the latest rasa version

Any help would be really appreciated.

Thanks,

Neel

@akelad Kindly help

@souvikg10 Kindly help

I got the issue resolved!


next((e for e in tracker.latest_message.entities if
                                 e['entity'] == 'time'), None)

instead of this I need to change it to

next((e for e in tracker.latest_message["entities"] if
                                e['entity'] == 'time'), None)

this would give me a list of dictionary and I am iterating in the dictionary to find the relevant entity.

I got the help from the github https://github.com/RasaHQ/rasa_core/issues/889

Thanks,

Neel