Commit e602a42d by Surya Narayana

Replace actions.py

parent d33c85c0
Showing with 4 additions and 5 deletions
......@@ -88,7 +88,7 @@ class greet_primary_information(FormAction):
tracker.slots["querytext"] = "stop"
return["querytext"]
else:
return["intentname","confidence","querytext" ,"askques","refferals","skills","jobtype", "email_mobile","email", "mobilenumber", "availabletime","response"]
return["intentname","confidence","querytext" ,"askques","refferals","skills", "email_mobile","email", "mobilenumber", "availabletime","response"]
def validate_querytext(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
......@@ -154,11 +154,11 @@ class greet_primary_information(FormAction):
print(value)
if value.lower() in ['yes','yeah','ha','y']:
print('validate_refferals yes')
return {"refferals":"None","response":"Great! Please enter the candidate’s name and phone number in our portal http://app.vsoftconsulting.com/aistaffingprod/referral.html ​with your reference number. Thank you for your time and Have a great day.","email_mobile":"None", "skills":"None","availabletime":"None","mobilenumber":"none","email":"none","jobtype":"None"}
return {"refferals":"None","response":"Great! Please enter the candidate’s name and phone number in our portal http://app.vsoftconsulting.com/aistaffingprod/referral.html ​with your reference number. Thank you for your time and Have a great day.","email_mobile":"None", "skills":"None","availabletime":"None","mobilenumber":"none","email":"none"}
elif value.lower() in ['no','No','N']:
print('askques-no')
return{"response":"Thank you for your time. Please reach out to recruiter@vsoftconsulting.com with your reference number if you have any questions. Have a great day.", "email_mobile":"","email":"", "mobilenumber":"", "skills":"","availabletime":"","jobtype":""}
return{"response":"Thank you for your time. Please reach out to recruiter@vsoftconsulting.com with your reference number if you have any questions. Have a great day.", "email_mobile":"","email":"", "mobilenumber":"", "skills":"","availabletime":""}
else:
print("------------None------------")
return {"refferals":None}
......@@ -214,7 +214,6 @@ class greet_primary_information(FormAction):
"skills": self.from_text(),
"availabletime": self.from_text(),
"refferals":[self.from_intent(intent=["affirm"],value="yes"),self.from_intent(intent=["deny"],value="no"),self.from_text()],
"jobtype": self.from_text()
}
def submit(
......@@ -235,5 +234,5 @@ class ResetSlot(Action):
return "action_reset"
def run(self, dispatcher, tracker, domain):
return [SlotSet("email_mobile", None),SlotSet("jobtype", None), SlotSet("email", None),SlotSet("mobilenumber", None),SlotSet("refferals", None),SlotSet("intentname","empty"),SlotSet("confidence",None), SlotSet("skills",None), SlotSet("askques",None),SlotSet("availabletime",None),SlotSet("querytext","empty")]
return [SlotSet("email_mobile", None),SlotSet("email", None),SlotSet("mobilenumber", None),SlotSet("refferals", None),SlotSet("intentname","empty"),SlotSet("confidence",None), SlotSet("skills",None), SlotSet("askques",None),SlotSet("availabletime",None),SlotSet("querytext","empty")]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment