Giter VIP home page Giter VIP logo

meep's Introduction

Multi-Domain End-to-End Platform (MEEP)

Table of contents generated with markdown-toc

Introduction

End-to-end framework to build automatic agents (chatbots) for task-oriented dialogs

  • ๐Ÿ’ฌ Use chat interfaces to collect dialog data and interact with agents
  • ๐Ÿค– Build/deploy automated chatbot agents with your own ML/rule-based models
  • ๐Ÿ“ˆ Evaluate chatbots using 1) agent-action annotations 2) user-satisfaction scores

Quickly deploy for any domain by leveraging domain-agnostic modules

  • Data collection interface self-annotates dialogs for training/evaluation data
  • Train a chatbot without ML knowledge using generic ML models, or write a custom model
  • Evaluate any chatbot's accuracy as a black-box, or inspect its internal actions as a white-box

Chat interfaces are deployed with a simple web architecture more details in a Google drive. The backend is Python/Flask/sockets and the frontend is Preact/Redux.

Demo

Below is a short snippet of a user interacting with a chatbot that helps them specify a destination for a taxi ride.

Live Chatbot: http://35.212.174.248:9999/0/user. Chat directly with the chatbot here.

Installation

Backend

  • Tested on python 3.6.3, requires python 3.6+ for the newer versions of the transformers module.

Set up a virtual environment (optional, but recommended)

  1. python3 -m venv env
  2. source env/bin/activate

Install python dependencies (not optional)

  1. pip install -r requirements.txt
  2. This installs server and API dependencies. Some agents require additional installation. See their folders for details or install requirements-full.txt.

Frontend

  • Requires Node.js. Tested with Node 12.10
If node is not installed, follow these instructions for Ubuntu
  1. curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
  2. sudo apt install nodejs

Source

Install the required dependencies.

  1. cd gui/frontend
  2. npm install

Configuration

Backend configuration is all done through command line arguments to main.py. Run python main.py --help for a list of options. If you are running a domain that requires API keys, you need to create the gui/backend/keys/api_keys.json file and set them there. Here's an example of api_keys.json:

{
  "darksky": "my_api_key1",
  "google_maps": "my_api_key2",
  "google_speech": "my_api_key_file.json",
  "wit_date": "my_api_key3"
}

Frontend configuration is done using dotenv, stored in the auto-generated configuration file gui/frontend/.env. There is an example at gui/frontend/.env.example You can modify the parameters in this configuration file after it is generated by the front-end start-up command. For domains that require frontend API keys (e.g. destination), you should add the keys there.

30-Second Startup

Let's start a chat interface for the simple compare_numbers domain that determines whether one number is greater than another.

BACKEND_PORT=8081
FRONTEND_PORT=8082
LOG_DIR=logs/tutorial

Start the backend server

cd gui/backend
python main.py --port=$BACKEND_PORT --domain=compare_numbers --num_rooms=1 --log_dir=$LOG_DIR

This starts a backend for human-agents that make api calls and reply to user utterances via the agent UI.

To see what it's like to interact with a chatbot-agent, add --agent_class_name=agents.compare_numbers_agent.CompareNumbersAgent to the command above.

Start the front-end server

cd gui/frontend
./run.sh $BACKEND_PORT $FRONTEND_PORT

The front-end command will output URLs to access the chat interface, e.g. http://0.0.0.0:8082.

Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.