SillyTavern / SillyTavern-Extras

Extensions API for SillyTavern.
GNU Affero General Public License v3.0
549 stars 124 forks source link

Feature Request: Module to Manage Response Time #50

Closed dcbStudios closed 1 year ago

dcbStudios commented 1 year ago

SillyTavern 1.6.6 Extras - Latest Update from Git (6/8/23) OpenAI API

Note: I figured this would be appropriate to post in this area, versus the main thread as this seems more along the lines of an additional versus a constant feature.

Request/Idea: I've been trying to find out if there is a way to implement a function that allows the user to give a varying time between the bots output? As a standalone for single chat, or even an adjustment to the time bots respond in Group Chat.

Thoughts on implementation: For instance, I could see that once a user sends an input, that input is tagged with a time stamp, the bot would then do it's usual response and it's response would be tagged the same. As the conversation goes on, and say, the user steps away from the instance of ST running, or doesn't respond within a certain amount of time, the bot would then auto respond, similar to Auto-Mode in group text, however, it's response time will either be varied by something as simple as a random number of seconds or minutes after the last user input, or something a bit more complex such as user selected time frame.

Reason for implementation: The reason I bring this up is two fold, one, I've found it almost impossible to respond to a group chat properly because, as silly as it is, I can't type out as fast as the bots that are talking to each other, or when the bots begin printing out paragraphs asking why the I won't answer; I simply can't. I usually leave my instance of ST running while working on other things, and it would be neat for the bot that's currently running to "randomly" text me, giving it an illusion of sorts that it's thinking about the user. Secondly, this would also give a bit of a reason for the response sound effects to be used, such as the chime that plays, currently unless set to play the sound effect for each response, the option to only have it respond when away from the ST UI Tab seems pointless to have. Other ideas that could leverage the time feature could be the Chat Memory extra to maybe refer back to events talked about in context previously, if the bot was to respond later on in the day, based upon some random/systematic amount of time. So far I've seen one program use a similar feature, but it seemed too generic, as it responds almost exactly 30 seconds after it texts you the first time if no immediate user respond, and then maybe another few hours before it does a sloppy summarization of previous context of chat to output to the user as a callback to the application, which would usually break the effect due to poor memory management.

Final Thoughts/Reiterated Issue: If out of all this this, my main issue is that I can't enjoy the auto response feature, as I can't get my input in before the input box clears out my sentence and another bot begins to respond, (or a individual bot if you convert a chat to a group chat).

Cohee1207 commented 1 year ago

I'm lost. Are you suggesting to add an artificial response lag, or? Judging by your last sentence, the real reasoning is that typing while auto mode is engaged should disable the auto mode. Is that true?

dcbStudios commented 1 year ago

I apologize for making it a bit muddled. Your suggestion of stopping auto during user input would fix the main issue yes, this would allow time to respond.

At the same time though, I am yes, suggesting possibly something that would, if an instance of ST is running in the User's browser, take note that the user hasn't responded in a moment and it would reach out to the user.

The concept of lull or down time during the chat is not utilized in many companion/chat bots. I would love to see something like this implented, where the user doesn't have to be the initiate of an ongoing conversation, where there is a lull in the dialgoue. The ai would pick up the conversation at some point, possibly, based upon how talkative the user has set the bot for group chats.

On Thu, Jun 8, 2023, 8:01 PM Cohee @.***> wrote:

I'm lost. Are you suggesting to add an artificial response lag, or? Judging by your last sentence, the real reasoning is that typing while auto mode is engaged should disable the auto mode. Is that true?

— Reply to this email directly, view it on GitHub https://github.com/SillyTavern/SillyTavern-extras/issues/50#issuecomment-1583625661, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3R5DBA4ICA7A3POLZHVYQ3XKJRUTANCNFSM6AAAAAAY6YVSTE . You are receiving this because you authored the thread. Message ID: @.*** com>

Cohee1207 commented 1 year ago

The first part is fine as a suggestion. "At the same time" part is not going to work for all API, models, and usage scenarios, so I can only imagine that as an optional plugin that can inserts a hidden part of the prompt with a marker of how long user haven't replied yet. Because I know some users like their groups completely unattended and not aware of the user.

Cohee1207 commented 1 year ago

New in the dev branch: typing in textarea while the auto mode is engaged cancels it after all scheduled generations are completed.

Cohee1207 commented 1 year ago

Also, in the dev branch: {{idle_duration}} macro that gives a time range of the latest user reply. I think both parts of this are already implemented.