https://discord.gg/botpress logo
Streaming chat on custom UI - Runtime vs Chat API
# 🤝help
f
Hi, We have a custom chat UI that we've built for our product. It runs through a custom integration that we've set up. Chats are initiated through our integration. I wanted to have the conversation streaming to our custom UI. From what the docs mention, this is only possible through the [Chat API](https://botpress.com/docs/api-reference/chat-api/openapi/listenConversation), not the Runtime API (which seems intended for integrations). Is streaming possible for custom UI?
w
the chat api are the way and i know only [listenConversation](https://botpress.com/docs/api-reference/chat-api/openapi/listenConversation) with a SSE stream
w
I can help you get streaming working for your custom chat UI. You’re right, the Chat API supports streaming, while the Runtime API is mainly for handling integrations. Just to confirm, are you trying to stream the bot’s replies in real time (as it types) or only show the full message once it’s done? @flaky-ability-96739
f
Trying to stream as it types out yes
w
Got it, streaming as it types is possible. You’ll just need to connect your custom UI to the Chat API’s listenConversation endpoint via WebSocket to receive message chunks in real time. I can assist with setting up the WebSocket listener and handling the stream smoothly in your chat UI. Would you like me to help with that part?
s
Performance and time to first meaningful interaction are two of the most important metrics on chatbots right now. Imho this feature would help all of your customers to deliver better products without changing a thing. So, is this going to arrive anytime soon? 😮