Hey i’m trying to create a chatbot with RASA in Docker but i can’t use custom action, the bot don’t respond.
I’m running the action server in a Docker container with docker-compose. This is the docker-compose.yml file :
version: '3.0'
services:
action_server:
image: rasa/rasa-sdk:latest
volumes:
- ./actions:/app/actions
And this is my endpoints.yml file :
action_endpoint:
url: "http://action_server:5055/webhook"
To interact with the chatbot, i execute rasa/rasa:latest image Docker with this command :
docker run -it --network="chatbot_rasa_default" -v $(pwd):/app rasa/rasa interactive
But at the moment where the bot should execute the custom action, he said nothing (it’s the same thing when i use rasa shell -vv
cmd):
? Your input -> hey
? Your NLU model classified 'hey' with intent 'greet' and there are no entities, is this correct? Yes
------
Chat History
# Bot You
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
1 action_listen
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
2 hey
intent: greet 0.80
------
? The bot wants to run 'action_hello_world', correct? Yes
------
Chat History
# Bot You
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
1 action_listen
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
2 hey
intent: greet 0.80
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
3 action_hello_world 1.00
------
? The bot wants to run 'action_listen', correct? (Y/n)
The bot sould respond “Hello World !” because it is written in action/action.py file :
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
class ActionHelloWorld(Action):
def name(self):
return "action_hello_world"
def run(self, dispatcher, tracker, domain):
print("Hello")
print("this is tracker",tracker)
dispatcher.utter_message("Hello World!")
return []
But i noticed that the action server logs returned nothing :
[root@vm]# docker-compose up
Creating network "chatbot_rasa_default" with the default driver
Creating chatbot_rasa_action_server_1 ... done
Attaching to chatbot_rasa_action_server_1
action_server_1 | 2019-11-15 10:19:17 INFO rasa_sdk.endpoint - Starting action endpoint server...
action_server_1 | 2019-11-15 10:19:17 INFO rasa_sdk.executor - Registered function for 'action_hello_world'.
action_server_1 | 2019-11-15 10:19:17 INFO rasa_sdk.endpoint - Action endpoint is up and running on http ('0.0.0.0', 5055)
Why the bot didn’t respond “hello world !” ? I missed a step ?