A framework that facilitates creating task-oriented chatbot
Project description
Converse
Converse is a flexible framework for building and deploying task-oriented chatbots.
Table of Contents
Getting Started
Requirements
- python >= 3.7
Running the NLU (NER/Intent/Coreference) services
- Please check out running NLU services in docker container
Running the Demo - Quick Start
If you don't plan to edit the package code, we recommend using this method of running Converse because it is easier.
- Install Docker.
- Create a Python 3.7 virtual environment using Conda and activate it.
- Run the following command to install the pip package of Converse:
pip install -i https://test.pypi.org/pypi/ --extra-index-url https://pypi.org/simple converse-test-command==0.2.16
- Install
svn
on your computer. On Mac, run:brew install svn
- Run
converse-shell
to test if the package is successfully installed. If the command line output contains"Hello, Converse!"
, then you installed the package successfully. - Run
converse-demo
to interact with pre-built example bots, and follow the instructions in your terminal. Note that first-time users can leave every required input empty to use the default value. Open the link provided by the script using your favorite browser, then you should see the demo page (pictured below). You can interact with the bot by typing in the chat box on the right and the tree visualization will change based on your task progress. Remember that the example bots are not open-domain chatbots. Please check Template Bots for the details of the template bots before you run the demo. - Run
converse-build
to configure your own bot. Follow the instructions in the terminal to set up the bot. Note that first-time users can leave every required input empty to use the default value. Open the link provided by the script using your favorite browser, then you should see the configuration page (pictured below). To learn more about how to build your own bot, please refer to guide for building your first bot.
Running the Demo After Modifying Files in Converse
- Clone this repo and
cd
into theConverse
directorygit clone git@github.com:salesforce/Converse.git cd Converse
- Create a Python 3.7 virtual environment using Conda.
- Install dependencies. All the necessary packages are listed in
requirements.txt
. You can install all the dependencies by running the following command:pip install -r requirements.txt
- Add the
Converse
folder to yourPYTHONPATH
.export PYTHONPATH=$PYTHONPATH:/your_directory/Converse
- In one terminal window, run the backend and check the log file converse.log:
You may want to specify custom config files. SupplyLOGLEVEL=[debug|info|warning|error|critical] python Converse/demo/dial_backend.py
--help
option to help you out. The default config files are listed inorchestrator.py
file. - In a separate terminal window, run the entity backend services:
python Converse/entity_backend/entity_service_backend.py
- In a separate terminal window, run the front end and start interacting with the bot!
You can interact with the bot directly in the command line or in the browser by opening http://localhost:9002/client in your favorite browser. To learn more about how to build your own bot, please refer to guide for building your first bot.python Converse/demo/client.py
Learn more about Converse
Please refer to the tutorial on how to build your first bot to get started by building your first bot.
To learn more about how to customize Converse for your use case, please refer to our documentation for each component of the system:
- Task Configuration
- Entity Configuration
- Response Configuration
- Policy Configuration
- Information Layer Configuration
- Template Bots
How to contribute
Welcome! We are so happy to see you willing to make your contributions to this repository!
You can contribute via pull requests. Please follow these steps:
- Create an issue describing the feature you want to add or modify. A maintainer will review your issue.
- Discuss the issue with the maintainer in the issue you created.
- Write your code, tests and documentation, and format them with
black
. We provide arun_black.sh
script to help you format your code. - Run
./run_unittest.sh
. Make sure that no error occurs in the tests. - Create a pull request (PR) describing your changes. Note that your PR should be a reasonable length (<= 500 lines).
Your PR will be reviewed by a maintainer. When you get the approval from the maintainer, you can merge your code into the main branch.
Citing Converse
You can find more details in our paper: https://arxiv.org/abs/2203.12187
If you're using Converse in your research or applications, please cite using this BibTeX:
@article{xie2022converse,
title={Converse--A Tree-Based Modular Task-Oriented Dialogue System},
author={Xie, Tian and Yang, Xinyi and Lin, Angela S. and Wu, Feihong and Hashimoto, Kazuma and Qu, Jin and Kang, Young Mo and Yin, Wenpeng and Wang, Huan and Yavuz, Semih and Wu, Gang and Jones, Michael and Socher, Richard and Zhou, Yingbo and Liu, Wenhao and Xiong, Caiming},
journal={arXiv preprint arXiv:2203.12187},
year={2022}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for converse_sfr-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5f6a6599304c0f04dd5b3086d7f829b1699b2e495f2dcc3e22ed09b864a05c1 |
|
MD5 | b6cb27e9ad5ca0c62fcb4422ded95b2f |
|
BLAKE2b-256 | 1ab894a608d5fa2a838430cb564c842d2d512c5a50e2e23161a76681086e1327 |