Don't append System narrator name to Chat completion messages.

This commit is contained in:
Cohee
2023-07-06 21:04:51 +03:00
parent 48e9332db9
commit f93fb78bc7
2 changed files with 2 additions and 1 deletions

View File

@@ -435,6 +435,7 @@ const system_messages = {
<li><tt>{{char}}</tt> - the Character's name</li> <li><tt>{{char}}</tt> - the Character's name</li>
<li><tt>{{time}}</tt> - the current time</li> <li><tt>{{time}}</tt> - the current time</li>
<li><tt>{{date}}</tt> - the current date</li> <li><tt>{{date}}</tt> - the current date</li>
<li><tt>{{idle_duration}}</tt> - the time since the last user message was sent</li>
<li><tt>{{random:(args)}}</tt> - returns a random item from the list. (ex: {{random:1,2,3,4}} will return 1 of the 4 numbers at random. Works with text lists too.</li> <li><tt>{{random:(args)}}</tt> - returns a random item from the list. (ex: {{random:1,2,3,4}} will return 1 of the 4 numbers at random. Works with text lists too.</li>
</ul>` </ul>`
] ]

View File

@@ -218,7 +218,7 @@ function setOpenAIMessages(chat) {
} }
// for groups or sendas command - prepend a character's name // for groups or sendas command - prepend a character's name
if (selected_group || (chat[j].force_avatar && chat[j].name !== name1)) { if (selected_group || (chat[j].force_avatar && chat[j].name !== name1 && chat[j].extra?.type !== system_message_types.NARRATOR)) {
content = `${chat[j].name}: ${content}`; content = `${chat[j].name}: ${content}`;
} }