Can bot talk firstly in dialogue?

In each rasa story, we usually start with a intent in the steps. When we run this bot, we need to input text firstly then the bot will react. It seems that we can only define stories in this way. Can we just let the bot to talk firstly? In some application scenario we need this kind of bot. For example, the assistant to help customers to operate machine or buy tickets. The bot should talk first, greet first, or provide some choices for customers, otherwise the customer will be puzzled how to talk to the bot firstly. Is it possible for us to realize this function in rasa? How can we achieve this aim?

Please read:

I read through the three issues. Your suggestion to them is using personal frontend application: such as making some change to a opensource frontend.

But I am not familiar with frontend technologies such as JavaScript language and so on. And I want the the welcome message to be the format as rasa button response: to let customer select the intent but not only see a message.It’s something like a train ticket assistant, usually the bot show some options for customer to select just in the dialogue startup. I think this is a very common scenario.

It seems we can not get to this aim as response buttons is not supported to be the first step in a story and can not be implemented in personal frontend application by using frontend changing method.

The suggestion is not to use an application, but to code the starting action in there.

I assumed you would need to have an application anyway - Otherwise where would the users talk to the bot? You shouldn’t give your users access to Rasa X.

Anyway, you could also override the ActionSessionStart Default Action as shown here.

Thanks! I read through your suggestion in those topics again, you mentioned both ActionSessionStart and personal frontend. You also inform me to use ActionSessionStart in last message.

But how to use ActionSessionStart to get to the goal? I tested ActionSessionStart just now. It does not work according to my expectation. Anyway I must input something to trigger ActionSessionStart. It will not run automatically without human’s input. Your suggestions in that three topics have not explain how to use ActionSessionStart for generating welcome message.

You told me “but to code the starting action in there”. This means I need to code frontend to simulate to send start message as if a human input, right? Such as a send() function in JavaScript.

Yup! That’s why I’d rather suggest doing it in your frontend app:

To trigger ActionSessionStart, you must start a session! While if you do it in your app, your initial send function will do it on its own by sending a hidden message from the user to the bot.

Exactly :slight_smile: You could do it with any language where you can do HTTP GET and POST requests, not only JavaScript.

I have seen the two github respository:

But I were puzzled by how to deploy them. The docs are not clear. Could you please explain that for me? 1.How to added rest channel in the credentials.yml file? The doc of Chatbot Widget did not show the format. 2.Where should I deploy the Chatbot Widget folder? In server or in my computer?

These two are especially easy to deploy since they’re normal HTML+Js web apps. Just put the folder anywhere and open index.html in a browser.

rest: # This channel doesn't require any credentials.

rasa: # Needed for Rasa X
  url: "http://localhost:5002/api"

If you want it to be available on the internet, put it on a server.

If you want it to be available locally, put it on your computer.

If you want it to be available on your network, put it on a local server like Wamp.

I would like to deploy it on my centos server and make the web service available on the LAN, let other people on the LAN could browse the web page and start the dialogue. 1.It seems that I “rest:” should be left blank. Only “rasa:” should be config a url. 2.I want to use ngrok as it run on a centos server. The command: ngrok http 5005; rasa run (Connecting to Messaging and Voice Channels) So I need to download Chatbot-Widget to my centos server, right? Must I perform ngrok command in this Widget folder? And what web url should I input in my web browser to see the dialogue?

So instead of Wamp, look up how to set up a web server using Apache 2 on CentOS and allowing LAN access to it.

You can download it wherever you want the web app to be, as long as it can communicate with the Rasa server.

If the web server and Rasa server are on the same computer or connected computers, no need to use Ngrok.


@atptour I guess, I can suggest some pointers, which I easy to handle and fit with your use case. Thou, Chris guiding you the right solution.

Is that you aware of Rasa Botfront? (used for frontend)

In this there is one field, initPayload in this you can mention the welcome greet or menu intent and it will automatically start the conversation as you click on the chatbot button.

If you like to know more please let me know, while mention @ and nik202. Thanks.

1 Like

Here is example ho you get bot start discussion, I’m using Botfront Webchat, you see that initPayload that can pass any intent to bot and then define what bot says first

<!doctype html>
    <meta charset="UTF-8">
    <script src=""></script>
    <link rel="stylesheet" type="text/css" href="style.css">

<div id="webchat"></div>
    showFullScreenButton: true,
    selector: "#webchat",
    initPayload: "/tervetuloa",
    customData: {"language": "fi"}, // arbitrary custom data. Stay minimal as this will be added to the socket
    //socketUrl: "",
    socketUrl: "",
    socketPath: "/",
    embedded: false,
    title: "Alma botti",
    subtitle: "Ammatinvalinta botti",
    inputTextFieldHint: "Hae ammattia...",
    profileAvatar: "robot_icon.png",
    params: {"storage": "session"} // can be set to "local"  or "session". details in storage section.


@InnoOmnia are you sure this snippet code is working? can you confirm me the version of rasa you are using?

@nik202 Thanks! I have big interest. I would like to know more about it. I will try it.

Perfect! Thanks a lot for your example! I will try it.

I use rasa 2.2 because is/was broken in higher (Rasa) versions (this spring) and this uses

@InnoOmnia rasa/botfront updated there snippet code check there GitHub repo and new code, for latest version you just need to update version to 1.0.1 and before that 1.0.0. Ref:

@atptour Please see this video, and try integrate, and then let me know I will guide your further Rasa chatbot website integration | Quick tutorial - YouTube

Yes, I know, is there some other improvements too? That it is worth of upgrading?

@InnoOmnia yes, go and try its more stable version! I only asked to you as your code snippet is old.