Coder Social home page Coder Social logo

call-for-code / solution-starter-kit-communication-2020 Goto Github PK

View Code? Open in Web Editor NEW
89.0 20.0 331.0 123 MB

Materials for the Call for Code 2020 solution starter kit for crisis communication in the context of COVID-19.

License: Apache License 2.0

JavaScript 73.44% CSS 20.32% HTML 5.45% Shell 0.26% Dockerfile 0.53%
chatbot covid covid-19 covid19 watson-assistant node-red watson-discovery call-for-code

solution-starter-kit-communication-2020's Introduction

COVID Crisis Communications Starter Kit

This solution starter was created by technologists from IBM. Translations are available: JP

Authors

Contents

  1. Overview
  2. Video
  3. The idea
  4. How it works
  5. Diagrams
  6. Documents
  7. Datasets
  8. Technology
  9. Getting started
  10. Resources
  11. License

Overview

What's the problem?

In times of crisis, communications systems are often overwhelmed with people trying to find basic information about testing, symptoms, community response, and other resources. When communication lines get clogged, people who need real help can't get through. Chatbots help respond to tens, even hundreds, of thousands of messages a day.

How can technology help ?

Whether via text, phone, websites, or communication apps, conversing with chatbots and other AI-enabled resources can play a critical role in helping communities quickly understand crucial information and free up customer service resources to focus on higher-level issues.

IBM Watson Assistant service helps you build, train, and deploy conversational interactions into any application, device, or channel. Creating a chatbot using Watson Assistant can help address the issues that our users face while trying to gather accurate, relevant information. Whether you're trying to learn the latest news about Covid-19 or learn where there's testing in your area, a chatbot can play a major role in helping communities quickly understand crucial information and free up customer service resources to focus on higher-level issues.

Video

Call for Code Solution Starter: Water sustainability in the context of climate change

The idea

COVID-19 has citizens looking for answers about symptoms and testing sites as well as current status of schools, transportation, and other public services. Using Watson Assistant, this Call for Code Starter Kit has designed a virtual assistant pre-loaded to understand and respond to common questions about COVID-19, scan COVID-19 news articles using Watson Discovery and respond to COVID statistics inquires with data from trusted sources.

With this Watson Assistant powered Crisis Communications Starter Kit you can integrate a chatbot into your Call for Code solution in an IBM Cloud hosted web server, using a Slack integration or via a Node-RED Dashboard. 

It can:

  • Respond by sharing consistent, accurate COVID-19 information
  • Help citizens quickly and easily access the latest information through their channel of choice – voice, text or collaborative tool
  • Free valuable resources by automating answers to common COVID-19 questions
  • Dynamically update information with the latest developments and recommendations

The challenge for you is to build out from this framework to create a more complete solution.

How it works

Diagrams

Website integration with COVID-19 crisis communication chatbot

Crisis Comms Architecture diagram

  1. User visits a website with the COVID-19 chatbot and asks a question.
  2. Node.js web server calls the Watson Assistant service hosted in IBM Cloud.
  3. Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user question.
  4. Source COVID-19 FAQ information from trusted CDC data.
  5. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  6. IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
  7. Watson Discovery scans news articles and responds with relevant articles.
  8. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  9. IBM Cloud Function calls the COVID-19 API to get statistics.
  10. Watson Assistant replies to the user inquiry.
  11. Node.js web server displays the chat answer to the user.

Slack integration with COVID-19 crisis communication chatbot

Crisis Comms Architecture diagram

  1. User invokes a COVID-19 Slack integration chatbot app and asks a question.
  2. Slack app calls the Watson Assistant service hosted in IBM Cloud.
  3. Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user question.
  4. Source COVID-19 FAQ information from trusted CDC data
  5. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  6. IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
  7. Watson Discovery scans news articles and responds with relevant articles.
  8. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  9. IBM Cloud Function calls the COVID-19 API to get statistics.
  10. Watson Assistant replies to the Slack application.
  11. Slack app displays the chat answer to the user.

Voice enabled COVID-19 crisis communication chatbot using Node-RED

