Coder Social home page Coder Social logo

ikishorek / human-handoff-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ankitbko/human-handoff-bot

0.0 2.0 0.0 378 KB

A sample for live human handoff/transfer of conversation from user using Microsoft Bot Framework

Home Page: https://ankitbko.github.io/2017/03/human-handover-bot/

License: MIT License

C# 2.71% CSS 1.21% JavaScript 95.69% HTML 0.38% ASP 0.01%

human-handoff-bot's Introduction

Human Handoff Bot

A sample for live human handoff/transfer of conversation from user using Microsoft Bot Framework.

I have written a blog post explaining the solution - https://ankitbko.github.io/2017/03/human-handover-bot/

Running Solution

  1. Create a Luis app by importing LuisModel\AgentTransfer.json.
    The bot uses Luis to understand if user wants to talk to an agent. If you don't want to use Luis, I have included an EchoDialog class which would also work. You will need to modify the code to start EchoDialog instead of TransferLuisDialog when message arrives (left as exercise to the reader). If you do this, go to step 3.

  2. Get the ModelId and SubscriptionKey of the Luis App and paste it into LuisModel attribute in TransferLuisDialog.cs.

  3. Run the solution by pressing F5. By default, it should start at port 3979. If not, note the port it runs on and stop debugging.

  4. We will use ngrok to debug the bot locally. Download and run ngrok using command ngrok.exe http --host-header=rewrite <port number>. Copy the Forwarding URL (https) which is genrated by ngrok.

  5. Register a new bot in Bot Framework Portal using URL generated by ngrok. Copy the Microsoft App Id and App Password and paste it in web.config.

  6. Agent Dashboard uses Direct Line as a channel. So, enable direct line and keep its Secret Key handy.

  7. Run the solution once again.

To open Agent Dashboard go to http://localhost:3979/agentdashboard/index.html?s=DIRECTLINE_SECRET_KEY. Change the port number accordingly if it is not 3979. Notice the query string ?s=. Enter the Direct Line secret key as the value of the query string.

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.