Reputation: 301
I have made workplace on slack and app is registered there from where i get the necessary things like slack token and channel to put it into the credentials.yml file of the rasa. After getting all the credentials i tried to connect between the rasa bot and slack using the command as:
rasa run
and my credentials.yml contains:
slack:
slack_token: "xoxb-****************************************"
slack_channel: "#ghale"
Here i have used the ngrok to expose a web server running on your local machine to the internet
but getting the error :
rasa.nlu.extractors.duckling_http_extractor - Failed to connect to duckling http server. Make sure the duckling server is running and the proper host and port are set in the configuration. More information on how to run the server can be found on github: https://github.com/facebook/duckling#quickstart Error: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /parse (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
Upvotes: 1
Views: 5505
Reputation: 346
If you are doing numerical extractions (e.g. six to 6 etc), I presume this will be helpful for form filling on Rasa - you need to install docker and then expose duckling on port 8000
First, install docker (assumes Fedora but you can lookup other distros)
sudo dnf install docker
Second, activate docker
sudo systemctl start docker
Last, activate Rasa's docker
docker run -p 8000:8000 rasa/duckling
Your response should be - Status: "Downloaded newer image for docker.io/rasa/duckling:latest Listening on http://0.0.0.0:8000"
Upvotes: 0
Reputation: 477
Just to add to @Tobias's answer;
If you are running some other service on port 8000, then you can bind any other port with th container's port and specify that in your pipeline config.
Example:
docker run -p <Desired Port, ex- 1000>:8000 rasa/duckling
Change config file to reflect that. Your pipeline should include
- name: DucklingHTTPExtractor
# https://rasa.com/docs/rasa/nlu/components/#ducklinghttpextractor
url: http://localhost:<Desired Port, 1000>
Retrain your model with changed config. After training, simply run: rasa run
Upvotes: 3
Reputation: 1910
Are you using Duckling? Duckling is a rule-based component to extract entities(docs).
If you are not using it, you can remove it from your NLU pipeline. If you want to use it, the easiest way to do so is using docker:
docker run -p 8000:8000 rasa/duckling
The command above will run duckling and expose it on port 8000
of your host.
Upvotes: 5