Store slot value in python variable

I have a slot named mailid. I want to store the value of mailid slot in a python variable inside def run. Please help if any one knows

Try this to get the slot value into your python program mailid = tracker.get_slot(“mailid”)

1 Like

Hello @somit1234!

In the following method, obtain a list of intentions, along with their probability of occurrence. This list is sent to view for viewing by the developer (in debug mode):

class ActionDepuracion(Action):
    def name(self):
        return 'action_depuracion'
    def run(self, dispatcher, tracker, domain):
        comentario = ""
        entidades = ""
        respuesta = tracker.latest_message.get('entities', [])
        for registro in respuesta:
            entidades = "{}<b>{}</b> = {}<br />".format(entidades, registro.get("entity"), registro.get("value"))
        comentario = "{} {}".format(comentario, entidades)
        dispatcher.utter_message(comentario)
        return []
1 Like