Rasa chat gui

As a certified RASA developer? :wink:

I think there are some host services. But for including it on a hompegae eg you also need to host this stuff somehow as the user should not download the JS folder too…

@earroyoh

Hahaha Rasa ain’t web development. And I don’t have the latest version of the widget, which seems to be gone from GitHub so I can’t check.

I know you can do <script src="script.js"> to get a file, but you probably can do it for a URL too.

Ups, but it is really strange that the repo is now offline? ^^

It’s not only the repo, it’s the whole account! I don’t know what happened.

where is actually the 2 index.js included? They are not inside the index.html… I managed to include all js files externally (with jsdelivr) but now you have these index.js and I don’t know to handle them besides including them into the index.html?!

In the version I have, the scripts are included at the end of the HTML file:

...
      <!-- Bot profile -->
      <div class="profile_div" id="profile_div">
        <img class="imgProfile" src="assets/img/botAvatar.png" />
      </div>
    </div>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
    <script type="text/javascript" src="assets/js/materialize.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.1.0/uuidv4.min.js"></script>

    <!--Main Script -->
    <script type="text/javascript" src="assets/js/script.js"></script>
    <script type="text/javascript" src="assets/js/chart.js"></script>
  </body>
</html>

Yes, but inside these sripts you would also chnage the pathes correctly I think. Also, you have 2 index.js?

Is the one located in ../static\js\lib\index.js actually used?

From above script.js the index.js from the components folder is used.

Never mind, it seems I mutated… to a JS-Expert. ^^

1 Like

Hey,

in constants.js you have the endpoint rasa_server_url which is used in chat.js for making requests…

But why is it only used in send(message)? All other function seem to use as a url the static version ‘`http://localhost:5005/…’

So, if the rasa_server_url changes to another adrees, will the bot still working?

@ChrisRahme Hey! do you know how you can use html tags with this gui?

When you have p tags the text is outside the ‘bubbles’.

Maybe try it. Any idea how to solve this?

Maybe have a look at here:

Are you using Botfront’s WebChat or Jitesh’s ChatbotWidget?

You said this:

thebot messages are not formatted right if you send html text like <p>rhrhrh</p>

Then the text is outside the bot message windows…

Do you mean that the bot response itself is <p>rhrhrh</p>?

Use Jitesh’s ChatbotWidget,

As the picture shows it is outside but without the tags shown…

But is your bot sending the tags as a response?

Meaning, in your Rasa domain or actions, did you write <p>rhrhrh</p> as a response or rhrhrh?

ok. I send the text like this:

dispatcher.utter_message(<p> Hello </p>)

Or what you mean?

Yeah that’s what I meant. Is that what you’re doing?

? ^^

Yes, thats it what I do? I send text like this.

@ChrisRahme What do you mean?

Why are you sending <p> Hello </p>? Just send Hello. The Widget works fine if you just send Hello without <p>.

I do not know what to answer as I am speachless…

It can happen that you want to structure whole paragraphs to have a p? Otherwise multiple senetnces are just next to each other?

No, don’t use <p>.

Jitesh’s ChatbotWidget works fine. If you’re not using HTML tags in your bot’s response, and you still have issues, maybe you modified part of the widget’s code by mistake. Did you consider downloading the widget again from the repo?

You can also use my modified version of the widget here.