mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
custom flag in message.extra, also apply to chat completion
This commit is contained in:
@ -527,6 +527,12 @@ function setOpenAIMessages(chat) {
|
||||
let role = chat[j]['is_user'] ? 'user' : 'assistant';
|
||||
let content = chat[j]['mes'];
|
||||
|
||||
// If this flag is set, completely ignore the message
|
||||
if (chat[j].extra?.ignore) {
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// 100% legal way to send a message as system
|
||||
if (chat[j].extra?.type === system_message_types.NARRATOR) {
|
||||
role = 'system';
|
||||
|
Reference in New Issue
Block a user