UI for Chatbot using NLU

I am building a bot for Infra Automation(Service restart, Password reset etc.,). Currently using a simple web app with Flask. Is there any other way for user interface other than slack? Please help me on this. :slight_smile:

1 Like

There’s a few things you could try. I managed to knock together a PoC using Bot UI: https://github.com/botui/botui/blob/master/README.md Also if you want something a bit more developed, you could look at https://github.com/sdelements/lets-chat

I managed to integrate the latter in a project I worked on a while back (please note the version of Rasa NLU is quite old) https://github.com/nmstoker/lockebot/blob/master/README.md#lets-chat

3 Likes

We are using Smooch, that also provides a web interface. Im building a custom interface with flask too, using the smooch APIs. A collegue also worked and shared on a web interface for python-socketio : https://github.com/mrbot-ai/rasa-addons + https://github.com/mrbot-ai/rasa-webchat

Good luck!

2 Likes

I have built Rasa into a Flask REST service deployed into Docker containers (separate container for Rasa NLU and Rasa Core), storing the conversation states in Redis (yet another separate container) and then put a BotUI (https://github.com/botui/botui) front-end before it for the user, which uses REST to talk to my Rasa Core Flask app.

It works like a charm.

I would like to do the exact same thing. Using dockers and storing data in Redis. I have no experience with docker. How do you docker this separetely? Do you have to docker the fron-end GUI too?

You probably need to learn docker then.

In my deployment currently I have multiple Docker containers for this service all linked together:

  1. Rasa Core (Flask REST app, not the http server of Rasa, but custom and this also host the UI, which is just some static HTML and JavaScript, so does not required much and could easily be hosted anywhere, after settings the necessary CORS)
  2. Rasa NLU (the standard Rasa NLU server)
  3. Redis (to store the dialogues’ state and to store anything cached)
  4. SwaggerUI (so the REST API can have its Swagger definition served up as part of the bundle) +5. Rasa Action server (I saw that in the upcoming Rasa core v0.11 there will be an option to host the action server separately).

Currently these are deployed together and linked together (using docker-compose), but this architecture allows you to deploy these separately, each behind a load balancer and so to scale them separately.

1 Like

Thanky you.

You mean like this here?https://github.com/scalableminds/chatroom/blob/master/rasa_utils/bot_server_channel.py

What is a SwaggerUI? And for what reason you use an action server? How can you actually outsource the actions?

Not exactly like that, but I have a general template I use to build Flask REST applications, where I have caching into Redis, rate limiting, JWT token-based authentication, Celery for async execution and distributed job queues, full dockerization, etc, so I just integrated Rasa core into that.

This Flask REST application template I use across my projects is mostly based on Miguel Grinberg’s awesome book and tutorials, including his PyCon sessions of many years.

As an example see his famous Flask mega-tutorial: https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world

Swagger is the most popular standard used to describe and document a REST API. See https://swagger.io/

Swagger UI is a UI which can consume your well-written Swagger definition file and allows you to quickly send calls to your REST API in line with the API defintions in the Swagger definition file, see https://swagger.io/tools/swagger-ui/

Basically our team is a group of machine learning engineers and we mostly write AI apps as microservices with the help of Flask working as REST APIs, deploying them into docker containers and then integrated into larger apps via these REST APIs. This is why our Rasa deployment is also a REST APIs, following this structure, but we put an example UI on front (BotUI), so people can try out the chat without the need to make REST calls, however simple that is with Swagger UI.

Hey, thanks. Im going through the docs for docker here: https://docs.docker.com/get-started/part2/#dockerfile

What do I have to write in the dockerfile such that I have a redis docker which communicate with lets say just Core to store intents?

You can check out my multi language bot example on how I used redis with docker

1 Like

We built a hybridchat framework www.expertflow.com/chat , in which you can embed Rasa bot. It connects Customer-facing channels on one side, and human contact center agents on the other.