Rasa - Helm Deployment Default Run Command - [Deprecated] Rasa X Community Edition - Rasa Community Forum
👋 Introducing the Rasa Playground
Rasa - Helm Deployment Default Run Command
post by fabrice-toussaint on Nov 19, 2020
Hi,
I have a question regarding the Rasa X Helm chart ( GitHub - RasaHQ/rasa-x-helm: Rasa X Helm chart for deploying on Kubernetes (K8s) and OpenShift.). I want to enable my HTTP API ( Rasa Open Source HTTP API) but I was wondering how I can specify this using the Helm chart.
I thank you in advance!
post by tczekajlo on Nov 19, 2020
Hi,
In the docs Helm Chart Installation, you can find how to access the Rasa X deployment. If you wanna reach the Rasa Open Source HTTP API directly, you can do this by using the /core path in your HTTP request, for example:
curl -s http://<ip>:8000/core/version
{
"version": "2.0.3",
"minimum_compatible_version": "2.0.0"
}
post by fabrice-toussaint on Nov 19, 2020
Thank you @tczekajlo, I should have been more precise on what I meant. I want to access the rest webhook in order to send a message to the bot and get its response back. However, it throws a 404 error when I try to access it (through port 8000, 5002 and 5005). My IP checks out but I was wondering if I need to enable something in order to do this.
post by tczekajlo on Nov 19, 2020
According to the docs you have to enable the REST channel Your Own Website. For the helm chart, you can do this by setting ROS Channels, it is described here Customize Your Deployment
For example:
values.yaml for helm
rasa:
additionalChannelCredentials:
rest:
or directly by using the helm command, e.g.
helm upgrade --set rasa.additionalChannelCredentials.rest={} rasa-x rasa-x/rasa-x
After the REST channel is enabled you can reach it by http://<ip>:8000/webhooks/rest/webhook
post by fabrice-toussaint on Nov 19, 2020
Hi @tczekajlo, again thank you for your help! I adjusted this in the values.yaml (and restarted everything). Then I uploaded a model using the API but when I try to access the webhook I get a 404 response. Do you have any suggestions for this as well?
EDIT: Rasa X is not working properly when I want to talk to my bot as well, I created a new issue for this here: Rasa X - Intent gets set to input. Do you think this might have to do with the above question as well?
post by tczekajlo on Nov 19, 2020
Hi @tczekajlo, again thank you for your help! I adjusted this in the values.yaml (and restarted everything). Then I uploaded a model using the API but when I try to access the webhook I get a 404 response. Do you have any suggestions for this as well?
As you can find here Your Own Website
After making the
restinput channel available, you canPOSTmessages tohttp://<host>:<port>/webhooks/rest/webhook, with the following format:
Did you send a POST request?
for example:
curl -s -X POST http://<IP>:8000/webhooks/rest/webhook -d '{ "sender": "test_user", "message": "Hi!"}'
post by fabrice-toussaint on Nov 19, 2020
I made a mistake in my URL, I am testing it now, to see if it works.
post by fabrice-toussaint on Nov 19, 2020
import requests
r = requests.post('http://<IP>:8000/webhooks/rest/webhook', json={"sender": "user", "message": "test"})
print(r)
This is the code I run (with my IP filled in) but I am still getting a 404 error (after uploading the model). Do you know why this is happening…? Thanks again!
The error states that: Requested URL /webhooks/rest/webhook not found
This is my values.yml rasa setup:
post by tczekajlo on Nov 20, 2020
Why do you override the command (rasa.command)?
Can you provide a command that you used to apply your changes?
Additionally, you can check if your changes are applied by using the command helm get values rasa-x
post by fabrice-toussaint on Nov 20, 2020
@tczekajlo I thought that was necessary to enable the API (as stated in the docs).
Furthermore, I use this command:
helm upgrade --set rasa.additionalChannelCredentials.rest={}<RELEASE_NAME> -n <NAMESPACE_NAME> rasa-x/rasa-x
With release_name & namespace_name filled in. When I then check the applied changes command I get this overview:
USER-SUPPLIED VALUES:
rasa:
additionalChannelCredentials:
rest:
- ""
post by fabrice-toussaint on Nov 20, 2020
My pod overview output now looks like this:
post by fabrice-toussaint on Nov 20, 2020
@tczekajlo I got it working! Removing that run command seemed to fix it :/. Sorry for bothering you with this and thanks for your help!
post by tczekajlo on Nov 21, 2020
Cool! The command value for the helm chart shouldn’t be overridden
post by ria.pinjani on Feb 28, 2021
hey @fabrice-toussaint i was facing the same issue as you. I have the exact same pod overview as the screenshot above. Does this fix itself in some time? Right now the http api does not work.