Refactor instruct names behavior controls (#2837)

* Refactor instruct names behavior controls
Closes #2819

* Remove current persona from force names

* Don't add current user name in groups

* Revert to old text

* Add titles to names behavior

* Proper default for names_behavior
This commit is contained in:
Cohee
2024-09-16 00:46:03 +03:00
committed by GitHub
parent 08f2b73ab8
commit ca4d3c5ffe
33 changed files with 80 additions and 79 deletions

View File

@ -541,7 +541,7 @@ function setOpenAIMessages(chat) {
case character_names_behavior.NONE:
break;
case character_names_behavior.DEFAULT:
if (selected_group || (chat[j].force_avatar && chat[j].name !== name1 && chat[j].extra?.type !== system_message_types.NARRATOR)) {
if ((selected_group && chat[j].name !== name1) || (chat[j].force_avatar && chat[j].name !== name1 && chat[j].extra?.type !== system_message_types.NARRATOR)) {
content = `${chat[j].name}: ${content}`;
}
break;