Giter Site home page Giter Site logo

brianhu2006 / chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cognitivebuild/chatbot

1.0 2.0 0.0 2.63 MB

Build your own chatbot on the Innovation Day

Home Page: https://webchatbot.mybluemix.net/

License: Apache License 2.0

CSS 4.45% HTML 0.48% JavaScript 93.45% Java 1.63%

chatbot's Introduction

Chatbot

Build your own chatbot on the Innovation Day

Watson: Conversation Watson: Speech-to-Text Watson: Text-to-Speech GitHub license

#Prerequisite

  • Register your Bluemix account
  • Create Java Liberty Runtime
  • Connect Java Liberty Runtime with Watson Conversation, Speech to Text and Text to Speech services
  • Setup a Workspace of Watson Conversation and define your dialogs (We will do it together on the Innovation Day)
  • Install Bluemix and CF CLI
  • Install Eclipse Java EE IDE for Web Developers as your IDE (Download)
  • Setup Websphere Application Server Liberty Profile in the Eclipse for debugging purpose (Download)

#Installation guide

	git clone [email protected]:CognitiveBuild/Chatbot.git
  • Import Chatbot into your Eclipse workspace
  • Add credentials into the file: /Chatbot/src/com/ibm/cto/Consts.java
	// Sample only, please use your own credentials
	public static final String TTS_USERNAME = "9a5bfa13-624f-436e-8af1-fc677a59a123";
	public static final String TTS_PASSWORD = "berqyZXJ2J7f";

	public static final String STT_USERNAME = "af3a6ecc-2f35-4672-2595-35e15bcd758a";
	public static final String STT_PASSWORD = "KQ3itZUslHsc";

	public static final String CONVERSATION_USERNAME = "134f9b10-7d4a-4e4f-92a0-7372f67331f7";
	public static final String CONVERSATION_PASSWORD = "ijMoZB1vCVW6";
	public static final String WORKSPACE_ID = "1e28d5ef-7506-4e76-814e-e83f3cbe6816";
  • Right click on the Chatbot project, choose Run As > Run on Server to open http://localhost:9080/Chatbot/, there will be logs in the console including following, it means your server is started and the Chatbot is automatically deployed on your local server environment
	Application Chatbot started in xxx seconds.
	......
	The server testServer is ready to run a smarter planet.

#Deploy your Chatbot on the Bluemix

  • Right click on the Chatbot project, choose Export > WAR file, then save the WAR file into Destination
  • Run bluemix and cf command to deploy the WAR file on the Bluemix, please refer Getting Started section of the Java Liberty Runtime. And this is an example of the shell command
	cd your_new_directory
	bluemix api https://api.ng.bluemix.net
	bluemix login -u your_name -o your_organization -s your_space
	cf push -p your_war_file_directory/your_war_file.war
  • Start chatting using text or microphone with your personal Chatbot and Enjoy!

#Dependencies

  • Apache Common Codec
  • Apache HTTP Client
  • Watson Java SDK
  • Watson Speech JavaScript SDK

#Issues

  • Watson JavaScript Speech SDK does not support Safari
  • The way of obtaining token is not secured, do not use it on Production

#License Copyright 2016 GCG GBS CTO Office under the Apache 2.0 license.

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.