##Overview Basic chat bot dialog for working with the Watson Conversation service on Bluemix. Once deployed you must navigate to the Watson Conversation service and start to create your intents, entities, and dialogs. You may choose to deploy using the Deploy to Bluemix button below or follow the steps for manually running the app in either Bluemix or locally.
Follow this tutorial for learning about Intents, Entities, and Dialog.
Scroll to the bottom of this README for more information on working with Watson Conversation. You can import the example dialog from lebot.json
##Run the app on Bluemix
-
If you do not already have a Bluemix account, sign up here
-
Download and install the Cloud Foundry CLI tool
-
Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/slkaczma/watson-bot-starter.git
-
cd
into this newly created directory -
Open the
manifest.yml
file and change thehost
value frombotstarter
to something unique.
The host you choose will determinate the subdomain of your application's URL: <host>.mybluemix.net
- Connect to Bluemix in the command line tool and follow the prompts to log in.
$ cf api https://api.ng.bluemix.net
$ cf login
- Create the Watson Conversation service using your Bluemix account and replace the corresponding credentials in your
app.js
file.
var conversation = watson.conversation({
url: 'https://gateway.watsonplatform.net/conversation/api',
username: 'CONVERSATION_USERNAME', // Set to your conversation username
password: 'CONVERSATION_PASSWORD', // Set to your conversation password
version_date: '2016-07-11',
version: 'v1'
});
-
Once you have a workspace/conversation created, update your Workspace ID:
var workspace = 'WORKSPACE_ID'; // Set to your Conversation workspace ID
-
Push the app to Bluemix.
$ cf push
##Run the app locally
-
If you do not already have a Bluemix account, sign up here
-
Download and install the Cloud Foundry CLI tool
-
Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/slkaczma/watson-bot-starter.git
-
cd
into this newly created directory -
Log into your Bluemix account and navigate to the Catalog.
-
Create the Watson Conversation service using your Bluemix account and replace the corresponding credentials in your
app.js
file.
var conversation = watson.conversation({
url: 'https://gateway.watsonplatform.net/conversation/api',
username: 'CONVERSATION_USERNAME', // Set to your conversation username
password: 'CONVERSATION_PASSWORD', // Set to your conversation password
version_date: '2016-07-11',
version: 'v1'
});
-
Once you have a workspace/conversation created, update your Workspace ID:
var workspace = 'WORKSPACE_ID'; // Set to your Conversation workspace ID
-
Start your app locally with the following commands
npm install
node app
##Start Creating Conversations
-
Click on the service tile. Open the service dashboard using the Launch button under the Manage tab.
-
Create a new workspace. Select the three dots and select View details to get the Workspace ID for your bot.
-
Click on the newly created workspace to start creating intent, entities, and dialog.
-
Always make sure to have a conversation_start condition as the first box in your dialog.