This repository contains code for the chatbot challenge platform. It contains these folders:
- chatbot-challenge-frontend The frontend of the chatbot challenge.
- escape-rooms The escape rooms which are Rasa agents. This folder contains the definitions of these dialog agents.
- see deployment.md for more information about your preparations
Fixed Versions for bot:
- python
3.8.10 - rasa
3.4.2
For local Frontend-test:
- node-js (v20.2.0 ), npm ( 9.6.6)
Please refer to the official Rasa documentation for installation instructions.
https://rasa.com/docs/rasa/installation/installing-rasa-open-source/
Usually it makes sense to create a virtual environment for your python installation, such as Conda. In this way you can have multiple different Python environemnts in parallel that do not interfere with each other, in case you need Python for another project also.
First install nodejs and npm: https://nodejs.org/en/download/
git clone https://github.com/Chatbot-Challenge/Frontend.git
cd Frontend/chatbot-challenge-frontend/
npm install
We assume that you already trained a model. The -m parameter specifies the path to the trained model.
cd <into-your-rasa-bot>
# or try out the example bot / that should work for you also
cd Frontend/escape-rooms/example-bot- start rasa server
- explicitly set port to
5005 - make sure that api is available and reachable
rasa run \
--enable-api \
--cors "*" \
-p 5005- in a second terminal
- start the actions server
rasa run actions- check rasa server with
curl - on Linux run :
curl -X POST -i http://0.0.0.0:5005/webhooks/rest/webhook -d '{"sender": "oha!", "message": "oha?"}' - on Win$ run:
curl -X POST -i http://localhost:5005/webhooks/rest/webhook -d " { \"sender\":\"oha\" , \"message\": \"hi\" } " - you should see something like :
[{"recipient_id":"oha","text":"You can interact with: cell"}]
- In
Frontend/chatbot-challenge-frontend/configadd a new room to the list of rooms :´ - make sure that you use the same port as specified above (
rasa run -p 5005...)
config = {
"name": "hello world",
"rooms": [
{
"escape_room_name": "Lokal Demo",
"chatbot_name": "local-bot",
"user_name": "Oha Oha Oha",
"messagebox_caption": "hmmm?...",
"send_button_caption": "oha?",
"user_name": "you",
"id": "lokal",
"background-image": "local-bot-background-image.jpg",
"api_url": "http://localhost:5005",
"welcome-message": "does it wörk?"
},
...
]
};- Please note that configuring this file is only necessary for local testing.
the deployment will use the config from your
cd chatbot-challenge-frontend
npm run dev
Open http://localhost:5173/ in your web browser to see the user interface.
chatbot-challenge-frontend/config.js contains the bot configuration. The configuration format is a JSON dictionary.
example:
{
"name": "Under the sea",
"id": "under-the-sea",
"background-image": "under-the-sea-background-image.jpg",
"api-url": "http://localhost:5005",
"welcome-message": "You are under the sea."
}
Here is a list of available configuration parameters:
| Parameter | Description | Required | Example Value |
|---|---|---|---|
| api_url | URL of the Rasa HTTP API | required | https://vm014.qu.tu-berlin.de/api5005 |
| id | Unique ID of the escape room. Please derive this from your team name. | required | under-the-sea |
| escape_room_name | Name of the escape room | required | Under the sea |
| chatbot_name | Name of the chatbot that is displayed in the chat bubbles. | optional, default is "Game Master" | Neptun |
| user_name | Name of the user that is displayed in the chat bubbles | optional, default is "You" | Erika Musterfrau |
| messagebox_caption | Caption of the text input box in the chat window. | optional, default is "Type here what you want to do..." | Type here... |
| send_button_caption | Caption of the send button in the chat | optional, default="Do" | Swim |
| background-image | Name of the background image file in the folder public/background-images/. Please prefix with your id parameter to ensure that the filename is unique. | optional | under-the-sea.jpg |
| welcome-message | First message of the chatbot when the user starts the game | optional | You are under the sea. |
| chatbot-avatar | Image file to an avatar of the chatbot. Should be a rectangular image. | optional | jazz_club_avatar1.jpg |
| user-avatar | Image file to an avatar of the user. Should be a rectangular image. | optional | jazz_club_avatar2.jpg |
The chatbot challenge platform is installed live under https://vm014.qu.tu-berlin.de. The logfiles are accessible under https://vm014.qu.tu-berlin.de/logs . There is one log files for each escape room with the team number as filename.