RasaHQ/rasa-sdk

tracker.get_intent_of_latest_message() method doesn't return intent from custom component

PaulPidou opened this issue · 3 comments

Rasa version:
2.8.6
Rasa SDK version:
2.8.2
Python version:
3.8.10
Operating system (windows, osx, ...):
Windows 10

Issue:
The method tracker.get_intent_of_latest_message() doesn't return the intent from custom component but the first intent from intent_ranking instead.

This issue is due to this line
I guess it should be replaced by latest_message.get("intent").get("name").

I set the intent within my custom component in the following way:

confidence = 0.0 if intent_name is None else 1.0
intent = {"name": intent_name, "confidence": confidence}

if intent_name is not None:
    message.set(INTENT, intent, add_to_output=True)

(Following this code)

Thanks for raising this issue, @koaning will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.