×
Community Blog Botpress: Introduction and Best Practices

Botpress: Introduction and Best Practices

This tutorial explores the Botpress file structure, modules, intents, how you can develop a chatbot and create a bot from existing Botpress templates.

A Crash Course on the Botpress Architecture

We'll look at Botpress's open-source project framework, including its file structure, intents, entities, abilities, and modules, in this essay. Botpress is a highly versatile and useful forum for creating chatbots, if you haven't heard about it yet. Botpress has been used by many companies to develop their own chatbot services.

Understanding its file structures will allow you to make custom configurations to serve your unique project needs. It will also allow you to create configurations that you can integrate with major messenger platforms like WhatsApp and Viber, besides several other platforms that are not covered in Botpress's default package. However, do keep in mind that you will need to have some basic programming skills and understand how open-source projects work to be able to get anywhere with Botpress. The languages used to create Botpress include NodeJS, Typescript, JavaScript and React.

Requirements

For this tutorial, you will need the following:

  1. A valid GitHub account.
  2. A Botpress server running in your Alibaba Cloud instance.
  3. Visual Studio Code (or PyCharm) to explore the source code.

In this tutorial, we explored the Botpress file structure, as well as modules, intents and even looked at some bits of the source code. Botpress is one of the leading open-source bot frameworks in the market today. It is well supported as evidenced by the numerous releases put forward to support the framework. There are two types of licences available for the users of Botpress, commercial licenses and the AGPL licence.

Creating a FAQ ChatBot That's Integrated with Facebook Messenger

Developing an FAQ chatbot is an intuitive way for you to be able to answer the common questions that your customers ask. The chatbot you develop could be easily integrated with your apps, website and even your related social media accounts to enhance your customer interactions on these platforms and provide instant feedback to simple but useful questions that would have otherwise take a longer time to answer.

In this tutorial, you will learn how you can develop an FAQ chatbot that is integrated with Facebook messenger by using the Botpress engine that we set up in a previous tutorial. Note that it is also possible to develop your very own chatbot entirely on your local machine and then upload it to your online server.

Prerequisites

To complete this tutorial, you'll need the following items:

  1. A bot engine running on an Alibaba Cloud Elastic Compute Service (ECS) instance. So, if you haven't already, make sure you have purchased an ECS instance.
  2. An active Facebook account for developers. If you don't have one we will be going through a steps on how to get one in this tutorial.

Getting Started with Botpress on Alibaba Cloud

It's pretty unlikely that you haven't already interacted with a chatbot at some point in time. You probably interacted with one while reaching out to Facebook's user support, while placing an order on your favourite ecommerce platform, or while engaging with your bank online. Nowadays there are chatbots for almost everything you could imagine them for.

While it sounds interesting that we can build software to take over human communications and improve the productivity of our company, it's reasonable to say that developers also do not want to spend months setting up the infrastructure for this to all work. In fact, without any assistance, building a proper chatbot would be a real headache and not at all as exciting as it may initially sound.

For a chatbot to work, you need an immense, sizeable amount of code, and you also need a a natural language unit to understand user intentions. These are the challenges that open-source chatbot frameworks have been built to resolve. They can enable developers set up the bot infrastructure in a matter of hours, rather than several months, and make it easy to launch a bot for virtually any service. Open-source bots are able to interact with backend systems using API actions, save content in databases, read and write files and carry out regular tasks such as responding to frequently asked questions.

In general, these open-source bots consist of the following core units:

  1. A publicly accessible web server.
  2. Data storage service.
  3. Intelligent algorithm service, or more particularly, a natural language unit (NLU).
  4. An SDK and tools to interface with apps and websites.

So, there's a lot to love about these open-source bots. The one we will be working with in this tutorial is called Botpress.

Prerequisites

To get Botpress set up, we will be using the following items:

  1. An Alibaba Cloud Elastic Compute Service (ECS) instance installed with Ubuntu 18.04, with 4 GB of RAM and at least 40 GB storage.
  2. A NGINX web server installed.
  3. A Certbot installed.
  4. A domain. For this, you can register for a domain using Alibaba Cloud Domain Name System (DNS). Alternatively, you can just use your local IP address to get started.

Related Products

Elastic Compute Service

Alibaba Cloud Elastic Compute Service (ECS) provides fast memory and the latest Intel CPUs to help you to power your cloud applications and achieve faster results with low latency.

Elastic Compute Service (ECS) is a high-performance, stable, reliable, and scalable IaaS-level service provided by Alibaba Cloud. ECS eliminates the need to invest in IT hardware up front and allows you to quickly scale computing resources on demand. This makes ECS more convenient and efficient than physical servers. ECS provides a variety of instance types that suit different business needs and help boost business growth.

Alibaba Cloud DNS

Alibaba Cloud DNS is a secure, fast, stable, and reliable authoritative DNS service. It helps enterprises and developers convert human-readable domain names into machine-readable IP addresses and then routes user requests to required website or application servers.

Related Documentation

Quick reference for Elastic Compute Service

This guide offers solutions for scenarios such as how to connect to ECS instances, change operating systems, resize cloud disks, upgrade or downgrade configurations, and use snapshots or images.

0 0 0
Share on

Alibaba Clouder

2,599 posts | 758 followers

You may also like

Comments