Skip to content

UniBwM-IFS-AILab/FRICO

Repository files navigation

This is the complimentary repository to the paper A Goal-Directed Dialogue System for Assistance in Safety-Critical Application.

Set Up

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.

Initial steps

  1. Clone the repository with git clone https://github.com/UniBwM-IFS-AILab/FRICO.git
  2. Initialize the submodules with git submodule init; git submodule update

Folder Structure

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.

Plan4Dial

It is strongly recommended to use virtual environments if you are not running dockerized versions of the repositories.

  1. Make sure that you are at the ijcai_submission tag for plan4dial using git checkout ijcai_submission

  2. Note that you will need the rbp.sif file. Refer to Plan4Dial docs on how to get this file from Christian Muise.

  3. 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.json along with the complete output folder.

Hovor

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).

  1. For Hovor, the defined bot has web_plan action type. This is an action that we use to generate the plans. It takes endpoint, domain_file and problem_file as default payload. (An example for domain and problem file is in domain_fond.hddl and python_generated.hddl respectively) As of right now, we discard problem_file value 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.

UPF server

  1. To use an example server: install unified-planning and FastAPI

    1. To install UP use pip install unified-planning . Install all the default planning engines using pip install unified-planning[engines] If this does not work use pip install up-aries to install the aries planning engine. If you get a numpy error, downgrade numpy using pip install numpy==1.26.4
    2. To install FastAPI use pip install fastapi
    3. Make sure that you install python>3.10 The version we used is 3.11.9.
    4. Make sure that you have the correct dump.json file inside create_plan function.
  2. Then you can run the app inside upf_hierarchical.py using uvicorn. To run the app useuvicorn server:app --reload The mapping functions are inside the maps folder. Refer to instructions_mapping.md for more details.

  3. You can install it in your base environment but it is recommended that you install it in virtual environment of your choice.

  4. After this is running, you can carry out the conversation and get the corresponding plans via terminal by running local_main.py in 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 file python 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.

  5. 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.

  6. 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. 
    

Known Issues

  1. If you are using Ubuntu, Docker installed using snap causes issues. Instead, install Docker using apt-get .
  2. You might need to change the Rasa version to rasa==3.6.1a1 in requirements.txt file for Plan4Dial.
  3. While loading inside docker, sometimes Rasa takes a long time to load. Note that Hovor cannot work without Rasa.

Citation

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}} 
  }```

About

your FRIendly CO-pilot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •