-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-chatbotify with Signal R #300
Comments
Hey @div3791! To preface, real-time messaging requires significant custom code currently. This is because there are inherent assumptions made within the core library (such as turn-based conversations) that must be addressed for live chat to work. There are plans to make a live chat plugin, but the plugins for LLM are taking priority at the moment so until those are completed, live chat plugin is still a while away. That said, you can go ahead and implement live chat by adopting the following approach. Note that I have yet to properly validate this approach but it is what comes to mind (my intention was to validate it when I start work on the live chat plugin but here goes):
Overall a significant amount of code additions but what I've shared is the tentative approach I intend to use for the live chat plugin as well. Things may and will likely change when I get down to actual implementation but this is currently it. If this is urgent for you and you'd like to hack away at it, feel free to reach out on discord. I don't mind exploring solutions with you since this is a task I'll get to eventually as well :) Though note that even if we bounce ideas currently, you'll have to do most of the coding and testing because my hands are tied on other areas of work such as the LLM plugins 🥹 |
Thanks a lot @tjtanjin for prompt reply!!!!! When I tried to add custom component in injectMessage( it added to the chat window. but when I received signal r message, and tried to delete last message which is typing indicator component by message id it doesnt remove the typing indicator. I tried to check local storage where all the chats are being stored, Some times I can see typing indicator is not geeting deleted. and some times I got different message Id when I saved result of
Removal logic of typing indicator written in different file
As a thanks and gratitude gesture, I will contribute to make this library more robust which can support signal r and other sockets once my current project is completed!!! Thanks & Best Regards, |
Hey @div3791, unfortunately I'm overseas at the moment and don't have my PC/laptop with me 🥹 I'll only be back in the middle of march so until then, I don't have a conducive setup for development-related work. With that said, I can provide you with a couple of links I believe will come in useful:
From the brief implementation you shared above, I suggest you store the id of the typing indicator and pass it directly into Appreciate your interest to help, happy to have you around as work for the live chat plugin kicks in 😊 |
Thanks @tjtanjin I will go through the links given by you and will back to you!! |
here typingId is string message id. This is not removing message from chat window as well as local storage @tjtanjin |
Have you checked if your id passed in is actually correct? Here's what works on the playground (formatting might be off, was trying it from my mobile):
|
Help Description:
I want to integrate Signal R for real time messaging with react-chatbotify. I also want to show typing indicator immedietly after user sends a message and typing indicator should be displayed untill any message doesnt come through Signal R event.
Library version:
2.0.0-beta.28.
Additional context:
I am using Vite + React + Signal R (Through Background Service Worker). When user opens chat window for first time, it should show welcome message. and after user sends first message, REST API is being called to send message to server and my chatbot is waiting for response from server through Signal R. I am using background service worker to manage signal connections and events
The text was updated successfully, but these errors were encountered: