How to get slot value anywhere in the code

I want to get the value from a slot somewhere in my code that is not an action, I want to get it as soon as it has some value, I only have my agent, so I thought something like agent.tracker_store.get_slot() but I don’t know how to trigger this get only when the value is set. I am using agent.handle_message to manage the conversation and it has to continue that way.

Rasa Core: 10.1 Rasa NLU: 12.3

Cheers

Álvaro

first do this import from rasa_core.events import SlotSet

and then call get slot method from tracker class

tracker.get_slot(’##########’) your slot name

1 Like

I don’t have the tracker and it seems that agent.tracker_store.get_slot() soesn’t work :pensive:

You have to get tracker for your sender_id

agent.tracker_store.get_or_create_tracker(sender_id).get_slot()

Thanks for the reply I finally did it with the interpreter.parse method to get the entities and their values

may get that code??