Commit 1c8038f6 by Ravi Teja

no issue fixed

parent 11adf58a
Showing with 29 additions and 9 deletions
...@@ -60,15 +60,16 @@ class Primary_information(FormAction): ...@@ -60,15 +60,16 @@ class Primary_information(FormAction):
print('intent',intent) print('intent',intent)
print('conf',conf) print('conf',conf)
#if intent == "affirm" : #if intent == "affirm" :
if intent != "deny" : # if intent == "affirm" and conf>0.4 :
print("IN from deny") # print("IN from deny")
#tracker.slots["querytext"] = "no" # #tracker.slots["querytext"] = "no"
return["intentname","confidence","querytext","askques", "email", "mobilenumber", "company","experience", "skills","availabletime"] return["intentname","confidence","querytext","askques", "email", "mobilenumber", "company","experience", "skills","availabletime"]
else: # else:
print("IN from deny1") # print("IN from deny1")
tracker.slots["querytext"] = "no" # tracker.slots["querytext"] = "no"
return["availabletime"] # return["availabletime"]
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]:
print("------------------------") print("------------------------")
#print(tracker.events) #print(tracker.events)
...@@ -87,6 +88,25 @@ class Primary_information(FormAction): ...@@ -87,6 +88,25 @@ class Primary_information(FormAction):
break break
print('44444444') print('44444444')
return {"querytext":querytext,"intentname":intentname,"confidence":confidence} return {"querytext":querytext,"intentname":intentname,"confidence":confidence}
def validate_askques(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
slot_to_fill = value.lower()
print("AAA")
print(slot_to_fill)
if slot_to_fill == "yes":
print("-----------YES in kb-----------------")
#print(tracker.get_slot('greathelp'))
return {"email":None, "mobilenumber":None, "company":None,"experience":None, "skills":None,"availabletime":None}
# return {"CREATE_IMPACT":"empty","sysid":"none","kbarticles":"Yes"}
elif slot_to_fill == "no":
print("-----------No-----------------")
# print(tracker.get_slot('submit_ticket'))
return { "email":"none", "mobilenumber":"none", "company":"none","experience":"none", "skills":"none","availabletime":None}
# return {"kbarticles":"No"}
else:
print("------------None------------")
return {"hrarticles":None}
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]: def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return { return {
......
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