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.
The worker configuration for Rasa worker with type Webhook
is as follows
{
"Data": {
"rasaUrl": "http://<DOMAIN>/webhooks/rest/webhook",
"botName": "rasa-botname",
"type": "Webhook",
"SlashCommands": {
"/welcome": [{
"type": "content",
"value": "welcomewithname"
},
{
//Another valid botnet action
}
]
}
},
"Organization": "my-org",
"Config": {},
"Enabled": true,
"Description": "Bot description",
"Type": "rasa-worker",
"Name": "Servisbotname",
"Status": "published"
}
Where <DOMAIN>
is the domain of your rasa server.
The worker configuration for Rasa worker with type NluWebhook
is as follows
{
"Data": {
"rasaUrl": "http://<DOMAIN>/model/parse",
"botName": "rasa-botname",
"type": "NluWebhook"
},
"Organization": "my-org",
"Config": {},
"Enabled": true,
"Description": "Bot description",
"Type": "rasa-worker",
"Name": "Servisbotname",
"Status": "published"
}
The worker configuration for Rasa worker with type Hybrid
is as follows
{
"Data": {
"rasaUrl": "http://<DOMAIN>/model/parse",
"type": "Hybrid"
},
"Organization": "my-org",
"Config": {},
"Enabled": true,
"Description": "Bot description",
"Type": "rasa-worker",
"Name": "Servisbotname",
"Status": "published"
}
Where <DOMAIN>
specified in each worker config is the domain of the rasa server.
Save worker json to a file and create a worker using the cli command sb-cli worker create file.json
Once you have created the worker using the CLI, it will return an ID for you. You need to then update/create a bot and place the worker at the top with this id and the type of rasa-worker
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:
{
"email": "raasuser@raas.com",
"password": "some-raas-password"
}
{
"Data": {
"secret": "<raas-secret-srn>",
"type": "Hybrid"
},
"Organization": "my-org",
"Config": {},
"Enabled": true,
"Description": "Bot description",
"Type": "rasa-worker",
"Name": "Servisbotname",
"Status": "published"
}
{
"Data": {
"secret": "<raas-secret-srn>",
"type": "Hybrid",
"rasaUrl": "https://some-raas-base-url/v1",
"rasaQueryParams": {
"token": "<raas-api-key-secret-srn"
}
},
"Organization": "my-org",
"Config": {},
"Enabled": true,
"Description": "Bot description",
"Type": "rasa-worker",
"Name": "Servisbotname",
"Status": "published"
}
Once you have your bot with a worker set up. Train your Rasa model locally and load it into the platform. If ServisBOT Rasa is enabled you will be able to run the following commands:
sb-cli ml-model upload <bot> <type> <file>
To see a list of models uploaded to your organization run the following:
sb-cli ml-model list <bot> [type]
To delete a rasa model:
sb-cli ml-model delete <srn>