dimagi / open-chat-studio

A web based platform for building Chatbots backed by Large Language Models
BSD 3-Clause "New" or "Revised" License
15 stars 7 forks source link

Polling in `chat_ui.html` to use htmx #5

Open SmittieC opened 1 year ago

SmittieC commented 1 year ago

There are two polls going on from the Web UI's side. 1. When a user chats, a "responsive" polling is triggered. This stops when the response from the bot is returned to the UI. 2. in chat_ui.html the JS script polls the BE for "ad hoc" messages. Ideally we'd want this to also use htmx (we use this for other UI stuff). This is to refactor that piece of code to use htmx

snopoke commented 1 year ago

Alternately we could use websockets.

SmittieC commented 1 year ago

Keen. Polling seemed easier, at least to start with, but to whoever tackles this, websockets would be a win