All Projects → microsoft → Botframework Webchat

microsoft / Botframework Webchat

Licence: mit
A highly-customizable web-based client for Azure Bot Services.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Botframework Webchat

Stealth
An open source Ruby framework for text and voice chatbots. 🤖
Stars: ✭ 481 (-59.85%)
Mutual labels:  bot, chatbot, bot-framework, conversational-ui
Slacker
Slack Bot Framework
Stars: ✭ 495 (-58.68%)
Mutual labels:  bot, chatbot, bot-framework, chat
Botpress
🤖 Dev tools to reliably understand text and automate conversations. Built-in NLU. Connect & deploy on any messaging channel (Slack, MS Teams, website, Telegram, etc).
Stars: ✭ 9,486 (+691.82%)
Mutual labels:  bot, chatbot, bot-framework, conversational-ui
Dialogflow Web V2
Dialogflow Web Integration. Rich Components, Actions on Google and more
Stars: ✭ 307 (-74.37%)
Mutual labels:  bot, chatbot, chat, conversational-ui
Eddi
Scalable Open Source Chatbot Platform. Build multiple Chatbots with NLP, Behavior Rules, API Connector, Templating. Developed in Java, provided with Docker, orchestrated with Kubernetes or Openshift.
Stars: ✭ 171 (-85.73%)
Mutual labels:  bot, chatbot, bot-framework, conversational-ui
Mojo Weixin
使用Perl语言(不会没关系)编写的个人账号微信/weixin/wechat客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,181 (-1.42%)
Mutual labels:  bot, chatbot, chat
Chat Bubble
Simple chatbot UI for the Web with JSON scripting 👋🤖🤙
Stars: ✭ 370 (-69.12%)
Mutual labels:  bot, chatbot, bot-framework
Tiledesk Dashboard
The Tiledesk dashboard. Tiledesk is an Open Source Live Chat platform written in NodeJs, firebase and Angular.
Stars: ✭ 53 (-95.58%)
Mutual labels:  bot, chatbot, chat
Urban Bot
🤖 The universal chatbot library based on React. Write once, launch Telegram, Facebook, Slack, ... every messenger with chatbots
Stars: ✭ 223 (-81.39%)
Mutual labels:  bot, chatbot, bot-framework
Everydaywechat
微信助手:1.每日定时给好友(女友)发送定制消息。2.机器人自动回复好友。3.群助手功能(例如:查询垃圾分类、天气、日历、电影实时票房、快递物流、PM2.5等)
Stars: ✭ 8,688 (+625.21%)
Mutual labels:  bot, chatbot, chat
Aws Lex Web Ui
Sample Amazon Lex chat bot web interface
Stars: ✭ 500 (-58.26%)
Mutual labels:  bot, chatbot, chat
Intelligo
🤖 Chatbot Framework for Node.js.
Stars: ✭ 347 (-71.04%)
Mutual labels:  bot, chatbot, bot-framework
Seq2seq Chatbot
Chatbot in 200 lines of code using TensorLayer
Stars: ✭ 777 (-35.14%)
Mutual labels:  bot, chatbot, chat
Poshbot
Powershell-based bot framework
Stars: ✭ 410 (-65.78%)
Mutual labels:  bot, chatbot, bot-framework
Botui
🤖 A JavaScript framework to create conversational UIs
Stars: ✭ 2,607 (+117.61%)
Mutual labels:  bot, chat, conversational-ui
Botman
A framework agnostic PHP library to build chat bots
Stars: ✭ 5,538 (+362.27%)
Mutual labels:  bot, chatbot, bot-framework
Fb Botmill
A Java framework for building bots on Facebook's Messenger Platform.
Stars: ✭ 67 (-94.41%)
Mutual labels:  bot, chatbot, bot-framework
Gpt2 Telegram Chatbot
GPT-2 Telegram Chat bot
Stars: ✭ 41 (-96.58%)
Mutual labels:  bot, chatbot, chat
Venom
Venom is the most complete javascript library for Whatsapp, 100% Open Source.
Stars: ✭ 3,457 (+188.56%)
Mutual labels:  bot, chatbot, chat
Rasa core
Rasa Core is now part of the Rasa repo: An open source machine learning framework to automate text-and voice-based conversations
Stars: ✭ 2,302 (+92.15%)
Mutual labels:  bot, chatbot, bot-framework

Bot Framework Web Chat

Click here to find out what is new in Web Chat

Bot Framework Web Chat

npm version Build Status Coverage Status

This repository contains code for the Bot Framework Web Chat component. The Bot Framework Web Chat component is a highly-customizable web-based client for the Bot Framework V4 SDK. The Bot Framework SDK v4 enables developers to model conversation and build sophisticated bot applications.

