Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with Microsoft Bot Framework #290

Closed
gunthercox opened this issue Sep 9, 2016 · 11 comments
Closed

Integration with Microsoft Bot Framework #290

gunthercox opened this issue Sep 9, 2016 · 11 comments
Assignees

Comments

@gunthercox
Copy link
Owner

The Microsoft Bot Framework has some great features that allow a chat bot to easily connect with various online services. Adding support so that ChatterBot adapters can connect to the Bot Framework endpoint to do various tasks might be useful.

@davizucon
Copy link
Collaborator

Hi @gunthercox,It'll be a great addition !

I already tried REST API version 3.0 to connect with skype, IMO, bot REST API still very new and has a poor error handling.

Maybe with Node or C# works better.

@rmdort
Copy link
Collaborator

rmdort commented Oct 15, 2016

👍 Looking forward to bot framework intergration

@vkosuri
Copy link
Collaborator

vkosuri commented Oct 30, 2016

@gunthercox interested to work for it, Any ETAs for this task?

@gunthercox
Copy link
Owner Author

@vkosuri Unfortunately I haven't had a chance to look into this yet. The REST API documentation for the bot framework looks to be rather thorough, but I haven't been able to look into what would be required to support integration with it or how much work it would involve.

@vkosuri
Copy link
Collaborator

vkosuri commented Nov 1, 2016

@gunthercox By going through some of the guideline of Bot Connector - Direct Line API - V1.0 https://docs.botframework.com/en-us/restapi/directline/#navtitle

These things we need to to accomplish. Can i submit PR for these changes?

Authentication

-- connect to directline.botframework.com --
POST /api/conversations/abc123/messages HTTP/1.1
Authorization: BotConnector RCurR_XV9ZA.cwA.BKA.iaJrC8xpy8qbOF5xnR2vtCX7CZj0LdjAPGfiCpg4Fv0
[other HTTP headers, omitted]

Starting a conversation

-- connect to directline.botframework.com --
POST /api/conversations HTTP/1.1
Authorization: BotConnector RCurR_XV9ZA.cwA.BKA.iaJrC8xpy8qbOF5xnR2vtCX7CZj0LdjAPGfiCpg4Fv0y8qbOF5xPGfiCpg4Fv0y8qqbOF5x8qbOF5xn
[other headers]

-- response from directline.botframework.com --
HTTP/1.1 200 OK
[other headers]

{
    "conversationId": "abc123",
    "token": "RCurR_XV9ZA.cwA.BKA.iaJrC8xpy8qbOF5xnR2vtCX7CZj0LdjAPGfiCpg4Fv0y8qbOF5xPGfiCpg4Fv0y8qqbOF5x8qbOF5xn",
}

Sending an Activity to the bot

-- connect to directline.botframework.com --
POST /api/conversations/abc123/messages HTTP/1.1
Authorization: BotConnector RCurR_XV9ZA.cwA.BKA.iaJrC8xpy8qbOF5xnR2vtCX7CZj0LdjAPGfiCpg4Fv0
[other headers]

{
  "text": "hello",
  "from": "user1"
}

-- response from directline.botframework.com --
HTTP/1.1 204 No Content
[other headers]

@gunthercox
Copy link
Owner Author

@vkosuri Sure, a pull request would be fantastic!

@vkosuri vkosuri self-assigned this Nov 2, 2016
@vkosuri
Copy link
Collaborator

vkosuri commented Nov 2, 2016

Methods trying to implement using DirectLine client

POST /api/tokens to get a token for a conversation
GET /api/tokens to refresh a token

GET /api/conversations to start a new conversation
POST /api/conversations/{id}/messages to send a message
GET /api/conversations/{id}/messages to receive messages
POST /api/conversations/{id}/upload to upload an attachment

@vkosuri
Copy link
Collaborator

vkosuri commented Nov 4, 2016

  • Input adapter
  • Output adapter
  • Tests
  • Documentation
  • Example code

@phpmind
Copy link

phpmind commented Nov 9, 2016

vkosuri - I am very new to chat bot world. However I have a question. What is the advantage of using ChatterBot instead of using Microsoft Bot Framework in terms of features and accuracy?

@vkosuri
Copy link
Collaborator

vkosuri commented Nov 11, 2016

@phpmind Am also like you, @gunthercox could you please answer his question?

@gunthercox
Copy link
Owner Author

@phpmind There are different advantages to using ChatterBot and Microsoft Bot Framework. Choosing one over the other greatly depends on what you want to create. Here are a few major differences that I can point out. There may be others, but these seem like the most important.

ChatterBot Microsoft Bot Framework
Open source, allows you to host it your self online or offline. Requires a developer account and a connection to the Microsoft Bot Framework API
Supports integration with some chat platforms and allows for new platforms to be added by the developer. Supports integration with many chat platforms.
Does not support survey data gathering out of the box. The developer is responsible for coding this logic. Has great support for allowing the bot to survey the user for information. This is useful for allowing a bot to ask a user for information needed to schedule an appointment.
Supports learning to communicate based on interactions with users.
Supports highly customizable response selection logic.

Right now, Microsoft Bot Framework is ideal if you want to create a bot that handles a repetitive task that requires a user to provide several different informational components. ChatterBot is intended to provide support for textual conversations but it leaves prompting for questions up to the developer. A good use case for ChatterBot might be a bot that answers questions in a chat room when you are not around. The bot would be able to learn from past conversations and it's knowledge and accuracy would improve over time.

There are advantages to both, the goal of adding support for integration with Microsoft Bot Framework to ChatterBot is to allow developers to leverage the best parts of both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants