Run rasa outside of command line

Hi there,

I’m relatively new to RASA, and built my chatbot based on the tutorial, which runs it on cmd. I used the same files, and made some custom actions as well. It works great in the cmd, but since we want to run it on an actual robot together with asr and tts and everything, I need to be independent from the cmd.

So, I want to run my chatbot without being dependent on the command line, and I think I need to make a file for that. However, I’ve looked at some examples, like the restaurantbot and the weatherbot, but the files always differ and I have no idea how to correctly compose one and what should be in there, what not and so on…

Can anyone please help me? Thank you!

Hi @ellav . Happy to help you out with this :slight_smile:

First question - which version of Rasa are you running? If you are using Rasa 1.0, you don’t need to create any files to run your bot bot anymore. Instead, you need only three things:

  1. Create a connector between the Rasa and your frontend. Unless you use one of the already pre-built connectors, you will likely need to create a custom connector which will collect the user inputs from your frontend and pass them to Rasa and vise versa. I could help you out with more details on that if you could tell me more about what frontend you are planning to use for your assistant.

  2. Provide the details to your connector in the credentials.yml file (check out the example here.

  3. Run you assistant on a server using ‘rasa run --enable-api’ (this will start the Rasa server which you will get a request sent to it once the user asks something using the frontend)

At this point, the best example to see how to implement a custom connector and run Rasa outside the command line is our tutorial on building a Rasa-powered Google Assistant. It’s a step-by-step tutorial which I hope will give you some good ideas on how to implement things for your own project. I am happy to help you out with that, it would be helpful if you could share more ideas with me on what Rasa version you are running and what frontend are you planning to use for your assistant :slight_smile:

Hi! Thank you so much for helping me! I’m running version 1.1.4. Well… with frontend we’re not really sure, since the user will speak to the robot and there is an ASR module that will generate the textual input for rasa. So that will be the input necessary for rasa. After rasa decides what to give back, I need to generate the output, which is the thing the robot will say back to the user, via a TTS module. So I guess there’s actually not really a frontend…

So the basic idea is that the ASR system will generate the text that will be sent in a JSON file via ZMQ to RASA, and then RASA puts the message the bot should send (the output) in the JSON file to send it to the TTS system, again via ZMQ. Could you shed some light on this, @Juste? I know I should do stuff with the file, but there’s a lot in that file that I don’t understand. Thank you!

Hey @ellav. Which ASR are you planning to use?

We plan on using DeepSpeech.

Ok, I am actually in the process of writing a proper tutorial on that. I’ll share it with you once it’s published :slight_smile: