Chatbot interface

Hi,

I’m creating a chatbot a bit different from what we are used to use and I need help and advice. The idea is that the chatbot has an external interface as I have read that for the bot to start the conversation is necessary (correct me if it is not true), the problem is that I have never created an interface like this and when I have tried to take created projects and test them to see how it would look like I can not get it to work, I attach an example of how it looks once written rasa .

I have more doubts, could the bot initiate the conversation in a different way, i.e. if the bot reports the weather, is there a way for the bot to start for example: it is starting to rain and other times: It has stopped snowing. You might think it’s silly to create a bot just for that but there’s more to it than that.

Regarding the web chatbot, I’m using the default project (hi, how are you?, …) I upload all, see if you see anything wrong.

credentials.yml (933 Bytes) index.html (801 Bytes)config.yml (1.4 KB) domain.yml (565 Bytes) endpoints.yml (1.4 KB) nlu.yml (1.4 KB) rules.yml (244 Bytes) stories.yml (542 Bytes) actions.py (742 Bytes)

this is what I see once I type: rasa run -m models --enable-api --cors "*" --debug and open index.html

Thanks!

@Alonso Your approach is just fine, as in dialogue and conversation design we encourage that the bot should welcome the user with the greetings + a choice of selection menu. I will later share you one video tutorial while using rasa/botfront to integrate rasa on website or localhost. On the other hand, You can start the conversation in anyways as you like it, as it fit with your use case or project if you are bot is used for weather forecast then yes you can start with "Hey Hello, please be sure today to grab an umbrella as in your area there is a chance for heavy rainfall " Or snow etc so, in short as the use case as the greeting message. Ref: Rasa chatbot website integration | Quick tutorial - YouTube If you need any further suggestion or help for implementing this interface please mention me.

Thank you very much for your reply. Now I’ll watch the video, maybe there you will see where the error is so that the chatbot does not run on the website. My doubt about the start was to know if you can customize the welcome messages, I understand with your answer that yes, but how could I do it, through actions?

@Alonso As, I said using rasa/webchat its very much simple and you can add any welcome message using custom actions or simple using utterance (domain.yml) file, please see the video and you will get the idea: Ref: https://github.com/botfront/rasa-webchat

Ref code:


<script>!(function () {
  let e = document.createElement("script"),
    t = document.head || document.getElementsByTagName("head")[0];
  (e.src =
    "https://cdn.jsdelivr.net/npm/rasa-webchat@1.x.x/lib/index.js"),
    // Replace 1.x.x with the version that you want
    (e.async = !0),
    (e.onload = () => {
      window.WebChat.default(
        {
          customData: { language: "en" },
          initPayload={"/get_started"}
          socketUrl: "https://bf-botfront.development.agents.botfront.cloud",
          // add other props here
        },
        null
      );
    }),
    t.insertBefore(e, t.firstChild);
})();
</script>

You just need to focus on : `initPayload={"/get_started"}

Just you need to mention in stories.yml

 - story: welcome path
    steps:
      - intent: get_started
      - action: utter_welcome_message
      - action: utter_menu
      - action: <custom action>  

I hope it make sense and motivate you more.