All Projects → vperrinfr → BotBuilder-Watson

vperrinfr / BotBuilder-Watson

Licence: other
A Microsoft Bot Framework & IBM Watson bot

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to BotBuilder-Watson

skype-bot-php
PHP CLI/Library for the Skype Bot API
Stars: ✭ 64 (+236.84%)
Mutual labels:  skype, bot-framework, skypebot
sbotify
your personal bot that plays spotify music
Stars: ✭ 25 (+31.58%)
Mutual labels:  skype, bot-framework
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+14973.68%)
Mutual labels:  bot-framework, cortana
marconibot
Marco... Polo - Poloni.... Marconi... Poloniex Trade bot
Stars: ✭ 24 (+26.32%)
Mutual labels:  bot-framework
speech-to-text-code-pattern
React app using the Watson Speech to Text service to transform voice audio into written text.
Stars: ✭ 37 (+94.74%)
Mutual labels:  ibm-watson
l2js-client
JavaScript client for Lineage 2
Stars: ✭ 62 (+226.32%)
Mutual labels:  bot-framework
intelligo-generator
🛠️ Chatbot generator for Intelligo Framework.
Stars: ✭ 31 (+63.16%)
Mutual labels:  bot-framework
ar-resume-with-visual-recognition
An augmented reality based résumé with Face recognition. The iOS app recognizes the face and presents you with the AR view that contains 3D mock face and details of your resume.
Stars: ✭ 71 (+273.68%)
Mutual labels:  ibm-watson
steem-bot
Easy automation on top of Steem blockchain
Stars: ✭ 55 (+189.47%)
Mutual labels:  bot-framework
line-chatbot-boilerplate
Opinionated Boilerplate for your Line Messenger Chat Bot
Stars: ✭ 20 (+5.26%)
Mutual labels:  bot-framework
assistant-with-discovery-openwhisk
DEPRECATED: this repo is no longer actively maintained
Stars: ✭ 21 (+10.53%)
Mutual labels:  watson-conversation
IBM-Data-Science-Professional-Certificate
www.coursera.org/professional-certificates/ibm-data-science
Stars: ✭ 44 (+131.58%)
Mutual labels:  ibm-watson
CAI
🤖 又一个 QQ 协议支持库,使用 Python 编写 Yet Another Bot Framework for Tencent QQ Written in Python
Stars: ✭ 121 (+536.84%)
Mutual labels:  bot-framework
cortana-intelligence-energy-demand-forecasting
Energy industry solutions using the Cortana Intelligence Suite with end-to-end walkthrough.
Stars: ✭ 24 (+26.32%)
Mutual labels:  cortana
cerb-release
For over 20 years, teams of all sizes have used Cerb to manage their email workloads. Whether you're a solo founder replying to a few support messages per day, or a team with hundreds of members replying to thousands of messages per hour, you can serve your audience faster with Cerb's time-tested tools. Development at: https://github.com/jstande…
Stars: ✭ 37 (+94.74%)
Mutual labels:  bot-framework
Discord-Bot-TypeScript-Template
Discord bot - A discord.js bot template written with TypeScript.
Stars: ✭ 86 (+352.63%)
Mutual labels:  bot-framework
Holobot
HoloLens bot demo
Stars: ✭ 26 (+36.84%)
Mutual labels:  bot-framework
spring-boot-starter
Spring Boot support for Watson services
Stars: ✭ 12 (-36.84%)
Mutual labels:  watson-conversation
symphony-bdk-java
The Symphony BDK (Bot Developer Kit) for Java helps you to create production-grade Chat Bots and Extension Applications on top of the Symphony REST APIs.
Stars: ✭ 17 (-10.53%)
Mutual labels:  bot-framework
DaProfiler
DaProfiler allows you to create a profile on your target based in France only. The particularity of this program is its ability to find the e-mail addresses your target.
Stars: ✭ 58 (+205.26%)
Mutual labels:  skype

A Microsoft Bot Framework & IBM Watson Bot sample

A sample bot using Microsoft Bot framework as communication channel support and IBM Watson Conversation

