Added Persona Description and System Prompt to Story String

This commit is contained in:
Stefan Daniel Schwarz
2023-08-20 16:08:54 +02:00
parent 7528a3828a
commit 2fb86c8ebd
9 changed files with 30 additions and 43 deletions

View File

@@ -1088,17 +1088,6 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
return text;
}
export function formatInstructStoryString(story, systemPrompt) {
// If the character has a custom system prompt AND user has it preferred, use that instead of the default
systemPrompt = power_user.prefer_character_prompt && systemPrompt ? systemPrompt : power_user.instruct.system_prompt;
const sequence = power_user.instruct.system_sequence || '';
const prompt = substituteParams(systemPrompt, name1, name2, power_user.instruct.system_prompt) || '';
const separator = power_user.instruct.wrap ? '\n' : '';
const textArray = [sequence, prompt + '\n' + story];
const text = textArray.filter(x => x).join(separator);
return text;
}
export function formatInstructModePrompt(name, isImpersonate, promptBias, name1, name2) {
const includeNames = power_user.instruct.names || (!!selected_group && power_user.instruct.names_force_groups);
const getOutputSequence = () => power_user.instruct.last_output_sequence || power_user.instruct.output_sequence;