Custom Actions Not Working. How to integrate the custom Actions

Hi All, I am stuck in custom actions it not working particularly

class ProductDetails(Action): def name(self): return (‘action_pdetails’)

def run(self, dispatcher, tracker, domain):
		#curl =requests.get("http://localhost:5000/webhook/sms/demosendsms/")
		pro = tracker.get_slot("pdetail")
		#current = curl.get(q=pro)
		details= pro['pdetail']
		response = """The Product Details are {}""".format(details)
		return [SlotSet('details', pro)]

where is the mistake? Help

@erohmensing @Juste @juste_petr @akelad

Find this error

Failed to run custom action ‘action_pdetails’. Action server responded with a non 200 status code of 500. Make sure your action server properly runs actions and returns a 200 once the action is executed. Error: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook 2019-05-27 11:52:30 ERROR rasa_core.processor - Encountered an exception while running action ‘action_pdetails’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.

Hi @er.aks31! If you have not stood up your action server, you will want to do that. Make sure to run pip install rasa-sdk, if you have not already done this. Then, please make sure you have specifed in endpoints.yml that your action sever uses:

  url: "http://localhost:5055/webhook"

Finally, you can run rasa run actions in a seperate window, while you are running rasa. You will find more information here and here. Please let me know if this did not solve your issue!


Yeah, It’s Working Thanks. but I found a new thing How to revoke the conversation? as the example, if multiple users did conversation with model and one of user busy for 5-6 hours and after that, he again starts the conversation where he left the conversation So how we revoke the conversation that time and how to take input for revoke conversation? You have Any Idea… How to solve this issue… I need this… @tyd Help