Problem with actions

Hi, I installed rasa with anaconda. (pip install rasa) inside anaconda env. I was able to train a simple model and run it with rasa shell. Next thing I did was create a action. On my NLU is a intent (intent:code) with something like this --> intent:code

  • my code is [123] (code)
  • code is [234] (code)
  • [345] (code) On my stories there’s a path like this --> *greet
  • utter_greet
  • utter_ask_code *code
  • action_verify_code On my domain besides the intents and responses there is an actions, a entities and a slots that look like this --> actions:
  • utter_greet
  • utter_ask_code
  • action_verify_code entities:
  • code slots:
  • code: type: text

On my actions.py there are 2 classes, one that I built myself and connects to a remote database. I tested in a separate file inside the project folder named conn.py and it works (it gets a name corresponding to a code). So I put the class before the Class ActionVerifyCode(Actions)

class ActionVerifyCode(Action):

def name(self) -> Text:
	return "action_verify_code"

def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
	n_code = str(tracker.get_slot("code"))    
	results = call_to_my_other_class
	if (results == []):
		dispatcher.utter_message(text="Code no found")
	else:
		dispatcher.utter_message(text="Hello, {}".format(str(results[0][0]))) 

	return []

After that I ran I in terminal rasa run actions trained my bot and ran rasa shell on another terminal When it was time to perform the action_verify_code. It said that The model predicted the custom action ‘action_verify_code’, but you didn’t configure an endpoint to run this custom action.

How can I solve this? Also I’m testing it locally, but I will deploy it in a server on google cloud. The basic model it’s working there and I’m connected to my github. I configured there a docker-compose.override.yml like instructed in the rasa youtube channel. Do I have to do anything else there?

Thanks

I got what was wrong. I didn’t “uncommented” the endpoits in endpoits.yml

1 Like