first_output_sequence and system_sequence_prefix

This commit is contained in:
Stefan Daniel Schwarz
2023-08-25 22:34:08 +02:00
parent ddaa4fe409
commit 3e0ce12b23
15 changed files with 51 additions and 29 deletions

View File

@ -17,7 +17,7 @@ const controls = [
{ id: "instruct_enabled", property: "enabled", isCheckbox: true },
{ id: "instruct_wrap", property: "wrap", isCheckbox: true },
{ id: "instruct_system_prompt", property: "system_prompt", isCheckbox: false },
{ id: "instruct_system_sequence", property: "system_sequence", isCheckbox: false },
{ id: "instruct_system_sequence_prefix", property: "system_sequence_prefix", isCheckbox: false },
{ id: "instruct_system_sequence_suffix", property: "system_sequence_suffix", isCheckbox: false },
{ id: "instruct_separator_sequence", property: "separator_sequence", isCheckbox: false },
{ id: "instruct_input_sequence", property: "input_sequence", isCheckbox: false },
@ -272,8 +272,8 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
export function formatInstructModeSystemPrompt(systemPrompt){
const separator = power_user.instruct.wrap ? '\n' : '';
if (power_user.instruct.system_sequence) {
systemPrompt = power_user.instruct.system_sequence + separator + systemPrompt;
if (power_user.instruct.system_sequence_prefix) {
systemPrompt = power_user.instruct.system_sequence_prefix + separator + systemPrompt;
}
if (power_user.instruct.system_sequence_suffix) {

View File

@ -159,21 +159,21 @@ let power_user = {
default_instruct: '',
instruct: {
enabled: false,
preset: "Alpaca",
system_prompt: "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\nWrite {{char}}'s next reply in a fictional roleplay chat between {{user}} and {{char}}.\n",
input_sequence: "### Instruction:",
output_sequence: "### Response:",
first_output_sequence: "",
last_output_sequence: "",
system_sequence_prefix: "",
system_sequence_suffix: "",
stop_sequence: "",
separator_sequence: "",
wrap: true,
macro: true,
names: false,
system_prompt: "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\nWrite {{char}}'s next reply in a fictional roleplay chat between {{user}} and {{char}}. Write 1 reply only.",
system_sequence: '',
system_sequence_suffix: '',
stop_sequence: '',
input_sequence: '### Instruction:',
output_sequence: '### Response:',
first_output_sequence: '',
last_output_sequence: '',
preset: 'Alpaca',
separator_sequence: '',
macro: false,
names_force_groups: true,
activation_regex: '',
activation_regex: "",
},
context: {