Commit 579ea647 by Sai Komuravelli

flow changes, issue and statements

parent 8367879b
Showing with 57 additions and 36 deletions
......@@ -43,7 +43,7 @@ class greet_primary_information(FormAction):
tracker.slots["querytext"] = "stop"
return["querytext"]
else:
return["intentname","confidence","querytext" ,"askques","refferals","refferal_yes_info", "email_mobile","email", "mobilenumber", "skills","availabletime"]
return["intentname","confidence","querytext" ,"askques","refferals","skills","jobtype", "email_mobile","email", "mobilenumber","resumeupdate", "availabletime","response"]
def validate_querytext(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
......@@ -69,7 +69,7 @@ class greet_primary_information(FormAction):
print(value)
if slot_to_fill == "yes":
print('in yes askq')
return {"askques":"yes",'email_mobile':None,"intentname":intentname,"confidence":confidence,"refferals":"empty","refferal_yes_info":"None","mobilenumber":"None","email":"None"}
return {"askques":"yes",'skills':None,"intentname":intentname,"confidence":confidence,"refferals":"empty","mobilenumber":"None","email":"None"}
elif slot_to_fill == "no":
print('askques-no')
return {"askques":"no","refferals":None,"intentname":intentname,"confidence":confidence}
......@@ -77,6 +77,7 @@ class greet_primary_information(FormAction):
print("------------None------------")
return {"askques":None}
def validate_email_mobile(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate email_mobile')
slot_to_fill = value.lower()
......@@ -84,25 +85,34 @@ class greet_primary_information(FormAction):
print(slot_to_fill)
mobile_numbers_list=ExtractMobilenumber(slot_to_fill)
email_addresse_list=ExtractEmail(slot_to_fill)
print('email_addresse_list',email_addresse_list)
print('mobile_numbers_list',mobile_numbers_list)
if mobile_numbers_list == [] or email_addresse_list == []:
print('in empty lists')
if mobile_numbers_list ==[] and email_addresse_list != []:
print('ask mobile')
return {"mobilenumber": None, "refferals" : "None","refferal_yes_info" : "None", "email": email_addresse_list, "email_mobile":"None" }
return {"mobilenumber": None, "refferals" : "None","email": email_addresse_list, "email_mobile":"None" }
elif email_addresse_list ==[] and mobile_numbers_list !=[] :
print('ask email')
return {"email": None, "refferals" : "None","refferal_yes_info" : "None" , "mobilenumber" :mobile_numbers_list ,"email_mobile":"None" }
return {"email": None, "refferals" : "None" , "mobilenumber" :mobile_numbers_list ,"email_mobile":"None" }
else:
return {"email_mobile": None }
else:
return {"email_mobile": email_addresse_list + mobile_numbers_list ,"skills":None , "refferals":"None", "email":"None", "mobilenumber":"None"}
return {"email_mobile": email_addresse_list + mobile_numbers_list ,"resumeupdate":None , "refferals":"None", "email":"None", "mobilenumber":"None"}
def validate_email(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate email')
slot_to_fill = value.lower()
print("email_mobile")
print(slot_to_fill)
email_addresse_list=ExtractEmail(slot_to_fill)
print('email_addresse_list',email_addresse_list)
if email_addresse_list == []:
return {"email":None}
else:
return { "refferals" : "None","email": email_addresse_list, "email_mobile":"None"}
def validate_refferals(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate refferals')
......@@ -111,16 +121,23 @@ class greet_primary_information(FormAction):
print(slot_to_fill)
print(value)
if value.lower() in ['yes','yeah','ha','y']:
print('validate_refferals')
return {"email_mobile":"None", "skills":"None","availabletime":"None","mobilenumber":"none","email":"none"}
print('validate_refferals yes')
return {"refferals":"None","response":" Great! Could you please enter the candidate’s name and phone number in our portal http://app.vsoftconsulting.com/aistaffingprod/referral.html ​so one of our recruiters can contact them. Thank you for your time and have a great day.​","email_mobile":"None", "skills":"None","availabletime":"None","mobilenumber":"none","email":"none","jobtype":"None","resumeupdate":"None"}
elif value.lower() in ['no','No','N']:
print('askques-no')
dispatcher.utter_message(template="utter_refferal_no")
return{"response":"Thank you for your time and have a great day. ​", "email_mobile":"","email":"", "mobilenumber":"", "skills":"","availabletime":"","jobtype":"","resumeupdate":""}
else:
print("------------None------------")
return {"refferals":None}
def validate_availabletime(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate_availabletime ')
slot_to_fill = value.lower()
print(slot_to_fill)
print(value)
return {"response":"Thank you for your time. We will contact you as advised. Have a great day​."}
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {
"askques": [self.from_intent(intent=["affirm"],value="yes"),self.from_intent(intent=["deny"],value="no"),self.from_text()],
......@@ -130,7 +147,8 @@ 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()],
"refferal_yes_info":self.from_text()
"resumeupdate": self.from_text(),
"jobtype": self.from_text()
}
def submit(
......@@ -151,6 +169,6 @@ class ResetSlot(Action):
return "action_reset"
def run(self, dispatcher, tracker, domain):
return [SlotSet("email_mobile", None),SlotSet("email", None),SlotSet("mobilenumber", None),SlotSet("refferals", None), SlotSet("refferal_yes_info", 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("jobtype", None),SlotSet("resumeupdate", 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")]
#SlotSet("copeup","empty"),SlotSet("sources","empty"), SlotSet("concern","empty"),SlotSet("pressingconcerns","empty"),SlotSet("items","empty"),SlotSet("purchase","empty"),SlotSet("fmembers","empty"),SlotSet("socialmedia","empty"),SlotSet("assistance","empty"),SlotSet("mobilenumber","empty"),
......@@ -26,7 +26,9 @@ entities:
- refferals
- email
- mobilenumber
- response
- jobtype
- resumeupdate
forms:
- greet_primary_information_form
......@@ -65,6 +67,14 @@ slots:
mobilenumber:
type: unfeaturized
response:
type: unfeaturized
jobtype:
type: unfeaturized
resumeupdate:
type: unfeaturized
availabletime:
......@@ -95,19 +105,16 @@ templates:
availabletime: '{availabletime}'
response: "Thank you"
# utter_ask_email_mobile:
# - custom:
# text: "Please enter your email and mobile number?"
utter_ask_askques:
- custom:
text: "Hi. This is VERA from V-Soft Consulting Inc (link https://www.vsoftconsulting.com/). I may help you in finding your Ideal job or new project. Would you like to hear more? Please say yes/no​"
text: "This is VERA from V-Soft Consulting Inc (https://www.vsoftconsulting.com ). May I help you in finding your Ideal job or new project ? Please say YES/NO​"
utter_ask_availabletime:
- custom:
text: "Great! please let us know the most preferred date and time to schedule a call with a recruiter.  "
text: "Great! please let us know the most preferred date and time(mm/dd/yyyy hh:mm am/pm) to schedule a call with a recruiter."
utter_ask_refferals:
- custom:
text: "Thank you . It looks like you are not interested in the job opportunities now, but you can search for your ideal job at https://www.vsoftconsulting.com/career-portal/ . Would you like to refer someone who is in the job market? Yes/no​"
text: "Thank you . It looks like you are not interested in the job opportunities now, but you can search for your ideal job at https://www.vsoftconsulting.com/career-portal/ . Would you like to refer someone who is in the job market? YES/NO​"
utter_deny:
- custom:
text: "0"
......@@ -128,6 +135,13 @@ templates:
utter_ask_email:
- custom:
text: "Please enter your updated email address ?"
utter_ask_jobtype:
- custom:
text: "Are you interested in Full time/Contract jobs or in either?"
utter_ask_resumeupdate:
- custom:
text: "Thank you, we are almost finished. You can update your latest resume in our portal http://app.vsoftconsulting.com/aistaffingprod/uploadresume.html and say “YES” or you can say “NO”"
utter_ask_email_mobile:
......@@ -136,7 +150,7 @@ templates:
utter_ask_skills:
- custom:
text: "Thank you, we are almost finished. Could you please update your resume in our portal http://app.vsoftconsulting.com/aistaffingprod/uploadresume.html and reply “Yes” or Please enter top 5 technical skills?​​"
text: "Before we connect you to one of our recruiters, we would like to ask you few questions. What are your top 3-5 technical skills"
utter_slots_greet_primary_information:
- custom:
......@@ -144,9 +158,10 @@ templates:
skills: '{skills}'
email: '{email}'
mobilenumber : '{mobilenumber}'
refferal_yes_info: '{refferal_yes_info}'
response: "Thankyou. We will contact you as advised. Good Bye"
response: '{response}'
jobtype: '{jobtype}'
text: "1"
resumeupdate: '{resumeupdate}'
availabletime: '{availabletime}'
utter_stop:
......@@ -156,25 +171,13 @@ templates:
utter_default:
- custom:
text: "Sorry. I didn't get. Can you please rephrase it."
utter_goodbye:
- custom:
text: "Bye"
utter_refferal_no:
- custom:
text: "Thank you."
utter_ask_refferal_yes_info:
- custom:
text: "Great! Could you please enter the candidate’s name and phone number in our portal http://app.vsoftconsulting.com/aistaffingprod/referral.html ​so one of our recruiters can contact them. Thank you."
# utter_greet:
# - custom:
# text: "Hi, This is VERA from V-Soft Consulting Inc(https://www.vsoftconsulting.com/). I may help you in finding your new dream job or new project? Would you like to hear more? yes or no ​"
utter_welcome:
- custom:
text: "Hi. This is VERA from V-Soft Consulting Inc (link https://www.vsoftconsulting.com/). I may help you in finding your Ideal job or new project. Would you like to hear more? Please say yes/no​"
text: "Hi. This is VERA from V-Soft Consulting Inc (https://www.vsoftconsulting.com/). I may help you in finding your Ideal job or new project. Would you like to hear more? Please say YES/NO​"
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