Fix impersonation prompting

This commit is contained in:
SillyLossy
2023-05-13 01:07:12 +03:00
parent 4264bebe13
commit 567caf7ef6
2 changed files with 5 additions and 3 deletions

View File

@ -641,10 +641,11 @@ export function formatInstructStoryString(story) {
return text;
}
export function formatInstructModePrompt(isImpersonate) {
export function formatInstructModePrompt(name, isImpersonate) {
const includeNames = power_user.instruct.names || !!selected_group;
const sequence = isImpersonate ? power_user.instruct.input_sequence : power_user.instruct.output_sequence;
const separator = power_user.instruct.wrap ? '\n' : '';
const text = separator + sequence;
const text = includeNames ? (separator + sequence + separator + `${name}:`) : (separator + sequence);
return text;
}