All Projects → dmitrizzle → Chat Bubble

dmitrizzle / Chat Bubble

Licence: mit
Simple chatbot UI for the Web with JSON scripting 👋🤖🤙

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Chat Bubble

Fb Botmill
A Java framework for building bots on Facebook's Messenger Platform.
Stars: ✭ 67 (-81.89%)
Mutual labels:  bot, chatbot, bot-framework
Urban Bot
🤖 The universal chatbot library based on React. Write once, launch Telegram, Facebook, Slack, ... every messenger with chatbots
Stars: ✭ 223 (-39.73%)
Mutual labels:  bot, chatbot, bot-framework
Botframework Webchat
A highly-customizable web-based client for Azure Bot Services.
Stars: ✭ 1,198 (+223.78%)
Mutual labels:  bot, chatbot, bot-framework
Node Telegram Bot Api
Telegram Bot API for NodeJS
Stars: ✭ 5,782 (+1462.7%)
Mutual labels:  bot, chatbot, bot-framework
Telegram Bot Sdk
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
Stars: ✭ 2,212 (+497.84%)
Mutual labels:  bot, chatbot, bot-framework
Botman
A framework agnostic PHP library to build chat bots
Stars: ✭ 5,538 (+1396.76%)
Mutual labels:  bot, chatbot, bot-framework
Botfuel Dialog
Botfuel SDK to build highly conversational chatbots
Stars: ✭ 96 (-74.05%)
Mutual labels:  bot, chatbot, bot-framework
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 (+2463.78%)
Mutual labels:  bot, chatbot, bot-framework
Rasa
💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Stars: ✭ 13,219 (+3472.7%)
Mutual labels:  bot, chatbot, bot-framework
Framework
Chatbot framework
Stars: ✭ 130 (-64.86%)
Mutual labels:  bot, chatbot, bot-framework
Slacker
Slack Bot Framework
Stars: ✭ 495 (+33.78%)
Mutual labels:  bot, chatbot, bot-framework
Yve Bot
Smart rule-based bot. For Browser & Node.
Stars: ✭ 181 (-51.08%)
Mutual labels:  bot, chatbot, bot-framework
Stealth
An open source Ruby framework for text and voice chatbots. 🤖
Stars: ✭ 481 (+30%)
Mutual labels:  bot, chatbot, bot-framework
Intelligo
🤖 Chatbot Framework for Node.js.
Stars: ✭ 347 (-6.22%)
Mutual labels:  bot, chatbot, bot-framework
Poshbot
Powershell-based bot framework
Stars: ✭ 410 (+10.81%)
Mutual labels:  bot, chatbot, bot-framework
Fondbot
Chatbot framework
Stars: ✭ 102 (-72.43%)
Mutual labels:  bot, chatbot, bot-framework
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 (-53.78%)
Mutual labels:  bot, chatbot, bot-framework
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 (+522.16%)
Mutual labels:  bot, chatbot, bot-framework
Gpt2bot
Your new Telegram buddy powered by transformers
Stars: ✭ 228 (-38.38%)
Mutual labels:  bot, chatbot
Python Telegram Bot
We have made you a wrapper you can't refuse
Stars: ✭ 17,209 (+4551.08%)
Mutual labels:  bot, chatbot

chat-bubble 👋🤖🤙

npm version downloads

Simple chatbot UI for the Web with JSON scripting 👋🤖🤙

Screenshot

  • Quick set-up & implementation.
  • Works with or without Natural Language Classifiers.
  • 1KB GZipped. No dependencies. Written with ES5 (compatible with IE11+).

Demo | Tutorial Video


Installation

Yarn/NPM

yarn add chat-bubble or npm install chat-bubble

Download

Get the .ZIP file here.

Quick start

This method assumes you've got a development environment running that's capable of transpiling ES6 JavaScript. There's a short guide on how to get one working here. Otherwise see "I have no ES6 dev environment." This guide will show you how to build this.