Deploy to Bluemix

Introduction

The Microsoft Bot Framework provides just what you need to build and connect intelligent bots that interact naturally wherever your users are talking, from text/sms to Skype, Slack, Office 365 mail and other popular services. More details

IBM Watson Conversation service help you to quickly build and deploy chatbots and virtual agents across a variety of channels, including mobile devices, messaging platforms, and even robots. More details

Why using Microsoft Bot Framework & IBM Watson : Openess

Prerequisites

The minimum prerequisites to run this sample are:

  • Create a Bluemix account & a Watson Conversation Workspace

    • In case, you don't have it : Sign up in Bluemix, or use an existing account $ Acquire Watson Conversation credentials

    • The code needs you to provide the username, password, and workspace_id of your Watson Conversation chat bot. If you have an existing Conversation service instance, follow these steps to get your credentials. If you do not have a Conversation service instance, follow these steps to get started.

  • Latest Node.js with NPM. Download it from here.

  • The [Cloud Foundry][cloud_foundry] command-line client

    Note: Ensure that you Cloud Foundry version is up to date
    
    Note: When pushing to cloud foundry you must explicitly specify what buildpack to use i.e. 
    
    cf push -b https://github.com/cloudfoundry/nodejs-buildpack
    
  • The Bot Framework Emulator. To install the Bot Framework Emulator, download it from here. Please refer to this documentation article to know more about the Bot Framework Emulator.

  • Register your bot with the Microsoft Bot Framework. Please refer to this for the instructions. Once you complete the registration, update your bot configuration with the registered config values (See Debugging locally using ngrok or Deploying to IBM Bluemix)

  • Set up your Azure storage with the following steps.

    • Create an Azure account if you dod not already have one. This should be the account that you used for creating your bot
    • Create a CosmoDB database inside that account named botdocs
      screenshot_new_db
    • Inside that database, create a collection named botdata make sure that the partition key is id screenshot_add_container
    • Make a note of the PRIMARY KEY associated with your account. This must be stored in the environment file as storageKey
    • Take note of the URI associated with your bot account, It will be something like : https://<bot_name>.documents.azure.com:443/ - this will be the storageURL you will save in your environment file below.

Instructions

  • Copy or rename the .env_example file to .env (nothing before the dot) and add your Watson conversations details and Microsoft Bot app keys.
# Environment variables
WORKSPACE_ID=
CONVERSATION_USERNAME=
CONVERSATION_PASSWORD=
#Microsoft Bot Info
appId=
appPassword=
storageKey=
storageURL=
  • Before deploying that code, I recommend you fork it to test it locally with BotFramework emulator. more details

botframework

Code Explanation

Watson Conversation Node.js code : I retrieve the Bot session message, pass that message to Watson Conversation, retrieve the response and send back the response to Bot session.

var bot = new builder.UniversalBot(connector, function (session) {

    var payload = {
        workspace_id: workspace,
        context:'',
        input: { text: session.message.text}
    };

   // I use the Bot Conversation Id as identifier.
    var conversationContext = findOrCreateContext(session.message.address.conversation.id);	
    if (!conversationContext) conversationContext = {};
    payload.context = conversationContext.watsonContext;

    conversation.message(payload, function(err, response) {
     if (err) {
       session.send(err);
     } else {
       console.log(JSON.stringify(response, null, 2));
       session.send(response.output.text);
       conversationContext.watsonContext = response.context;
     }
    });

});

I have a specific function to handle the conversation context.

function findOrCreateContext (convId){
      // Let's see if we already have a session for the user convId
    if (!contexts)
        contexts = [];
        
    if (!contexts[convId]) {
        // No session found for user convId, let's create a new one
        //with Michelin concervsation workspace by default
        contexts[convId] = {workspaceId: workspace, watsonContext: {}};
        //console.log ("new session : " + convId);
    }
return contexts[convId];
}

Results

Channels supported by Bot Framework Channels

My bot tested with Bot Framework test client Test Client in Bot Framework

My conversation with Watson via Microsoft Skype Skype

More Information

To get more information about how to get started, please review the following resources:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].