Rasa chat gui

Hey,

I like this Web chat gui from @JiteshGaikwad

Since it is Opensource and like to use it on my machine I want to be sure, there is no malicious JS code inside the JS part? Has anyone checkd this (I am not an JS expert)? I don’t want to accuse you the author of it, but just to be sure as safety goes first. :slight_smile: :wink: Maybe the creator also just used an external library.

1 Like

It seems @JiteshGaikwad is a rasa certified developer and code looks fine.

Don’t worry, the code is fine, and not that hard to understand even if you don’t know JavaScript.

I personally use it (modified) and it works wonders :slight_smile:

Thanks!!! :grinning:

@ChrisRahme

Hey, dou you know how I can include the JS part inside the index.html (eg from the default gui bot on github) without using the html inside the GUI folder with all the JS part? Is there a way to host somehow this part include it via an url? How could I do that?

Heyy, sorry, I don’t know

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. ^^

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?