Problem:- I have pincode.txt file and I want to serach in this file that user give input pincode. Means I can’t hard code all pincodes in entity or slots. Possible solutions I have tried or think for this : 1> Use lookup table for that but Don’t know how to do it , means how to utter message when pincode not in my lookup table 2> Use custom action for that but not able to extract entity. So, anybody can help me out from this . here are releated flies that I have made
- pincode slots: pincode: type: text
class Actionpincode(Action): def name(self): return “action_pincode”
def run(self, dispatcher, tracker, domain): path = '/home/saurbh/Desktop/intern/my_project/rasa/pincode.txt' pincode_file = open(path,'r') pin = tracker.get_slot('pincode') global flag flag=0 for i in pincode_file: print(i) if i==pin: flag=1 pincode_file.close() if flag==1: dispatcher.utter_message("yes") return  else : dispatcher.utter_message("no") return 
Payme India, your app is not accepting my pincode?
I am not able to update my Pincode.
Your app is not allowing me to update my pincode?