Git Product home page Git Product logo

jotaraffalli / tesis_unimetbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 26.52 MB

Artificial intelligence University Chatbot ๐Ÿค–. It uses Watson Assistant NPL to understand the intention of users. This module consist in a Small UI made in React js and a local config to deploy a server-less Watson Assistant/Discovery service.

Home Page: https://tesis-unimetbot.firebaseapp.com/

License: Apache License 2.0

JavaScript 37.60% Shell 1.71% HTML 0.66% CSS 60.03%

tesis_unimetbot's Introduction

Unimet Bot

Artificial intelligence University chatbot. This system was made to attend the costumer service area of an university through the use of Natural Language Processing services ( like IBM Watson assistant) to help users with common requirements. The goal was to reduce the monopolization of contact channels and satisfy client needs in a quick and comfortable way, at whatever time, place, platform and channel of choice.

It consisted in an series of microservices, a middleware of data control, a custom user interface and the integrations of multiple channels like Slack, Facebook Messenger and Twilio. It was part of my Systems Engineering career thesis which received honors.

Frontend module example

This module in particular has a Front client side example made with React js. It is based on IBM official source code of serverless Watson's services made with OpenWhisk. Below you can find their docs with full explanation of their desired architecture.


Watson Assistant (formerly Conversation) with Discovery - OpenWhisk

Build Status codecov

This application shows the capabilities of Watson Assistant and Discovery services to work together to find answers on a given query. In this sample app, the user is chatting with a virtual car dashboard, giving it commands in plain English such as "Turn on the wipers," "Play me some music," or "Let's find some food." If the user makes a request and Watson Assistant is not confident in its answer (e.g. "How do I check my tire pressure?"), Discovery will search the car manual and return the most relevant results, if relevant materials exist.

This demo is a reworking of a previous one but with an OpenWhisk back-end and React front-end. OpenWhisk is IBM's "serverless" offering, allowing users to upload functions to the cloud, call them via REST API, and pay only by the millisecond of usage.

Table of Contents

How it Works

Flow diagram

Under the hood, there are two components to this app:

  • One is the front-end, which is simply static assets (HTML, CSS, and React), it uses CSS with Sass for cleaner, more maintainable source code.
  • The other is the OpenWhisk actions:
    • When the user inputs text, the UI sends the current context and input to the OpenWhisk sequence. These are processed by the Watson Assistant service and returned, with an output and new context. The results are sent to the next action.
    • The Discovery action checks for a flag from the Watson Assistant output, and if it is present takes the original input and queries the manual with it. If there is no flag, the Watson Assistant results pass through the function unchanged. The Sequence returns the output and updated context back to the UI.

Run Locally

Getting Started

  1. If you don't already have an IBM Cloud account, you can sign up here

Make sure you have at least 2 services available in your IBM Cloud account.

  1. Clone (or fork) this repository, and go to the new directory
git clone https://github.com/watson-developer-cloud/assistant-with-discovery-openwhisk.git
cd assistant-with-discovery-openwhisk
  1. Install Node.js (Versions >= 6).

  2. In the root directory of your repository, install the project dependencies.

npm install

Setting up Watson Services

Skip this section if you have downloaded the project from Watson Console and already have a credentials.json file

  1. Create a project using the Watson Console using Watson Assistant and Discovery services.

  2. In the Watson Console navigate to Projects, click your newly created project, copy credentials from Project View page and paste them in to a new credentials.json file.

Train Watson Services

Run following commands to train Watson Assistant and Discovery services:

  npm run train

Setting up the OpenWhisk Back-end

  1. Install the Openwhisk Command Line Interface.

  2. Download and install the Bluemix CLI.

  3. Login by running the following:

bx login
  1. Install jq as a dependency.

  2. Run the provided shell script create-openwhisk-actions.sh to create your OpenWhisk actions & sequence. The syntax to do so may vary by system, but for example:

   sh create-openwhisk-actions.sh

Setting up the React Front-end

Create an optimized build of your project. During this stage, your environment variable will be inserted into App.js for use by your components.

npm run build

Running the App

All that's left is to serve your static files locally. You should see the project running in a new tab!

npm start

License

Licensed under Apache 2.0.

tesis_unimetbot's People

Contributors

jotaraffalli avatar dan2110 avatar

Watchers

James Cloos avatar  avatar

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.