chatscope / chat-ui-kit-react

Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
https://chatscope.io
MIT License
1.34k stars 116 forks source link

[HELP] How to use the streaming message feature? #145

Closed vishnu-dev closed 9 months ago

vishnu-dev commented 9 months ago

List of features on chatscope.io/features states

not only for chat, but also useful for any feeds, article comments, and social media posts comments, real time streaming comments, sms/text conversations etc..

But, I couldn't find an example on how to use this feature. Can someone point me in the right direction? For example: Which component to use?

supersnager commented 9 months ago

@vishnu-dev @chatscope/chat-ui-kit-react is a UI library independent of communication and data delivery libraries. You can use for example the MessageList and Message components to display messages in the order they are received, but how you receive the message stream is up to you. For example you can use websocket or Server-Sent Events for that.

OlofHarrysson commented 7 months ago

I'm also looking for a way to stream messages piece by piece, like chatGPT

vishnu-dev commented 7 months ago

@vishnu-dev @chatscope/chat-ui-kit-react is a UI library independent of communication and data delivery libraries. You can use for example the MessageList and Message components to display messages in the order they are received, but how you receive the message stream is up to you. For example you can use websocket or Server-Sent Events for that.

Thank you for the reply. I was able to achieve the desired results.

timbrownca commented 7 months ago

Would you be willing to share details of how you implemented the streaming? I’m interested in doing it as well so would love to know what works. TIA!