In previous chapters, we dealt with conversation management in one of the two ways—built from scratch (Chapter 3, Let's Talk Weather) or using GUI tools such as Dialogflow (Chapter 4, Building a Persona Bot) and Chatfuel (Chapter 1, Introduction). In Dialogflow and Chatfuel, the conversational flow was specified by the developer using visual elements (such as forms) on their custom-built web-based editor. However, it may not always be the best way to tell the system how to manage the conversation. On the other hand, we built a simple conversation manager in Java. Conversation management can get complicated in complex human-chatbot conversations. Luckily, we have got toolkits that allow us to build conversation management modules using code libraries specifically built for the purpose.
In this chapter, we are going to explore how a conversation...