Watson

Watson is a AI question-answering computing system. The API is available through the IBM bluemix app (see previous episode).  The dialogue  tool is similar to  wit.ai maintained by Facebook.

Login to bluemix and add as a service Watson Conversion (free 10000 api calls per month). We log in with an  IBM ID even though we are sure we do not have one. In the subsequent interface we create a workspace called chemistry and then move on to create an intent, create an entity and create a dialogue. And then  deploy. The big idea is to help a user identify a chemical compound but for the purpose of this procedure check this is irrelevant.

The critical issue is to be able to display a dialogue on screen. Luckily there exists a github project called conversion-simple. Clone this project and make two changes:

In manifest.yml set

applications:
- name: chemistry

services:
 - Conversation-mh

Copy .env.example to .env and set the variables made available on deploy

# Environment variables
WORKSPACE_ID=xxxxxx-xxxx-xxxxxxxxxx-xxx
CONVERSATION_USERNAME=xxxxxxxx-xxxxxx-xxxx-xxxxx-xxxxx
CONVERSATION_PASSWORD=xxxxxxxx

Then push the project to bluemix:

bx cf push orinoco
Invoking 'cf push orinoco'...

Using manifest file C:\xampp\htdocs\conversation\manifest.yml

Uploading orinoco...
Uploading app files from: C:\xampp\htdocs\conversation
Uploading 1.2M, 80 files
Done uploading
OK
Binding service Conversation-mh to app orinoco in org assessmentee.com / space dev
OK

Stopping app orinoco in org assessmentee.com / space dev 
OK

Warning: error tailing logs
Loggregator endpoint missing from config file
Starting app orinoco in org assessmentee.com / space dev0 of 1 instances running, 1 starting
1 of 1 instances running

App started

OK

App orinoco was started using this command `npm start`

Showing health and status for app orinoco in org assessmentee.com / space dev 
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: orinoco.eu-de.mybluemix.net
last uploaded: Sat Jun 10 19:08:50 UTC 2017
stack: unknown
buildpack: SDK for Node.js(TM) (ibm-node.js-6.10.2, buildpack-v3.12-20170505-0656)

state since cpu memory disk details
#0 running 2017-06-10 09:10:39 PM 0.0% 25.4M of 256M 213M of 1G

Returning to https://orinoco.eu-de.mybluemix.net/ we now have that start of a conversion. Mission accomplished!