How do I update credentials.yml in rasa-rasa-x pod? (Quick-Install)

To enable a REST endpoint, I understand that the channel must be defined in credentials.yml

The credentials.yml file I have checked into GitHub has both the rest and rasa channels defined. My RasaX is integrated with Git and properly syncs training data.

However, if I cat the credentials.yml file inside my rasa-rasa-x pod, only the rasa channel is defined:

Command:

kubectl exec rasa-rasa-x-769649dc9d-5h57t -- cat credentials.yml

Output:

rasa:
  url: http://rasa-rasa-x-rasa-x:5002/api

I see that the correct credentials.yml exists in Git by examining the directory mounted as my persistent volume:

Command:

my-username@rasax-server:/var/lib/rancher/k3s/storage/pvc-477b9e8f-3fae-4f2b-b5a0-a53f0a698699/git/1$ cat credentials.yml

Output:

# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels/
rest:
#  # you don't need to provide anything here - this channel doesn't
#  # require any credentials
#facebook:
#  verify: "<verify>"
#  secret: "<your secret>"
#  page-access-token: "<your page access token>"
#slack:
#  slack_token: "<your slack token>"
#  slack_channel: "<the slack channel>"
# socketio:
#  user_message_evt: user_uttered
#  bot_message_evt: bot_uttered
#  session_persistence: false
#mattermost:
#  url: "https://<mattermost instance>/api/v4"
#  token: "<bot token>"
#  webhook_url: "<callback URL>"
 
# This entry is needed if you are using Rasa X. The entry represents credentials 
# for the Rasa X "channel", i.e. Talk to your bot and Share with guest testers.
rasa:
  url: "http://localhost:5002/api"

How do I modify credentials.yml if I’m unable to do so via Git and it doesn’t appear in any of my persistent volumes?

1 Like

The credentials aren’t loaded from git - they should be loaded directly on your server where you deploy Rasa X. For security reasons, it’s not a good idea to keep complete credentials in git; although if you’re not using any security keys at this point it probably doesn’t matter.

It looks like you deployed Rasa X using k3s; in this case you can read here for how to set additional channel credentials on your server.

1 Like

Thanks for the link – I’ve tried using the ADDITIONAL_CHANNEL_CREDENTIALS environment variable a few times but it did not help. I would set the environment variable before running quick-install, or after installation and then re-running quick-install. Only the “rasa” channel would be in my credentials.

I did have a breakthrough last night, though!

My solution was to create a values.yml file with the following contents:

# rasa: Settings common for all Rasa containers
rasa:
  # additionalChannelCredentials which should be used by Rasa to connect to various
  # input channels
  additionalChannelCredentials:
    rest:
      # nothing needed here
    socketio:
      user_message_evt: user_uttered
      bot_message_evt: bot_uttered
      session_persistence: true/false

I then perform a helm upgrade of my rasa installation with the following command:

helm upgrade \
    --values values.yml \
    --namespace rasa \
    --reuse-values \
    rasa rasa-x/rasa-x

I now see all my expected channels in credentials.yml on my rasa-x pod.

2 Likes

Fantastic! values.yml is the right place to put that, the export is a short cut when using the quick install script. Glad you got it working!

1 Like

@Chris98106 were you able to then interact with a uploaded model in Rasa X directly from a frontend with the widget?

What URL did you use for that?

Thanks.