Skip to content
Vu Bao Nhu edited this page Oct 27, 2019 · 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!

Features

  • Document specification
  • Message pipeline with NLP support
  • Stateless dialog engine will parse message request, handle context then response back
  • Extensible plugin architecture to call your own APIs or do your own NLP if you want to!

Installation

The installation using NPM:

npm install -g @yeuai/botscript

either run the cli:

$ botscript

or use it in your code:

const BotScript = require('@yeuai/botscript')
const bot = new BotScript()
bot.parse('> * \n < yes?\n')
bot.reply('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.
  • Interaction: 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, ...
  • Variables: bot knowledge
  • Parameters: available in topic, a paramter is a scope variable

Continue to Overview

Clone this wiki locally