This github repository contains the code for the chatbot Jody that is created for the thesis project: Goal-setting dialogue for physical activity with a virtual coach. Please refer to our OSF pre-registration for more details on our experiment.
The figure below visualizes the structure of the dialogue with Jody.
The frontend is a html-page that makes use of Rasa Webchat 1.0.1.
It is expected that the user ID is provided as a URL-parameter, e.g. http://<IP_address>:5005/?userid=beyza if the frontend is running on port 5005. This user ID is extracted and sent to the backend to link previous collected data to that user.
Files:
- index.html: html-page if the conversational agent runs locally.
- socketChannel.py: This file is needed to connect the frontend to the backend.
The main component is a conversational agent trained in Rasa 2.8.0.
Files:
- actions: custom actions, e.g. to read from files.
- models: contains trained models.
- config.yml: configuration for the training of the agent.
- data: contains files to specify e.g. the stories on which the agent is trained.
- domain.yml: utterances, slots, forms etc.
- endpoints.yml: defines the endpoints of the conversational agent.
The experiment_data folder contains the following two files:
- goals.csv: contains the examples of people that achieved a running or walking goal.
- user_examples: this file contains example usernames that you can use to chat with Jody.
To run the conversational agent locally:
- Install the python package Rasa 2.8.0.
- In a command window, navigate to the root folder and type
rasa run -m models --enable-api --cors "*"
. - Open a separate command window and type
rasa run actions
to start the custom action server. - Open the frontend ("index.html") and specify a userid in the URL. Choose one of the usernames that can be found in /experiment_data/user_examples. For example: index.html?userid=beyza
- Chat with the conversational agent.
Copyright (C) 2022 Delft University of Technology.
Licensed under the Apache License, version 2.0. See LICENSE for details.