Skip to content
Vu Bao Nhu edited this page Feb 17, 2021 · 15 revisions

IntroductionOverviewTriggersRepliesConversationsTopicsPlugins and Services


Introduction

What is BotScript?

BotScript is a text-based scripting language and bot engine for creating human-like conversation chat bots.

Why BotScript?

If you're looking to create complex conversations with natural dialogue and different topics, BotScript is for you!

Main Features

  • Document specification, bot language
  • Dialogue management system with flows tracking
  • Stateless dialog engine will parse message request, handle context then response back
  • NLP support by extends the pattern capability
  • Command-service architecture allows to call your own APIs!
  • Built-in events and support custom conditional event.
  • Plugin pipeline for pre or post-processing of message

Installation

The installation using NPM:

GitHub Package Registry

This package is published on both the GitHub Package Registry and the npm registry. To use the GPR, change the registry for the @yeuai scope before installing:

echo "@yeuai:registry=https://npm.pkg.github.com" >> .npmrc

npm install @yeuai/botscript

then use it in your code:

import {BotScript, Request} from '@yeuai/botscript';
const bot = new BotScript();
bot.parse('+ * \n - yes?\n');
bot.handleAsync(new Request('hello'));

Glossary

General:

  • Input: the message sent by the user to the bot.
  • Trigger: a string that is matched against the user's input in order to work out how to respond.
  • Reply: a specific reply given by the bot under certain conditions.
  • Dialogue: a block includes a trigger with one or more replies and any additional rules that tell the bot how to reply to a specific input.
  • Topic: a way to logically group one or more interactions that are about a certain topic, such as football or swimming. All your conversations start within a topic. BotScript will continue to search topics until it finds a matching trigger and reply.
  • Conversation: a set of stories that will only match if a previous interaction in the conversation chain has already been matched.
  • Request: a query message send to dialog box that contains unresolved context and unfulfilled variables.
  • Response: a result message is reached through the dialog box and contains the information to be resolved

Specification:

  • Definition: define bot variables, like: version, list, subsituation, ...
  • Variable: bot knowledge extracted in the converstation
  • Question: parameter need to be resoved in dialogflow
  • Dialogue
  • Flows
  • Command
  • Service
  • Plugin

Continue to Overview

Clone this wiki locally