Can we set a hard code string from customs actions to a slot?

rasa-core

(Nikhil Bansal) #1

Hi,

Is there a way so that i can set a static value / string from actions to a slot without any entity extraction? I am doing it like this on my custom actions

class ActionResetPass(Action): def name(self):

return ‘next_action_ask_user_empID’

def run(self, dispatcher, tracker, domain):

      app_post_action = tracker.get_slot('app_post_action')
  

  response = 'Please enter your employee id '

  				
  dispatcher.utter_message(response)
  return [SlotSet('app_post_action','Listen_User')]

is it possible or not? i have my slot type text


(Akela Drissner) #2

yes you can set the slot to what ever you want


(Nikhil Bansal) #3

but it is showing null value


(Nikhil Bansal) #4

the above implementation is showing me null on my json response


(Akela Drissner) #5

Can you show the json response?


(Nikhil Bansal) #6

no sorry i have updated my rasa stack and i cannot locally reproduce the issue right now probably stuck on some config error may be