This repo is part of the Microsoft Bot Framework - a comprehensive framework for building enterprise-grade conversational AI experiences.


Version notes

This section points out important version notes. For further information, please see the related links and check the CHANGELOG.md

Visual focus changes to transcript in Web Chat 4.12.0

A new accessibility update has been added to Web Chat from PR #3703. This change creates visual focus for the transcript (bold black border) and aria-activedescendent focused activity (black dashed border) by default.

To modify these styles, you can change the following props via styleOptions:

  transcriptActivityVisualKeyboardIndicatorColor: DEFAULT_SUBTLE,
  transcriptActivityVisualKeyboardIndicatorStyle: 'dashed',
  transcriptActivityVisualKeyboardIndicatorWidth: 1,
  transcriptVisualKeyboardIndicatorColor: 'Black',
  transcriptVisualKeyboardIndicatorStyle: 'solid',
  transcriptVisualKeyboardIndicatorWidth: 2,

The above code shows the default values you will see on Web Chat.

API refactor into new package in Web Chat 4.11.0

The Web Chat API has been refactored into a separate package. To learn more, check out the API refactor summary.

Direct Line Speech support in Web Chat 4.7.0

Starting from Web Chat 4.7.0, Direct Line Speech is supported, and it is the preferred way to provide an integrated speech functionality in Web Chat. We are working on closing feature gaps between Direct Line Speech and Web Speech API (includes Cognitive Services and browser-provided speech functionality).

Upgrading to 4.6.0

Starting from Web Chat 4.6.0, Web Chat requires React 16.8.6 or up.

Although we recommend that you upgrade your host app at your earliest convenience, we understand that host app may need some time before its React dependencies are updated, especially in regards to huge applications.

If your app is not ready for React 16.8.6 yet, you can follow the hybrid React sample to dual-host React in your app.

Speech changes in Web Chat 4.5.0

There is a breaking change on behavior expectations regarding speech and input hint in Web Chat. Please refer to the section on input hint behavior before 4.5.0 for details.

Migrating from Web Chat v3 to v4

View migration docs to learn about migrating from Web Chat v3.


How to use

First, create a bot using Azure Bot Service. Once the bot is created, you will need to obtain the bot's Web Chat secret in Azure Portal. Then use the secret to generate a token and pass it to your Web Chat.

Connect a client app to bot

Web Chat provides UI on top of the Direct Line and Direct Line Speech Channels. There are two ways to connect to your bot through HTTP calls from the client: by sending the Bot secret or generating a token via the secret.

We strongly recommend using the token API instead of providing the app with your secret. To learn more about why, see the authentication documentation on the token API and client security.

For further reading, please see the following links:

Integrate with JavaScript

Web Chat is designed to integrate with your existing website using JavaScript or React. Integrating with JavaScript will give you moderate styling and customizability options.

You can use the full, typical Web Chat package (called full-feature bundle) that contains the most typically used features.

Here is how how you can add Web Chat control to your website:

<!DOCTYPE html>
<html>
  <head>
    <script
      crossorigin="anonymous"
      src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"
    ></script>
    <style>
      html,
      body {
         height: 100%;
      }

      body {
        margin: 0;
      }

      #webchat {
        height: 100%;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <div id="webchat" role="main"></div>
    <script>
      window.WebChat.renderWebChat(
        {
          directLine: window.WebChat.createDirectLine({
            token: 'YOUR_DIRECT_LINE_TOKEN'
          }),
          userID: 'YOUR_USER_ID',
          username: 'Web Chat User',
          locale: 'en-US'
        },
        document.getElementById('webchat')
      );
    </script>
  </body>
</html>

userID, username, and locale are all optional parameters to pass into the renderWebChat method. To learn more about Web Chat props, look at the Web Chat API Reference documentation.

Assigning userID as a static value is not recommended since this will cause all users to share state. Please see the API userID entry for more information.

More information on localization can be found in the Localization documentation.

Screenshot of Web Chat

See the working sample of the full Web Chat bundle.

Integrate with React

For full customizability, you can use React to recompose components of Web Chat.

To install the production build from NPM, run npm install botframework-webchat.

import React, { useMemo } from 'react';
import ReactWebChat, { createDirectLine } from 'botframework-webchat';

export default () => {
  const directLine = useMemo(() => createDirectLine({ token: 'YOUR_DIRECT_LINE_TOKEN' }), []);

  return <ReactWebChat directLine={directLine} userID="YOUR_USER_ID" />;
};

