Why do I always get None instead of the retrieval intent?

Hi all,

My goal is to get the sub-intent of a retrieval intent. I followed the demo, however, I’m always getting None as the intent instead of the retrieval intent. I’m using RASA 3.1.

Here is the code I’m using to get the retrieval intent:

class ActionSetFaqSlot(Action):
    """Returns the chitchat utterance dependent on the intent"""

    def name(self) -> Text:
        return "action_set_faq_slot"

    def run(
        self,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: DomainDict,
    ) -> List[EventType]:
        full_intent = (
            tracker.latest_message.get("response_selector", {})
            .get("faq", {})
            .get("full_retrieval_intent")
        )
        print(full_intent)
        if full_intent:
            topic = full_intent
            # topic = full_intent.split("/")[1]
        else:
            topic = None

        return [SlotSet("faq", topic)]

while I trained it in my rules and stories like this:

- rule: respond to faq
  steps:
  - intent: faq
  - action: utter_faq
  - action: action_set_faq_slot

The slot is defined like this:

  faq:
    type: any
    influence_conversation: false
    mappings:
    - type: custom 

Could someone explain we what I’m doing wrong? Maybe @rasa_learner?

Hi, have you tried the following?

tracker.get_intent_of_latest_message()

Hi @rasa_learner,

I did but unfortunately, it only gives me the umbrella intent “faq”

Could I maybe use this functionality:

get_full_retrieval_name

But I don’t know how to embed it in my custom action. When I use it I get this error:

AttributeError: ‘Tracker’ object has no attribute ‘get_full_retrieval_name’