Crisis Comms Architecture diagram

  1. User visits a voice-enabled Node-RED website with the COVID-19 chatbot and asks a question.
  2. Node-RED records the speech wav file and calls the Watson Speech to Text service hosted in IBM Cloud.
  3. Watson Speech to Text uses machine learning to decode the user's speech.
  4. Watson Speech to Text replies with a transcript of the COVID-19 question and Node-RED calls Watson Assistant service hosted in IBM Cloud.
  5. Watson Assistant uses natural language understanding and machine learning to extract entities and intents of the user's question.
  6. Source COVID-19 FAQ information from trusted CDC data
  7. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  8. IBM Cloud Function calls the Watson Discovery service running in IBM Cloud.
  9. Watson Discovery scans news articles and responds with relevant articles.
  10. Watson Assistant invokes an OpenWhisk open source powered IBM Cloud Function.
  11. IBM Cloud Function calls the COVID-19 API to get statistics.
  12. Watson Assistant replies to the user inquiry and Node-RED sends the text transcript to Watson Text to Speech.
  13. Watson Text to Speech encodes the message in the user's language.
  14. Node-RED plays the chat answer wav file to the user.
  15. User listens to the chat answer.

Documents

Trusted sources for COVID-19 information

Tutorials and documentation:

Datasets

Technology

IBM technology

Open source technology

Getting started

Prerequisite

Set up an instance of Watson Assistant

Log in to IBM Cloud and provision a Watson Assistant instance.

Step 1. From the IBM Cloud catalog, provision an an instance of Watson Assistant. Watson Assistant Catalog

Step 2. Launch the Watson Assistant service.

Step 3. Click Create assistant and follow these detailed instructions for how to create an assistant. Watson Assistant Photo2

Step 4. Name the Watson Assistant instance COVID Crisis Communication Watson Assistant Photo3

Step 5. Click Add Dialog skill to add this to your assistant. Follow the documentation if you have questions. Watson Assistant Photo4

Step 6. Click Import skill > Choose JSON file and import the skill-CDC-COVID-FAQ.json file. Watson Assistant Photo5

Step 7. Go back to the All Assistants page. From the action menu ( ), open Settings. Watson Assistant Photo6

Step 8. On the Settings tab, click API Details on the left and make a note of the Assistant ID and Api Key for future use. Watson Assistant Photo7

Step 9. Go back to the All Assistants page and click on the Skills link. Watson Assistant Skills

Step 10. On the Skill page, click on the action menu ( ), open View API Details. Watson Assistant Skill Properties

Step 11. On the Skill Details page, make note of the Skill ID for future use. Watson Assistant Skill Details

Step 12. Go back to your dialog skill and click on the Preview Link button on the side to get a link to test and verify your assistant. Watson Assistant Photo9

Step 13. Ask the Watson Assistant chatbot some questions about COVID-19.

Connect your chatbot to data sources via a webhook

Now that you’ve created your Watson Assistant-enabled chatbot, you need to connect it to a data source. With Watson Assistant, you need to do this via a webhook.

A webhook is a mechanism that allows you to call out to an external program based on something happening in your program. When used in a dialog skill, a webhook is triggered when the assistant processes a node that has a webhook enabled. The webhook collects data that you specify or that you collect from the user during the conversation and save in context variables. It sends the data as part of a HTTP POST request to the URL that you specify as part of your webhook definition. The URL that receives the webhook is the listener. It performs a predefined action using the information that you pass to it as specified in the webhook definition, and can optionally return a response.

Follow these instructions for setting up webhook with the Watson Assistant chatbot you just provisioned.

Integrate your COVID-19 chatbot with Slack

Now that you have a functioning Watson Assistant, let's deploy it to Slack. Slack is a cloud-based messaging application that helps people collaborate with one another. After you configure a dialog skill and add it to an assistant, you can integrate the assistant with Slack.

When integrated, depending on the events that you configure the assistant to support, your assistant can respond to questions that are asked in direct messages or in channels where the assistant is directly mentioned.

Read these instructions to learn how to integrate your COVID-19 chatbot with Slack.

Slack Gif

Integrate your COVID-19 chatbot with Node-RED

Want to create a voice-enabled chatbot? This tutorial teaches you how to create a voice enabled chatbot using Node-RED and the Watson Assistant, Watson Speech to Text, and Watson Text to Speech nodes.

Embed your COVID-19 chatbot on a Node.js website

Finally, you can embed your COVID-19 crisis communication chatbot on a Node.js website.

Integrate your COVID-19 chatbot with WhatsApp

WhatsApp is one of the most used platforms in the world with approximately 2 Billion users. This tutorial shows you how to integrate Watson Assistant with WhatsApp.

Disclosures

This tool is intended to provide information based on currently available CDC and other public information to help you make decisions about seeking appropriate medical care. This system is not intended for the diagnosis or treatment of disease or other conditions, including COVID-19, and you should not provide any personally identifying or private health information.

This Watson Assistant bot is populated with data that is sourced from the following resources:

License

This solution starter is made available under the Apache 2 License.

solution-starter-kit-communication-2020's People

Contributors

dependabot[bot] avatar emilyannmitchell avatar iraangeles-sw-dev avatar johnwalicki avatar krook avatar moficodes avatar mridulrb avatar mullerj avatar niuprice avatar pmmistry avatar thomassuedbroecker avatar upkarlidder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solution-starter-kit-communication-2020's Issues

microphone node does not display on dashboard

Hi,

I have copied the node red flow and accessed my dashboard. I saw that there was no microphone button for me to ask a question. I have seen that the node displays on your dashboard so I can't really say its a problem with the node. Could you please help me out with this?

image

Thanks

Audio plays on the Node-RED Editor tab not the Dashboard tab

Problem: "Play Audio" node executes on the Node-RED Editor browser tab. If the /ui dashboard is open on a different laptop, you talk to the chatbot on that 2nd laptop microphone but you hear the response on the laptop that has the Node-RED Editor browser tab open.

Fix: Delete the "Play Audio" node. In your Node-RED palette on the left side, scroll to the Dashboard section. Wire an "audio out" node into your flow where the "play audio" node was connected.

@johnwalicki todo: Post an updated flow, take all new screenshots, modify the readme, modify the tutorial.

Unrecognised Flows

hi, I imported the code to my Node-Red app but some flows are not recognized, here are them listed below:

unknown: ui_button
unknown: ui_ui_controler
unknown: ui_template
unknown: ui_audio
unknown: ui_gauge

please help me with a solution to this issue

Problem Pushing APP from CLI**I dont know how to create a Space from CLI**

I am stuck in this part of the tutorial:

image

I dont understand why when I introduce the last terminal command to finish the whole thing, I get this message:

ERROR
_No se ha establecido ninguna organización ni espacio como destino. Utilice 'ibmcloud target -o ORG -s SPACE' para establecer una organización y espacio como destino.

It says ORG and SPACE have not been defined.

The problem is: I dont know how to create a Space from CLI, as the documentation I have seen online dont help.

Any recommendation would be of great help, thank you.

Carlos

Webhook Issue after adding the TWc api

I updated the cloud function with the new covid-webhook containing TWC APi, but when i try to check stats for country:Nigeria, it returns total number instead. It worked fine before, but I get an error this time.

AM I not setting the parameters right?

webhook error

Results:
{
"error": {
"message": "Insufficient credentials provided in constructor argument. Refer to the documentation for the required parameters. Common examples are username/password and iam_access_token.",
"name": "Error",
"stack": "Error: Insufficient credentials provided in constructor argument. Refer to the documentation for the required parameters. Common examples are username/password and iam_access_token.\n at DiscoveryV1.BaseService.initCredentials (/node_modules/watson-developer-cloud/lib/base_service.js:249:23)\n

Problem Adding skill file to watson

It seems that watson does not recon the file extension, I am doing this in the tutorial for the ibm marathon, and i tried even following your own on the readme but cannot get to work, any ideas?
Edit 1: nevermind friends, got it to work, ive copied the raw file to a blank notepad and saved as description. Before i was downloading the file with wget, i dont know why it wasnt working, so, please consider it working. thx

Using COVID-19 API to get results for other countries

We can update the country parameter to '@sys-location' to make the pattern more functional to fetch other country results as well
Screenshot 2020-04-06 at 1 59 30 PM

The response text can also be updated with the same system entity to have proper responses
Screenshot 2020-04-06 at 2 01 10 PM
Screenshot 2020-04-06 at 2 01 55 PM

It might also make sense to rename the Intent and dialog as well :P thanks

Recommended approach for styling?

Hi there,

Is there an expected way to customize styling for the app after including it on a page? I could see some value in being able to call the script with some custom theme parameters like typeface, background color, and logo.

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.