/************************************************************************/
/******* CONVENIENCE METHODS AVAILABLE FOR ES6 BUILD ENVIRONMENTS *******/
/************************************************************************/

// the URL of where you've installed the component; you may need to change this:
import {
  Bubbles,
  prepHTML
} from "../node_modules/chat-bubble/component/Bubbles.js";

// this is a convenience script that builds all necessary HTML,
// imports all scripts and stylesheets; your container DIV will
// have a default `id="chat"`;
// you can specify a different ID with:
// `container: "my_chatbox_id"` option
prepHTML({ relative_path: "../node_modules/chat-bubble/" });

/************************************************************************/
/************************ SAMPLE IMPLEMENTATION *************************/
/************************************************************************/

// initialize by constructing a named function...
const chatWindow = new Bubbles(
  document.getElementById("chat"), // ...passing HTML container element...
  "chatWindow" // ...and name of the function as a parameter
);

// `.talk()` will get your bot to begin the conversation
chatWindow.talk(
  // pass your JSON/JavaScript object to `.talk()` function where
  // you define how the conversation between the bot and user will go
  {
    // "ice" (as in "breaking the ice") is a required conversation object
    // that maps the first thing the bot will say to the user
    ice: {
      // "says" defines an array of sequential bubbles
      // that the bot will produce
      says: ["Hey!", "Can I have a banana?"],

      // "reply" is an array of possible options the user can pick from
      // as a reply
      reply: [
        {
          question: "🍌", // label for the reply option
          answer: "banana" // key for the next conversation object
        }
      ]
    }, // end required "ice" conversation object

    // another conversation object that can be queued from within
    // any other conversation object, including itself
    banana: {
      says: ["Thank you!", "Can I have another banana?"],
      reply: [
        {
          question: "🍌🍌",
          answer: "banana"
        }
      ]
    } // end conversation object
  } // end conversation object
);

"I have no ES6 dev environment!"

If you don't want to bother with setting up a development server and transpiler for ES6 code, I get it. Simply unzip the package and create index.html inside of that directory. Then add all the JavaScript that you see below the /*SAMPLE IMPLEMENTATION*/ comment in the code example above. Replace const with var.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>My chat-bubble Project</title>

    <!-- stylesheets are conveniently separated into components -->
    <link rel="stylesheet" media="all" href="../styles/setup.css" />
    <link rel="stylesheet" media="all" href="../styles/says.css" />
    <link rel="stylesheet" media="all" href="../styles/reply.css" />
    <link rel="stylesheet" media="all" href="../styles/typing.css" />
    <link rel="stylesheet" media="all" href="../styles/input.css" />
  </head>
  <body>
    <!-- container element for chat window -->
    <div id="chat"></div>

    <!-- import the JavaScript file -->
    <script src="./component/Bubbles.js"></script>
    <script>
      /************************************************************************/
      /**************** add "SAMPLE IMPLEMENTATION" code here *****************/
      /************************************************************************/
    </script>
  </body>
</html>

Now open this file in your browser. Done!

Demos & more usage examples:

  1. Basic example: see how the code above looks in browser.
  2. Custom starting point: what if you wanted to resume conversation from somewhere other than required ice:{} starting point? This is how you'd do it.
  3. Keyboard input: a basic plugin-like structure that lets you implement your own keyboard input and text recognition (though it does not process natural language).
  4. Run scripts: your bot's replies can do things. Not only it could say something, but it could point your user towards an action, or perform it by running JavaScript.
  5. Natural Language Classifier implementation is possible with additional effort by intercepting the response message and keyboard input. Example using RASA (docs) can be found here.

Check out /examples folder for the source code and more ideas.

FAQ:

  • Can I add images and HTML code to my bot?
    • Yes! custom graphics, YouTube videos - whatever you want!
  • How can I contribute?

Browser compatibility

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