mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Improve strength of main and impersonation prompt
This commit is contained in:
@ -401,9 +401,6 @@ async function prepareOpenAIMessages({ systemPrompt, name2, storyString, worldIn
|
||||
// Handle bias settings
|
||||
if (bias && bias.trim().length) chatCompletion.add(biasMessage);
|
||||
|
||||
// Handle impersonation
|
||||
if (type === "impersonate") chatCompletion.replace('main', substituteParams(oai_settings.impersonation_prompt));
|
||||
|
||||
// Handle chat examples
|
||||
// ToDo: Update dialogueExamples prompt with only the token count that's actually sent.
|
||||
const exampleMessages = prepareExampleMessages(openai_msgs ,openai_msgs_example, power_user.pin_examples);
|
||||
@ -415,6 +412,9 @@ async function prepareOpenAIMessages({ systemPrompt, name2, storyString, worldIn
|
||||
chatCompletion.insertAfter('main', quietPromptMessage)
|
||||
}
|
||||
|
||||
// Handle impersonation
|
||||
if (type === "impersonate") chatCompletion.replace('main', chatCompletion.makeSystemMessage(substituteParams(oai_settings.impersonation_prompt)));
|
||||
|
||||
promptManager.updatePrompts(chatCompletion.getPromptsWithTokenCount());
|
||||
|
||||
// Save settings with updated token calculation and return context
|
||||
|
Reference in New Issue
Block a user