Programming

My VS Code Setup To Prototype Rasa Chatbots

Some VS Code Features To Streamline The Development Workflow

___
___
Nov 25, 2020 · 7 min read
Image for post
Image for post

Introduction

Prerequisites

The Setup

Overview

Step 1: Creating An Action Server

Image for post
Image for post
Figure 1: An environment for the action server
Image for post
Image for post
Figure 2: Action server environment with useful libraries for development

Step 2: Defining The Required Services

Image for post
Image for post
Figure 3: The services the bot will need

Step 3: Creating A New Rasa Project

Image for post
Image for post
Figure 4: Launching the bot using the command palette

Step 4: Setting up the debugging infrastructure for custom actions

Image for post
Image for post
Figure 4: Launch configuration to debug an action server

Some Shortcuts

Image for post
Image for post
Figure 5: Sample content of a tasks.json file
Image for post
Image for post
Figure 6: Executing a Task in the VS Code
Image for post
Image for post
Figure 7: Finding the task we want to execute

Sample Workflows

Writing A Custom Action

Image for post
Image for post
Figure 8a: Launching the “Attach to Running Container” command
Image for post
Image for post
Figure 8b: Attaching to the action server

Debugging A Custom Action

Image for post
Image for post
Figure 9: The default custom action in actions.py
Image for post
Image for post
Figure 10: Config update in endpoints.yml
Image for post
Image for post
Figure 11: Config update in domain.yml
Image for post
Image for post
Figure 12: Rule update rules.yml
Image for post
Image for post
Figure 13a: Launching a debug configuration
Image for post
Image for post
Figure 13b: Selecting the configuration to debug the action server
Image for post
Image for post
Figure 14: Inserting a breakpoint at line 25 in actions.py
Image for post
Image for post
Figure 15: action_hello_world paused at line 25

Cleaning Up

Image for post
Image for post
Figure 16: Stopping all the containers

Benefits

Conclusion

Towards AI

The Best of Tech, Science, and Engineering.

Sign up for Towards AI Newsletter

By Towards AI

Towards AI publishes the best of tech, science, and engineering. Subscribe to receive our updates right in your inbox. Interested in working with us? Please contact us → https://towardsai.net/contact Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

___

Written by

___

About me: https://bit.ly/2GQX7i9

Towards AI

Towards AI is the world’s leading multidisciplinary science publication. Towards AI publishes the best of tech, science, and engineering. Read by thought-leaders and decision-makers around the world.

___

Written by

___

About me: https://bit.ly/2GQX7i9

Towards AI

Towards AI is the world’s leading multidisciplinary science publication. Towards AI publishes the best of tech, science, and engineering. Read by thought-leaders and decision-makers around the world.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store