Rasa Workers

Type: NLP Worker

A Rasa worker takes user input and sends it to a ServisBOT RaaS (hosted rasa) bot for natural language processing. A Rasa worker can be created through the CLI.

Rasa fields

  • rasaURL: ServisBOT can provide a hosted version of Rasa for organizations, eliminating the level of effort required to get up and running with Rasa. Contact your customer support rep to get started with Rasa.
  • type:
    • Webhook - is a default rasa bot hosted by ServisBOT customers outside of our architecture. A rasa worker that uses this type will receive responses sent directly from the rasa server, as there is no support for Botnet Actions when using this rasa worker type.
    • ThinBot - is part of our hosted RASA offering
    • NluWebhook - is a rasa worker which uses the Rasas NLU engine to get intent detection results rather than a bot response from Rasa. This type of rasa worker only supports running Botnet Actions, as the NLU Rasa endpoint does not supply a text response to respond to the user with. If an intent is detected, the Botnet Actions associated with the detected intent will be run.
    • Hybrid - uses both the Rasa NLU engine to get intent detection results from Rasa as well as the Rasa bot response. This type of rasa worker will run Botnet Actions if the detected intent has ServisBOT actions associated with it. If the detected intent does not have any actions associated with it, but there is a response from Rasa, the response from Rasa will be returned.
  • botName: botname should correspond to the bot name expected by your Rasa model.
  • NluConfidenceThresholdOverride [Optional] You can use this as an override of the returned detected intent confidence. If this value is higher than that returned from the nlu provider it will change the response to be a fallback, this value defaults to 0.

Creating Rasa worker through cli

Using RaaS to host your Rasa Model

ServisBOT allows you to sync your rasa worker to RaaS which will host your rasa model for you. See here for more details about RaaS https://raas.ai/.

To create a worker which can be synced to RaaS do the following:

  • Contact ServisBOT for some RaaS credentials, these credentials will be an email and password used for logging into RaaS.
  • Create a ServisBOT secret of type Custom JSON with the following format:
{
	"email": "raasuser@raas.com",
	"password": "some-raas-password"
}
  • Take note of the secret srn this will be needed later on for the worker configuration.
  • Update your worker configuration to be the following and replace with the secret srn for your RaaS credentials that were created in the previous step.
{
  "Data": {
    "NluConfiguration": {
      "Secret": "SRN:::HERE",
      "RasaUrl": "https://c1cmxu90x5.execute-api.us-east-1.amazonaws.com/v1",
      "NluConfidenceThresholdOverride": 0.8
    },
    "NluType": "Rasa"
  },
  "Organization": "ORGANIZATION",
  "Config": {
    "Avatar": "default-bot"
  },
  "Enabled": true,
  "Updated": 1608652074324,
  "Description": "A Lex worker",
  "Id": "4685b16c-a305-4b0c-b33d-8ae12b81ff9a",
  "Type": "nlp-worker",
  "Name": "RasaNlpWorker",
  "Created": 1608652074324,
  "Status": "published",
  "Srn": "srn:botnet:REGION:ORGANIZATION:worker:4685b16c-a305-4b0c-b33d-8ae12b81ff9a"
}
  • Save your worker and publish your bot.
  • Once the bot has been published and it has been successfully synced to RaaS, your worker configuration will be updated with the RaaS endpoint and api key to use when invoking our model.
  • The following worker configuration shows what your Rasa worker configuration will look like after it has been synced to the RaaS hosting service.
{
  "Data": {

  },
  "Organization": "ORGANIZATION",
  "Config": {
    "Avatar": "default-bot"
  },
  "Enabled": true,
  "Updated": 1608652074324,
  "Description": "A Lex worker",
  "Id": "4685b16c-a305-4b0c-b33d-8ae12b81ff9a",
  "Type": "nlp-worker",
  "Name": "RasaNlpWorker",
  "Created": 1608652074324,
  "Status": "published",
  "Srn": "srn:botnet:REGION:ORGANIZATION:worker:4685b16c-a305-4b0c-b33d-8ae12b81ff9a"
}
  • The rasaUrl has been updated and set to the hosting url provided by RaaS hosting service.
  • The rasaQueryParams has been updated with a new token attribute which references a ServisBOT secret containing the api key to use when communicating with RaaS.
  • You can now test your bot via messenger to test inference against your Rasa model that is hosted by RaaS.