mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
adding comments
This commit is contained in:
@@ -17,6 +17,7 @@ export const debounce_timeout = {
|
||||
|
||||
/*
|
||||
Used as an ephemeral key in message extra metadata.
|
||||
When set, the message will be excluded from context.
|
||||
When set, the message will be excluded from generation prompts without affecting the number of chat messages,
|
||||
which is needed to preserve world info timed effects.
|
||||
*/
|
||||
export const IGNORE_SYMBOL = Symbol.for('ignore');
|
||||
|
@@ -528,7 +528,8 @@ 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 this flag is set, completely ignore the message.
|
||||
// This can be used to hide messages without affecting the number of messages in the chat.
|
||||
if (chat[j].extra?.[IGNORE_SYMBOL]) {
|
||||
j++;
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user