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?