EllaV
EllaV

Reputation: 35

Rasa custom actions not connected

So, I just started with Rasa this week, but I’m quite happy with the results so far, as in that it responds well et cetera. However, I now have custom actions in an actions.py file, but when I’m in the rasa shell it seems to miss that file entirely and asks for another input. (see the image below) It doesn't even give an error. What am I doing wrong?

I tried to run "rasa run actions" in another terminal, with an action_endpoint in the endpoints.yml file.

In the endpoints file:

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

This is the part I'm running in the separate terminal:

`(actions) C:\.potato>python -m rasa_sdk --actions actions
2019-07-11 10:29:16 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
2019-07-11 10:29:17 INFO     rasa_sdk.executor  - Registered function for 'action_validate_cuisine'.
2019-07-11 10:29:17 INFO     rasa_sdk.executor  - Registered function for 'action_search_restaurants'.
2019-07-11 10:29:17 INFO     rasa_sdk.endpoint  - Action endpoint is up and running. on ('0.0.0.0', 5055)`

This is the output in the other terminal:

`(cozmobot) C:\.potato>rasa shell
2019-07-11 10:49:36 INFO     root  - Starting Rasa Core server on http://localhost:5005
Bot loaded. Type a message and press enter (use '/stop' to exit):
Your input ->  Hi!
Hey! What's up?
Your input ->  I'm hungry
What kind of restaurant would you like?
Your input ->  I would like italian
Your input ->  <HERE AN ANSWER SHOULD BE GIVEN BY THE BOT VIA ACTIONS.PY>
Your input ->  /stop
2019-07-11 10:50:19 INFO     root  - Killing Sanic server now.`

The third input should be answered by the bot with a correct restaurant. But for some reason it does not go there, without giving an error, and just asks for another input of the user.

Upvotes: 1

Views: 2654

Answers (1)

Tom Metcalfe
Tom Metcalfe

Reputation: 122

You need to add the --endpoints flag to the command, i.e. run

rasa shell --endpoints endpoints.yml

Upvotes: 1

Related Questions