diff --git a/public/index.html b/public/index.html index 6ff439c8b..c51962d44 100644 --- a/public/index.html +++ b/public/index.html @@ -1169,6 +1169,18 @@ Auto Mode +
+ Group reply strategy + ? +
+ +
 
diff --git a/public/notes/group_reply_strategy.html b/public/notes/group_reply_strategy.html new file mode 100644 index 000000000..a4fd8c984 --- /dev/null +++ b/public/notes/group_reply_strategy.html @@ -0,0 +1,64 @@ + + + + Advanced Formatting + + + + + + + + + +
+
+

Group reply order strategies

+

+ Decides how characters in group chats are drafted for their replies. +

+

Natural order

+

+ Tries to simulate the flow of a real human conversation. The algorithm is as follows: +

+

1. Mentions of the group member names are extracted from the last message in chat.

+

+ Only whole words are recognized as mentions! + If your character's name is "Misaka Mikoto", they will reply only activate on "Misaka" or "Mikoto", but + never to "Misa", "Railgun", etc. +

+

+ Unless "Allow bot responses to self" setting is enabled, characters won't reply to mentions of their + name in their own message! +

+

2. Characters are activated by the "Talkativeness" factor.

+

+ Talkativeness defines how often the character speaks if it was not mentioned. Adjust this value on + "Advanced definitions" screen in character editor. + Slider values are on a linear scale from 0% / Shy (character never talks unless mentioned) to + 100% / Chatty (character always replies). + Default value for new characters is 50% chance. +

+

3. Random character is selected.

+

+ If no characters were activated at previous steps, one speaker is selected randomly, ignoring all other + conditions. +

+

List order

+

+ Characters are drafted based on the order they are presented in group members list. No other rules + apply. +

+

Important!

+
+ + Regeneration in group chats deletes all character message up until the last message sent by you. + Use swipes to generate just the latest message. + +
+
+ + + \ No newline at end of file diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 46e91de8b..f44d59c30 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -519,6 +519,15 @@ function select_group_chats(chat_id) { }); $("#rm_group_filter").val("").trigger("input"); + $('input[name="rm_group_activation_strategy"]').off(); + $('input[name="rm_group_activation_strategy"]').on("input", async function(e) { + if (chat_id) { + group.activation_strategy = Number(e.target.value); + await editGroup(chat_id); + } + }); + $(`input[name="rm_group_activation_strategy"][value="${Number(group?.activation_strategy ?? 0 )}"]`).prop('checked', true); + selectRightMenuWithAnimation('rm_group_chats_block'); async function memberClickHandler(event) {