This application demonstrates a simple chat bot built using Watson Conversation.
Watson Conversation is a service that runs on Bluemix (IBM's cloud development platform). You can create your own instance of the Conversation service and train it to understand and respond to your own domain. For this app we will be training it to take orders for fast food!
This bot consists of 3 parts: the front-end (which runs in your browser), the backend (which provides the front-end with an API to call), and the Watson Conversation service itself. This README contains instructions to setup these 3 parts. There is also a companion article which provides some more details on this application, as well as explaining how to train Watson.
- Clone or download this app from GitHub
- Go to Bluemix
- Create an account
- Log in to Bluemix
- Navigate to the "Catalog"
- Find the Watson services
- Click on "Conversation"
- Click "Create" to create your own instance of the Conversation service
- From the Conversation service on Bluemix, click "Launch tool". This will take you to the Conversation tooling where you can start to train your bot
- Select the "Import" button on the "Workspaces" page
- Select "Choose a file" and select "workspace-burgerbot.json" from this app
- This will load and open this workspace
- Navigate back to the "Workspaces" page and click the 3 dots on your workspace tile, and select "View details"
- Note down the workspace ID for later
- Go to your Conversation service on Bluemix (via the "Dashboard")
- Navigate to "Service Credentials" and click "View credentials"
- Use the username and password here to update CONVERSATION_USERNAME and CONVERSATION_PASSWORD in the .env file in the app
- Use the workspace ID we got earlier to update WORKSPACE_ID in the .env file
- We’re now ready to run the app and you can do that either locally or on Bluemix, both of which are explained below.
- Install Node.js
- Open Terminal or Command Prompt
- cd into this project's root directory
- Run
npm install
to install the app's dependencies - Run
npm start
to start the app - You will see a terminal message indicating where the Node server is starting, for example server starting on http://localhost:6008
- Access the running app in a browser at http://localhost:6008
- Log in to Bluemix
- Navigate to the "Catalog"
- Find "Cloud Foundry Apps"
- Select "SDK for Node.js"
- Provide a name for your app.
- Click "Create" to create the app.
- Modify "manifest.yml" to use your app's name.
- Follow the "Getting Started" instructions in your app on Bluemix to deploy this app. However, there’s no need to clone the hello world app since we already have our own app ready to go.