Opsdroid Rasa Simple Respond is a bot that will simply respond with a randomly chosen phrase when rasa detects an intent.
Go to file
TechieDamien 2c0f2530a7 Added basic callback support 2021-11-12 12:28:05 +00:00
LICENSE Initial commit 2021-11-03 11:39:07 +00:00
README.md Initial Commit 2021-11-03 11:57:55 +00:00
__init__.py Added basic callback support 2021-11-12 12:28:05 +00:00

README.md

Opsdroid-RasaSR

Opsdroid Rasa Simple Respond is a bot that will simply respond with a randomly chosen phrase when rasa detects an intent. This skill is completely configurable from the opsdroid config, so there is no need to touch the source code unless you want more advanced behaviour.

Usage

In order to edit your opsdroid configuration, make sure you are in your opsdroid virtual environment (if applicable) and run opsdroid config edit. Then you can add the following yaml in order to start the bot (note that this does not include connector configurations and you may need to merge the sections here with existing sections if you already have opsdroid set up).

parsers:
        rasanlu:
                url: http://localhost:5005
                models-path: models
                token: SUPER_SECRET_TOKEN
                min-score: 0.8

skills:
        rasa_greet:
                path: '/path/to/__init__.py'
                intent: 'greet'
                response_options:
                        - 'Why, hello there!'
                        - "What's up, ma dude"
                        - "Hello!"
                        - "Hiya!"
                        - "Wazzup"
                        - "How ya doin?"

You can include many of skills going the the same path with different intents and response_options in order to be able to respond to many different types of message.

Of course, you will also need Rasa installed and running on your machine (rasa run --enable-api --auth-token SUPER_SECRET_TOKEN), and we will need to provide either a model or an intents file. Either way, we need an intents file. See the following example for the syntax.

version: "2.0"

nlu:
- intent: greet
  examples: |
    - hey
    - hello
    - hi
    - hello there
    - good morning
    - good evening
    - moin
    - hey there
    - let's go
    - hey dude
    - goodmorning
    - goodevening
    - good afternoon

- intent: goodbye
  examples: |
    - good afternoon
    - cu
    - good by
    - cee you later
    - good night
    - bye
    - goodbye
    - have a nice day
    - see you around
    - bye bye
    - see you later

And, again, you can add more intents here so that Rasa can recognise them. Put these intents in a file called intents.yml and Opsdroid will automatically send that to Rasa to train.