This is the complimentary repository to the paper A Goal-Directed Dialogue System for Assistance in Safety-Critical Application.
This set-up has been tested on a Ubuntu 22.04 system both inside docker container and natively. This system has not been tested in windows or inside docker container with windows host.
- Clone the repository with
git clone https://github.com/UniBwM-IFS-AILab/FRICO.git - Initialize the submodules with
git submodule init; git submodule update
After git submodule update, you will have the following folder structure additional to the files in this repository:
hovor\*
plan4dial\*
Hovor is responsible for executing the dialogue, while plan4dial is responsible for the generation of the dialogue graph.
It is strongly recommended to use virtual environments if you are not running dockerized versions of the repositories.
-
Make sure that you are at the
ijcai_submissiontag forplan4dialusinggit checkout ijcai_submission -
Note that you will need the
rbp.siffile. Refer to Plan4Dial docs on how to get this file from Christian Muise. -
To generate the output file from the bot definition, refer to the documentation in the Plan4Dial submodule (local run as well as docker run is possible). Plan4Dial generates
data.prp.jsonalong with the complete output folder.
The output folder of Plan4dial is the input for Hovor. The output file is passed on as argument here. Make sure to change the path. Hovor can also be run either locally or with docker. Refer to the documentation for this. Local run is used for debugging and development purpose, once debuggin and development is done, you can build the docker image and use it to run the code. So, if you are only interested in running the code, you may prefer running with docker. If you are interested in debugging and developing, it is preferable to set up a local environment (however you can attach debugger using vscode and achieve the same result, so it is a matter of personal preference).
- For Hovor, the defined bot has
web_planaction type. This is an action that we use to generate the plans. It takesendpoint,domain_fileandproblem_fileas default payload. (An example for domain and problem file is indomain_fond.hddlandpython_generated.hddlrespectively) As of right now, we discardproblem_filevalue and replace it with a generated file name.#Todo Fix this. You have to make sure that there is a planner-server running that can return the plan from this call.
-
To use an example server: install unified-planning and
FastAPI- To install UP use
pip install unified-planning. Install all the default planning engines usingpip install unified-planning[engines]If this does not work usepip install up-ariesto install the aries planning engine. If you get a numpy error, downgrade numpy usingpip install numpy==1.26.4 - To install FastAPI use
pip install fastapi - Make sure that you install
python>3.10The version we used is3.11.9. - Make sure that you have the correct
dump.jsonfile insidecreate_planfunction.
- To install UP use
-
Then you can run the app inside
upf_hierarchical.pyusinguvicorn. To run the app useuvicorn server:app --reloadThe mapping functions are inside the maps folder. Refer toinstructions_mapping.mdfor more details. -
You can install it in your base environment but it is recommended that you install it in virtual environment of your choice.
-
After this is running, you can carry out the conversation and get the corresponding plans via terminal by running
local_main.pyin hovor. This will launch the dialogue inside the terminal. For IJCAI bot, the possiblities on how to respond can be seen from this file . To use the Flask server, use the filepython contingent_plan_executor/app.py path/bot_name/output_files. Make sure you are at the right directory level, since it is important such that relative paths work. In local run, to run hovor from terminal directly use:python contingent_plan_executor/local_main.py path/bot_name/output_files. Note that the output path is the path to folder generated by plan4dial. -
The above two repositories do not touch on how to visualize the plans or how to access hovor via API-endpoints. However, we do have have our cockpit interface that can do exactly that. (Repository coming soon in September 2024). Note that this however requires PANDA planner, because, we are interested in orderings too.
-
To summarize:
a. Get Plan4Dial. b. Generate output file. c. Get Hovor and run it using the previous output. d. Run UP server. e. Now you should be able to communicate via terminal and generate plans. f. If you want to use the GUI, use the cockpit repo and follow the instructions there.
- If you are using Ubuntu, Docker installed using snap causes issues. Instead, install Docker using
apt-get. - You might need to change the Rasa version to
rasa==3.6.1a1in requirements.txt file for Plan4Dial. - While loading inside docker, sometimes Rasa takes a long time to load. Note that Hovor cannot work without Rasa.
This repo is part of the IJCAI Human-Centered AI Special Track paper A Goal-Directed Dialogue System for Assistance in Safety-Critical Application. To cite this paper use:
@inproceedings{Jamakatel-et-al:IJCAI2024:GoalDirectedDialog,
author= {Prakash Jamakatel and Rebecca De Venezia and Christian Muise and Jane Jean Kiam},
year = {2024},
title = {A Goal-Directed Dialogue System for Assistance in Safety-Critical Application},
booktitle={{International Joint Conference on Artificial Intelligence (IJCAI) Special Track Human-Centered AI}}
}```