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): ...@@ -43,7 +43,7 @@ class greet_primary_information(FormAction):
tracker.slots["querytext"] = "stop" tracker.slots["querytext"] = "stop"
return["querytext"] return["querytext"]
else: 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]: 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): ...@@ -69,7 +69,7 @@ class greet_primary_information(FormAction):
print(value) print(value)
if slot_to_fill == "yes": if slot_to_fill == "yes":
print('in yes askq') 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": elif slot_to_fill == "no":
print('askques-no') print('askques-no')
return {"askques":"no","refferals":None,"intentname":intentname,"confidence":confidence} return {"askques":"no","refferals":None,"intentname":intentname,"confidence":confidence}
...@@ -77,6 +77,7 @@ class greet_primary_information(FormAction): ...@@ -77,6 +77,7 @@ class greet_primary_information(FormAction):
print("------------None------------") print("------------None------------")
return {"askques":None} return {"askques":None}
def validate_email_mobile(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]: def validate_email_mobile(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate email_mobile') print('in validate email_mobile')
slot_to_fill = value.lower() slot_to_fill = value.lower()
...@@ -84,25 +85,34 @@ class greet_primary_information(FormAction): ...@@ -84,25 +85,34 @@ class greet_primary_information(FormAction):
print(slot_to_fill) print(slot_to_fill)
mobile_numbers_list=ExtractMobilenumber(slot_to_fill) mobile_numbers_list=ExtractMobilenumber(slot_to_fill)
email_addresse_list=ExtractEmail(slot_to_fill) email_addresse_list=ExtractEmail(slot_to_fill)
print('email_addresse_list',email_addresse_list) print('email_addresse_list',email_addresse_list)
print('mobile_numbers_list',mobile_numbers_list) print('mobile_numbers_list',mobile_numbers_list)
if mobile_numbers_list == [] or email_addresse_list == []: if mobile_numbers_list == [] or email_addresse_list == []:
print('in empty lists') print('in empty lists')
if mobile_numbers_list ==[] and email_addresse_list != []: if mobile_numbers_list ==[] and email_addresse_list != []:
print('ask mobile') 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 !=[] : elif email_addresse_list ==[] and mobile_numbers_list !=[] :
print('ask email') 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: else:
return {"email_mobile": None } return {"email_mobile": None }
else: 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]: def validate_refferals(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate refferals') print('in validate refferals')
...@@ -111,16 +121,23 @@ class greet_primary_information(FormAction): ...@@ -111,16 +121,23 @@ class greet_primary_information(FormAction):
print(slot_to_fill) print(slot_to_fill)
print(value) print(value)
if value.lower() in ['yes','yeah','ha','y']: if value.lower() in ['yes','yeah','ha','y']:
print('validate_refferals') print('validate_refferals yes')
return {"email_mobile":"None", "skills":"None","availabletime":"None","mobilenumber":"none","email":"none"} 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']: elif value.lower() in ['no','No','N']:
print('askques-no') 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: else:
print("------------None------------") print("------------None------------")
return {"refferals":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]]]: def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return { return {
"askques": [self.from_intent(intent=["affirm"],value="yes"),self.from_intent(intent=["deny"],value="no"),self.from_text()], "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): ...@@ -130,7 +147,8 @@ class greet_primary_information(FormAction):
"skills": self.from_text(), "skills": self.from_text(),
"availabletime": 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()], "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( def submit(
...@@ -151,6 +169,6 @@ class ResetSlot(Action): ...@@ -151,6 +169,6 @@ class ResetSlot(Action):
return "action_reset" return "action_reset"
def run(self, dispatcher, tracker, domain): 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"), #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: ...@@ -26,7 +26,9 @@ entities:
- refferals - refferals
- email - email
- mobilenumber - mobilenumber
- response
- jobtype
- resumeupdate
forms: forms:
- greet_primary_information_form - greet_primary_information_form
...@@ -65,6 +67,14 @@ slots: ...@@ -65,6 +67,14 @@ slots:
mobilenumber: mobilenumber:
type: unfeaturized type: unfeaturized
response:
type: unfeaturized
jobtype:
type: unfeaturized
resumeupdate:
type: unfeaturized
availabletime: availabletime:
...@@ -95,19 +105,16 @@ templates: ...@@ -95,19 +105,16 @@ templates:
availabletime: '{availabletime}' availabletime: '{availabletime}'
response: "Thank you" response: "Thank you"
# utter_ask_email_mobile:
# - custom:
# text: "Please enter your email and mobile number?"
utter_ask_askques: utter_ask_askques:
- custom: - 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: utter_ask_availabletime:
- custom: - 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: utter_ask_refferals:
- custom: - 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: utter_deny:
- custom: - custom:
text: "0" text: "0"
...@@ -128,6 +135,13 @@ templates: ...@@ -128,6 +135,13 @@ templates:
utter_ask_email: utter_ask_email:
- custom: - custom:
text: "Please enter your updated email address ?" 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: utter_ask_email_mobile:
...@@ -136,7 +150,7 @@ templates: ...@@ -136,7 +150,7 @@ templates:
utter_ask_skills: utter_ask_skills:
- custom: - 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: utter_slots_greet_primary_information:
- custom: - custom:
...@@ -144,9 +158,10 @@ templates: ...@@ -144,9 +158,10 @@ templates:
skills: '{skills}' skills: '{skills}'
email: '{email}' email: '{email}'
mobilenumber : '{mobilenumber}' mobilenumber : '{mobilenumber}'
refferal_yes_info: '{refferal_yes_info}' response: '{response}'
response: "Thankyou. We will contact you as advised. Good Bye" jobtype: '{jobtype}'
text: "1" text: "1"
resumeupdate: '{resumeupdate}'
availabletime: '{availabletime}' availabletime: '{availabletime}'
utter_stop: utter_stop:
...@@ -156,25 +171,13 @@ templates: ...@@ -156,25 +171,13 @@ templates:
utter_default: utter_default:
- custom: - custom:
text: "Sorry. I didn't get. Can you please rephrase it." text: "Sorry. I didn't get. Can you please rephrase it."
utter_goodbye: utter_goodbye:
- custom: - custom:
text: "Bye" 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: utter_welcome:
- custom: - 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