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): ...@@ -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]: def validate_askques(self,value:Text,dispatcher: CollectingDispatcher,tracker: Tracker,domain: Dict[Text, Any],) -> Dict[Text, Any]:
print('in validate askques') print('in validate askques')
intentname=tracker.events[-1]['parse_data']['intent']['name'] print(tracker.events)
confidence=tracker.events[-1]['parse_data']['intent']['confidence'] #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() slot_to_fill = value.lower()
print("askques") print("askques")
print(slot_to_fill) print(slot_to_fill)
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",'skills':None,"intentname":intentname,"confidence":confidence,"refferals":"empty","mobilenumber":"None","email":"None"} return {"askques":"yes",'skills':None,"intentname":"affirm","confidence":0.8,"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":"deny","confidence":0.8}
else: else:
print("------------None------------") print("------------None------------")
return {"askques":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