Set slot

It’s possible set a slot, from user answers?

like this:

*inform{"answers": <user input>}

you can do this in a custom action, see here

for example:

class ActionSaveSlot(Action):
    def run(self, dispatcher, tracker, domain):
        return [SlotSet("answers", tracker.latest_message.text)]
1 Like

Thanks :smiley:

Quick question,

In rasa core = 0.11.2, is “tracker.latest_message.text” still how you access the “text:user_input” key-pair in the dictionary created by “tracker.latest_message”?

Running into some errors passing tracker.latest_message.text through SlotSet, and dispatcher.utter_message

@ahson use this

tracker.latest_message['text']