Coder Social home page Coder Social logo

proyecto26 / mybot Goto Github PK

View Code? Open in Web Editor NEW
31.0 6.0 4.0 12.76 MB

🧠 Create chatbots easily with Bot Framework! πŸ€–

Home Page: http://slides.com/juandavidnicholls/bot-framework

License: MIT License

Batchfile 27.99% JavaScript 71.54% EJS 0.47%
bots bot-framework bot bot-connector nodejs chatbot chat-application chatbots bot-builder bot-api

mybot's Introduction


NodeJS(Express) + Swagger + Multi-Language

Intro β˜•

MyBot can be easily configured in any Express project by adding the bot folder, installing dependencies and initializing it 🀘

Presentations:

Installation ⏯

Do you want to see this template in action? πŸ’»

  • Download the code here
  • To run the project execute the commands:
npm install
npm start

And remember install the following tools to debug your bot locally:

MyBot

More examples with NodeJS:

Bots History 🌎

  • 1960: ELIZA
  • 1970: PARRY
  • 1980: Graphic interface
  • 1990: Search engines
  • 2000: Social/App stores
  • 2010: Bots and agents, human Interaction/Experience

Chatbots types

  • Utilities: It fulfills a function for the users and is measured according to the effectiveness of the answers.
  • Social: Success is measured according to the duration and level of user satisfaction, it is also possible to assess the level of satisfaction through APIs to recognize the level of emotion of users.
  • Assistants (Cortana, Siri, etc): Acts as a facilitator, usually comes integrated with the Operating System. Main features:
    • Utilities and social capacities
    • Continuous relationship with the user
    • Manage system functions

Communication flow

List the functions offered by the bot and describe a step by step for its execution:

  • Task
  • Objective
  • Motivation of the user
  • Steps
  • Forecasts

Experience components

  • Learning and memory
  • Perception and sense
  • Personality (Intelligence)
  • Logic and reason
  • Accessibility
  • Meaning and tone of text
  • Cards
  • Images
  • Emojis
  • Response time
  • Conversational branch

Design

  • Inclusive design (Design for all types of public)
  • UX (Avatar)
  • Character with personality
  • Define the devices and channels to support (Cortana, Email, Facebook, etc)
  • Form flow (conversation follow-up, validate the data)
  • Prevent redirections

Lifecycle

Bot Lifecycle

Bot Framework πŸ€–

Open Source Framework to create and connect bots (Cross channel, AI and Up-to-Date resources). Bot Framework

Bot Connector Service

Integrate the bot with different channels as Slack, Skype, Messenger, SMS, etc. Bot Connector

The Bot Connector can connect with the intelligence services and implement other functionalities such as:

  • Ability to store the state of the conversation.
  • Translate services.
  • Telemetry. Information about the service is collected, such as the number of requests, messages that have failed, etc.

Bot Builder

SDKs for .NET, NodeJS or we can use REST APIs to create and debug bots. It also includes the Bot Framework Emulator to test our bots and the Channel Inspector to preview the user experience of our bot on different channels. Integrate external services and Manage the conversation using LUIS (Language Understanding Intelligent Service).

Microsoft Cognitive Services 🌐

Set of APIs to create smart applications.

Vision πŸ‘€

Image-processing algorithms to smartly identify, caption and moderate your pictures.

  • Computer Vision (Images)
  • Emotion
  • Content Moderator
  • Face
  • Video

Speech πŸ’¬

Convert spoken audio into text, use voice for verification, or add speaker recognition to your app.

  • Custom Speech Service (CRIS)
  • Speaker Recognition
  • Speech
  • Translator

Language 🀝

Allow your apps to process natural language with pre-built scripts, evaluate sentiment and learn how to recognize what users want.

  • Bing Spell Check
  • Language Understanding
  • Linguistic Analysis
  • Text Analytics
  • Web Language Model

Videos πŸ“Ή

To Learn

Knowledge πŸ“–

Map complex information and data in order to solve tasks such as intelligent recommendations and semantic search.

  • Academic Knowledge
  • Entity Linking
  • Knowledge Exploration
  • Recommendations
  • QnA Maker

Search πŸ”Ž

Add Bing Search APIs to your apps and harness the ability to comb billions of webpages, images, videos, and news with a single API call.

  • Bing Autosuggest
  • Bing Image Search
  • Bing News Search
  • Bing Video Search
  • Bing Web Search

QnA Maker πŸ‘·

A free and easy-to-use REST API based on artificial intelligence to respond to users' questions in a natural way through an optimized learning logic (Machine Learning). It is a question and answer service with a graphical interface that allows it to be easy to administer.

.NET Example
[Serializable]
public class QnADialog : QnAMakerDialog {

  public QnADialog() : 
  base(new QnAMakerService(new QnAMakerAttribute("subscriptionKey", "knowledgeId", "answer not found", 0.5)))
  {
  }

  protected override async Task RespondFromQnAMakerResultAsync(IDialogContext, IMessageActivity message, QnAMakerResult result)
  {
    Activity response = ((Activity)context.Activity).CreateReply();

    var firstAnswer = result.Answers.FirstOrDefault()?.Answer;
    var data = firstAnswer.Split("---");

    if(data.Length == 1) {
      return await context.PostAsync(firstAnswer);
    }

    //Example to get data with a separator
    var title = data[0];
    var description = data[1];
    var url = data[2];
    var image = data[3];

    CustomCard card = new CustomCard 
    { 
      Title = title, SubTitle = description
    };

    card.Buttons = new List<CardAction>
    {
      new CardAction(ActionTypes.OpenUrl, "text", value: url)
    };

    card.Images = new List<CardImage>{
      new CardImage(url = image)
    };

    response.Attachments.Add(card.ToAttachment());

    return await context.PostAsync(response);
  }
}

Installation

  • NodeJS via npm: botbuilder-cognitiveservices
  • .NET via Nuget package: Microsoft.Bot.Builder.CognitiveServices

QnA Maker Dialog

Personalization in the response to the user according to the reliability control.

[Serializable]
[QnAMaker("subscriptionKey", "knowledgeId", "standard phrase when it doesn't satisfy the minimum response reliability index", 0.5, 1)]
public class QnADialogWithActiveLearning : QnAMakerDialog 
{
}

Channels

A channel is a connection between Bot Framework and communication applications.

Publish

  • Skype:

A Skype account is required, we can deploy bots to test.

  • Microsoft Teams:

An office 365 account is required. We need to enable the permissions to use external apps from the administration panel of Office 365 (Configuration/Services...).

  • Telegram:

A Telegram account is required. BotFather is an app that we need to install to create and manage our bots, check here.

  • Web Chat:

It's inserted using a HTML Iframe.

  • Slack:

It's required to create an app from Slack API, add a new Redirect URL to https://slack.botframework.com and enter the credentials.

Resources β›©

Credits πŸ‘

Contributing ✨

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated ❀️.
You can learn more about how you can contribute to this project in the contribution guide.

Collaborators πŸ₯‡

jdnichollsc
Juan Nicholls

Supporting 🍻

I believe in Unicorns πŸ¦„ Support me, if you do too.

Donate Ethereum, ADA, BNB, SHIBA, USDT, DOGE:

Wallet address

Wallet address: 0x3F9fA8021B43ACe578C2352861Cf335449F33427

Please let us know your contributions! πŸ™

License βš–οΈ

This repository is available under the MIT License.

Happy coding πŸ’―

Made with ❀️

mybot's People

Contributors

jdnichollsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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