Coder Social home page Coder Social logo

data-henrik / watson-chatbot-discovery-news Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 3.0 14 KB

A small chatbot showing how to incorporate IBM Watson Discovery News into a Watson Assistant bot

License: Apache License 2.0

Python 100.00%
ibm-cloud watson-assistant watson-conversation watson-discovery news newsapi chatbot ibm python

watson-chatbot-discovery-news's Introduction

Note:

A version for integrating Watson Discovery News as web action is in the branch function.

Small chatbot with current news

A small chatbot showing how to incorporate IBM Watson Discovery News into a Watson Assistant bot

Setup

In Watson Assistant create a new skill by importing the file botWithNews.json.

Then, follow the instructions for the Watson Conversation Tool to configure the service credentials for IBM Watson Assistant. Then, in processDiscoveryNews4chat.py replace the values for username and password with the correct ones for the Discovery service.

Test

You can test the chatbot using the following command. Use your workspace_id: python wctool.py -dialog -id your-workspace-id -actionmodule processDiscoveryNews4chat -outputonly

If you want to see the full JSON structures then leave out the option outputonly.

Here is a sample conversation:

Please enter your input message:
news about "IBM Cloud"
>> processing client actions...

Response:
[ "This is what I found: IBM reinforces enterprise multicloud growth // International Business Machines : IBM Introduces New Services to Automate Cloud Migration // Here's What You Missed Out by Overlooking IBM's Stock // IBM Extends Reach of Kubernetes Platform to Multiple Clouds // IBM reinforces multicloud growth with automation tools, ServiceNow expansion // Hundreds of Leading Global Enterprises Deploy IBM Cloud Private // SES Networks Enables Direct Connectivity to IBM Cloud via Global Satellite Network // International Business Machines : Hundreds of Leading Global Enterprises Deploy IBM Cloud Private // SES Networks Enables Direct Connectivity to IBM Cloud via Global Satellite Network // Industry Insight: IBM on Multicloud Search and AI Strategy" ]

Architecture / Flow

Within the Dialog is a node news-child. It extracts the search term for Discovery and sets up a client action. The Watson Conversation Tool processes that action by directing the execution to the module processDiscoveryNews4chat.py. The function inside the module sets up a session with Discovery and performs a natural language query with the search term. The result is passed back to Watson Assistant in the specified variable, myNews.

watson-chatbot-discovery-news's People

Contributors

data-henrik avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.