Commit 4f78bb67 by Sai Komuravelli

parse issue in action

parent e5d94077
Showing with 8 additions and 5 deletions
......@@ -102,18 +102,21 @@ class greet_primary_information(FormAction):
def validate_askques(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate askques')
intentname=tracker.events[-1]['parse_data']['intent']['name']
confidence=tracker.events[-1]['parse_data']['intent']['confidence']
print(tracker.events)
#intentname=tracker.events[-1]['parse_data']['intent']['name']
intentname="greet"
#confidence=tracker.events[-1]['parse_data']['intent']['confidence']
confidence= 0.8
slot_to_fill = value.lower()
print("askques")
print(slot_to_fill)
print(value)
if slot_to_fill == "yes":
print('in yes askq')
return {"askques":"yes",'skills':None,"intentname":intentname,"confidence":confidence,"refferals":"empty","mobilenumber":"None","email":"None"}
elif slot_to_fill == "no":
return {"askques":"yes",'skills':None,"intentname":"affirm","confidence":0.8,"refferals":"empty","mobilenumber":"None","email":"None"}
elif slot_to_fill == "no":
print('askques-no')
return {"askques":"no","refferals":None,"intentname":intentname,"confidence":confidence}
return {"askques":"no","refferals":None,"intentname":"deny","confidence":0.8}
else:
print("------------None------------")
return {"askques":None}
......
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