Rasa - Helm Deployment Default Run Command

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! :smiley:

@tmbo this is your department right? :stuck_out_tongue: or is it @tczekajlo?

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"
}

Thank you @tczekajlo, I should have been more precise on what I ment. I want to access the rest webhook in order to sent 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.

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

1 Like

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 responses. 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?

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 responses. Do you have any suggestions for this as well?

As you can find here Your Own Website

After making the rest input channel available, you can POST messages to http://<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!"}'

I made a mistake in my URL, I am testing it now, to see if it works.

@tczekajlo

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:

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

@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:
    - ""

My pod overview output now looks like this:

@tczekajlo I got it working! Removing that run command seemed to fix it :/. Sorry for bothering you with this and thanks for your help!

Cool! The command value for the helm chart shouldn’t be overridden :slight_smile:

1 Like

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.