You can also run npm install [email protected] to install a development build that is synced with Web Chat's GitHub master branch.

See the working sample of Web Chat rendered via React.

Experimental support for Redux DevTools

Web Chat internally use Redux for state management. Redux DevTools is enabled in the NPM build as an opt-in feature.

This is for glancing into how Web Chat works. This is not an API explorer and is not an endorsement of using the Redux store to programmatically access the UI. The hooks API should be used instead.

To use Redux DevTools, use the createStoreWithDevTools function for creating a Redux DevTools-enabled store.

  import React, { useMemo } from 'react';
- import ReactWebChat, { createDirectLine, createStore } from 'botframework-webchat';
+ import ReactWebChat, { createDirectLine, createStoreWithDevTools } from 'botframework-webchat';

  export default () => {
    const directLine = useMemo(() => createDirectLine({ token: 'YOUR_DIRECT_LINE_TOKEN' }), []);
-   const store = useMemo(() => createStore(), []);
+   const store = useMemo(() => createStoreWithDevTools(), []);

    return <ReactWebChat directLine={directLine} store={store} userID="YOUR_USER_ID" />;
  };

There are some limitations when using the Redux DevTools:

  • The Redux store uses side-effects via redux-saga. Time-traveling may break the UI.
  • Many UI states are stored in React context and state. They are not exposed in the Redux store.
  • Some time-sensitive UIs are based on real-time clock and not affected by time-traveling.
  • Dispatching actions are not officially supported. Please use hooks API instead.
  • Actions and reducers may move in and out of Redux store across versions. Hooks API is the official API for accessing the UI.

Customizing the Web Chat UI

Web Chat is designed to be customizable without forking the source code. The table below outlines what kind of customizations you can achieve when you are importing Web Chat in different ways. This list is not exhaustive.

CDN bundle React
Change colors
Change sizes
Update/replace CSS styles
Listen to events
Interact with hosting webpage
Custom render activities
Custom render attachments
Add new UI components
Recompose the whole UI

See more about customizing Web Chat to learn more on customization.

Supported Activity Types on the Web Chat Client

Bot Framework has many activity types, but not all are supported in Web Chat. View activity types docs to learn more.

Samples list

View the complete list of Web Chat samples for more ideas on customizing Web Chat.

Further reading

API Reference

View the API documentation for implementing Web Chat.

Browser compatibility

Web Chat supports the latest 2 versions of modern browsers like Chrome, Microsoft Edge, and FireFox. If you need Web Chat in Internet Explorer 11, please see the ES5 bundle demo.

Please note, however:

  • Web Chat does not support Internet Explorer older than version 11
  • Customization as shown in non-ES5 samples are not supported for Internet Explorer. Because IE11 is a non-modern browser, it does not support ES6, and many samples that use arrow functions and modern promises would need to be manually converted to ES5. If you are in need of heavy customization for your app, we strongly recommend developing your app for a modern browser like Google Chrome or Microsoft Edge.
  • Web Chat has no plan to support samples for IE11 (ES5).
    • For customers who wish to manually rewrite our other samples to work in IE11, we recommend looking into converting code from ES6+ to ES5 using polyfills and transpilers like babel.

Accessibility

View the accessibility documentation.

Localization

View the localization documentation for implementing in Web Chat.

Notifications

View the notification documentation for implementing in Web Chat.

Telemetry

View the telemetry documentation for implementing in Web Chat.

Technical Support Guide

View the Technical Support Guide to get guidance and help on troubleshooting in the Web Chat repo for more information before filing a new issue.

Speech

Web Chat supports a wide-range of speech engines for a natural chat experience with a bot. This section outlines the different engines that are supported:

Integrate with Direct Line Speech

Direct Line Speech is the preferred way to add speech functionality in Web Chat. Please refer to the Direct Line Speech documentation for details.

Integrate with Cognitive Services Speech Services

You can use Cognitive Services Speech Services to add speech functionality to Web Chat. Please refer to the Cognitive Services Speech Services documentation for details.

Browser-provided engine or other engines

You can also use any speech engines which support W3C Web Speech API standard. Some browsers support the Speech Recognition API and the Speech Synthesis API. You can mix-and-match different engines - including Cognitive Services Speech Services - to provide best user experience.


How to test with Web Chat's latest bits

Web Chat latest bits are available on the Web Chat daily releases page.

Dailies will be released after 3:00AM Pacific Standard Time when changes have been committed to the main branch.

Contributing

See our Contributing page for details on how to build the project and our repository guidelines for Pull Requests.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Reporting Security Issues

View the security documentation to learn more about reporting security issues.

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