Build your own chatbot on the Innovation Day
Watson: Conversation Watson: Speech-to-Text Watson: Text-to-Speech GitHub license
-
Register your Bluemix account
-
Register your Github account
-
Forked the IoTCar repository https://github.com/ChristiaL/IOTCar and deployed the node.js application
-
Fork this repository and remember the link of forked application
Fork GitHub forked result
-
Create application of
Create application Liberty For Java Liberty for JavaLiberty for JavaonBluemix -
Connect
Connect services Watson Conversation Watson Conversation Cancel Restage Connect new Speech to Text Speech to Text Cancel Restage Connect new Text to Speech Text to Speech Cancel Restage Connected servicesLiberty for JavawithWatson Conversation,Speech to TextandText to Speechservices -
Click on
Conversation launch tool Sign in conversationConversationfrom theConnectionstab and click onLaunch toolto open the website of IBM Watson Conversation, then click onLogin with IBM IDto signin -
Setup a
WorkspaceofWatson Conversationand define dialogs (We will do it together on the Innovation Day)
-
Register your Github account
-
Fork this repository and https://github.com/ChristiaL/IOTCar and deploy the nodejs web application
-
Go to
Enable Continous Delivery Getting started Enable toolchainsOverviewof theLiberty for Javaapplication, findContinuous Deliverypanel, and click onEnablebutton -
Click on
Toolchains are enabled Choose Toolchain Toolchain templateCreate Toolchain from Templatefor the first time you enable the Toolchains, and click onSimple Cloud Foundry toolchain -
Click on
Authorize GitHubGitHubbutton to Authorize the access to theGitHub, then you'll be navigated toGitHubwebsite -
On the
GitHub - AuthroizingGitHub, click onAuthorize applicationbutton to grant the access from Bluemix DevOps service -
Type
GitHub - AuthorizingGithubpassword to confirm the operation -
After authorization, select
Create Toolchain CheckingExistingas Repository type, and forkedGithub URLas Source repository URL, then click onCreatebutton -
Verify configurations to ensure the Pipeline deploys on right runtime with the correct application name
Verify Pipeline Configuration Verify Pipeline Configuration Verify Pipeline Configuration -
On this step, assuming you have already created one Watson Conversation, so switch back to Watson Conversation website, copy
Conversation Workplace Conversation Workplace IDWorkspace IDfrom the createdWorkspaceby clicking on the menu on the top right of theWorkspace panel, then click onView detailsand copy theWorkspace ID -
Switch back to
Edit manifest.ymlDevOps serviceand click onEclipse Orion Web IDE, and selectmanifest.ymlfor editing. Changenameto your app name then updateCONVERSATION_WORKSPACE_IDto copiedWorkspace ID -
Click
Save yml fileFilemenu and selectSave -
Click on
GitHub menu GitHub commit GitHub pushGittab on the left, add commit comments and click onCommitbutton, after that click onPushbutton to update changes on theGitHub -
Go back to toolchain then click on
Pipeline interface Pipeline interface pipeline deployedDelivery Pipeline, if it does not automatically start, clickRun Stageicon and wait for the build and deployment process
Start chatting using text or microphone with your personal Chatbot and Enjoy!
Installation
- Install Bluemix and CF CLI
- Install Eclipse Java EE IDE for Web Developers as your IDE (Download)
- Install latest JavaEE SDK or JavaSE SDK
- Install Tomcat 9 and add it into
Eclipseas a new Server
Run Chatbot application locally
- Run git command or download the source code here
git clone git@github.com:CognitiveBuild/Chatbot.git
- Import Chatbot into your Eclipse workspace
- Add credentials into the file:
/Chatbot/src/com/ibm/cto/Consts.java
/** * TODO: If you're testing this application locally, please get the credentials from Bluemix */ public String TEXT_TO_SPEECH_USERNAME = "9a5bfa13-624f-436e-8af1-fc677a59a123"; public String TEXT_TO_SPEECH_PASSWORD = "berqyZXJ2J7f"; public String SPEECH_TO_TEXT_USERNAME = "af3a6ecc-2f35-4672-2595-35e15bcd758a"; public String SPEECH_TO_TEXT_PASSWORD = "KQ3itZUslHsc"; public String CONVERSATION_USERNAME = "134f9b10-7d4a-4e4f-92a0-7372f67331f7"; public String CONVERSATION_PASSWORD = "ijMoZB1vCVW6"; /** * TODO: Get Workspace ID from IBM Watson Conversation: https://ibmwatsonconversation.com */ public String CONVERSATION_WORKSPACE_ID = "1e28d5ef-7506-4e76-814e-e83f3cbe6816"; /** * TODO: After deploy your nodejs service for controlling robot car, fill in the host name here */ public String CAR_SERVICE_HOST = "your_car_host_name.mybluemix.net";
- Right click on the
Chatbotproject, chooseRun As>Run on Server, then chooseTomcat v9.0 Server at localhostto openhttp://localhost:8080/Chatbot/and see the running application
Deploy your Chatbot on the Bluemix
- Right click on the Chatbot project, choose
Export>WAR file, then save theWAR fileintoDestination - Run
bluemixandcfcommand to deploy theWAR fileon the Bluemix, please referGetting Startedsection of theLiberty for Java. And this is an example of the shell command
cd your_new_directorybluemix api https://api.ng.bluemix.net
bluemix login -u your_name -o your_organization -s your_space
cf push your_app_name -p your_war_file_directory/your_war_file.war
- Apache Common Codec
- Apache HTTP Client
- FastJSON
- Watson Java SDK
- Watson Speech JavaScript SDK
- Watson JavaScript Speech SDK does not support Safari
- The way of obtaining token is not secured, do not use it on Production
City entities and company locations
- Shenzhen: Technology Building II, No.1057, Nanhai Avenue
- Shanghai: KIC Technology Center
- Dalian: Hi-Tech Zone District, TianDi Software Park
- Wuhan: Donghu HiTech Development Zone
- Chengdu: Tianfu Software Park
- Beijing: Pangudaguan Building
Direction entities
- forward
- backward
- left
- right
Copyright 2016 GCG GBS CTO Office under the Apache 2.0 license.