Skip to content

valnav/human-handoff-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.7%
  • C# 2.7%
  • CSS 1.2%
  • Other 0.4%