-
Notifications
You must be signed in to change notification settings - Fork 41
Display chatbot response in the chat history #51
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
base: master
Are you sure you want to change the base?
Conversation
@chimosky Please give this feature a try and let me know your views on this. |
The combo box earlier only displayed user input. Added chabot response to the combo box. When user clicks on user input from combo box, the message gets displayed on the input place. When user clicks on bot response, the message gets displayed on the input place as well as the chatbot speaks the response again. This conversation history is visible in the text-to-speech tab as well.
Why is this change needed? Your opening comment and commit message doesn't say anything about that. |
Yes, I will update the opening comment to contain the concrete reason for change. The reason for this update is: With this PR the learner can:
Benefit: |
The question I'm asking is, why would a learner need to hear a particular response the chatbot has given earlier? Reflecting upon it doesn't seem like a compelling reason. Why would they need to see the response from the chatbot in a textual format? |
Ok. I understand your concern. Basically, while watching a movie which is not in our first language, we might need to enable subtitles to understand what is exactly being said. |
Doesn't sound like a particularly good reason. The activity focus is text to speech, not speech to blog. Which reminds me, we lack an activity that can take speech and display text. |
I agree, a better solution would be to reduce speech speed as that'll help said learner hear the words at a slower pace and clearer. |
Doesn't reducing speech speed already exist in the speak activity? |
Yes exactly, the focus is still kept on text to speech. Yes, @chimosky they can slow the speed down before hand but once the user has heard the response. If they want to hear the current response or hear a previous response again they do not have any option or way to do it. I think there should be atleast an option to hear what the response is again, if by chance they want to practice saying it. |
Here's an idea that Quozl brought up earlier; we lack an activity that can take speech and display text..
You've not given a compelling reason why that should exist. |
If this is a separate activity that can be built. We can definitely work on it. Should we arrange a meet to discuss about what the basic functionalities and features of the activity would look like ?
I genuinely believe this feature would be a valuable addition. It might also be helpful to gather feedback from students or teachers on how it could benefit them. Perhaps I could ask Devin for help during our next bi-weekly meeting to gather some reviews? That said, I’m finding it a bit challenging to fully articulate the reasoning behind this suggestion here—I think it would be easier to explain in a conversation perhaps. |
We don't need to have a meting to discuss basic functionalities and features, feel free to implement whatever comes to your mind and share with us, then we can suggest improvements.
Genuinely believing the feature would be valuable is okay, convincing us why is what's necessary. Feel free to ask for help. |
I appreciate your patience and the opportunity to clarify the value of this feature. Here, is a video of current version of the activity, without this feature(It is sped up so might sound wonky): speak.normal.demo.mp4Reinforced learning, comprehension, and active experimentation are key to understand something new or complex like languages. I will take help of the demo I have created within the speak activity with this feature to convey its necessity. Please have a look at this feature's DEMO to see it in action: chat.history.demo.mp4
This type of learning through reinforcement, comprehension, and active experimentation can be only possible through this feature. Increasing the potential benefits for the new learner. I hope this clears it out on why such a feature is necessary in bridging the gaps of this learning environment. |
Thanks, looks nice, but I'm also unconvinced. The Speak activity is not for chatting. The Chat activity is for chatting. We should continue to focus on speech. I'd like the Speak activity to lose the concept of previous entries or responses in order to focus on speech. Human speech does not have a history feature. The chatbot feature was a source of text when the activity is not being shared by multiple learners in a classroom using the Telepathy stack. If there was a project to deploy a local LLM, it could be better designed as a new activity, without all the face, voice, speed, and sunglasses modes of Speak. |
There is a GSoC project that was put forth to make this chatbot more human like using an LLM.
Although, the feature demo looks like it is a chat. But the purpose of the feature is prominently focused upon more ways to improve speech by bridging the gaps where this activity lacks. |
@chimosky please have a look at this whole comment on why it is a necessary feature to bridge gaps within the activity. |
@quozl said:
Having an LLM for chatbot and TTS model for voice is a GSoC 25 project and I have been assigned to work on it. @chimosky said:
@MostlyKIGuess is working on this activity and has made a demo, but he said it works only for python 3.9 +, so he is currently trying to work on bringing it to older python versions, but suggested that instead of supporting older python versions, sugar should just upgrade to use python 3.10+ @quozl @chimosky - During one of the sugar bi-weekly meets @amannaik247 had showed this demo to both @walterbender and @pikurasa and they liked this concept of having chatbot responses in history and have a distinction between the student's questions and bot's responses. I also support this idea, but for a technical reason. Having previous responses and it's answers let's us avoid generating LLM responses if the question has already been answered before. Considering that generating an LLM response is a rather expensive action, it might make sense to check history if the question has been answered before. But I would like other's opinion on this as well. |
Thanks.
Please review the activities that provide a chat interface and
recommend which one should be used for developing your project. You
can see activity usage outlines at https://help.sugarlabs.org/
The activities are Chat, Polari, IRC, and Speak.
Of these, Chat is the most advanced and current.
Speak predated the addition of TTS to the Sugar Toolkit, is face
oriented, with a primitive chatbot attached as an afterthought. I
don't think it is suitable for your project unless it is forked to
remove the face aspect and automatically start the chatbot mode.
My advice on Python versions is to develop for the latest stable
release of Python, which at the moment is 3.13. If any changes are
required to Sugar Toolkit, they must be done anyway.
Your need to keep previous responses is unrelated to the user
interface design. You can keep previous responses in an array which
is not made visible.
However, if you migrate to a fork or use the Chat activity, I've no
objection to having previous responses visible.
|
Thank you! This information will be really helpful! @quozl If that is the case, wouldn't it be good to have the response history visible (after making some changes to the UI and making it child friendly) then have it reviewed across students and teachers to see if it is as helpful as intended. Once we have the LLM working in place we can definitely then add it in the UI if the response is positive. I am okay with any path we decide to take. Having a separate fork for LLM based chatbot till the end of the project is a good idea.
Would it cause problems when we want to test some features with children/schools with their old version of Sugar OR untill the Sugar Toolkit has been updated to accommodate Python 3.13. |
I agree with you, after seeing the demo I still can't see how it helps. "Editing bot responses lets learners actively manipulate language." The bot response is certainly not edited or am I missing something? |
I don't see how you can't improve on that if someone else has something on it.
This doesn't exist yet, and the PR isn't a fix for something that's nonexistent. |
In the demo, when I open the conversation history and click on one of the bot's responses it immediately becomes available in the input box for the user to edit that response text. [I have shown this in the demo. I have switched from the chatbot tab to text to speech tab and edited the bot's response]
@chimosky If you feel this is the case then I will respect your expertise and decision about the feature. Since you have a whole understanding what each activity in Sugar is about and their purpose. I will try to think about other ways to address this learning gap in the activity. If you have any solution or idea in mind, then please let me know! Thank you again! |
I think the Chat activity allows this editing you seek. Perhaps you haven't used it yet because you need to have more than one instance of Sugar? |
The bot response being edited means you can edit the bot response, what's also available from the history isn't the bot response but user input which is what's edited in the demo you shared.
Looking forward to your contributions, the speech to text idea seems interesting and something that'll be nice to have. |
In my code, I have separated the responses in the drop up box as user input and bot response:
In the demo I have clicked on the bot's response["I don't know what I am upto] and edited it in the 'text to speech' tab. Please check once again.
Yes, will work on this and share the updates. |
No need for me to, the problem with that is there's an overload of information which isn't needed. |
Understandable. We could work around it by making it color coded perhaps to separate the user response from bot's making it easily readable like a conversation. This was just an idea to cover the gap of misunderstanding spellings. |
Just to be clear, this isn't an idea we'll be pursuing. |
Understood. Thank you for taking the time to engage in this conversation. |
@walterbender and I saw a presentation of this, and it seemed like a good idea to us. |
The combo box earlier only displays user input.
It does not provide any history of the chatot's response.
This PR logs and displays the chatbots response to the learner.
The learner can easily hear the same response again by just clicking on one of the responses from the chat history.
I have changed the combo box which only displayed the user input to also display the bot response.
The Combo box now displays the response as:
Now the learner can:
Text to speech tab:
The same conversation history is visible in this section as well with the same functionalities.
Learner can now select chatbot responses from the conversation history and edit them to hear their own version of the same text.