mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
system prompt in system sequence
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Llama 2 Chat",
|
||||
"system_prompt": "[INST] <<SYS>>\nWrite {{char}}'s next reply in this fictional roleplay with {{user}}.\n<</SYS>>\n",
|
||||
"system_prompt": "Write {{char}}'s next reply in this fictional roleplay with {{user}}.",
|
||||
"input_sequence": "[INST] ",
|
||||
"output_sequence": " [/INST] ",
|
||||
"last_output_sequence": "",
|
||||
"system_sequence": "[INST] <<SYS>>\n",
|
||||
"system_sequence": "[INST] <<SYS>>\n{{sys}}\n<</SYS>>\n",
|
||||
"stop_sequence": "",
|
||||
"separator_sequence": "\n",
|
||||
"wrap": false,
|
||||
|
@@ -256,8 +256,13 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
|
||||
export function formatInstructModeSystemPrompt(systemPrompt){
|
||||
if (power_user.instruct.system_sequence) {
|
||||
const separator = power_user.instruct.wrap ? '\n' : '';
|
||||
|
||||
if (power_user.instruct.system_sequence.includes("{{sys}}")) {
|
||||
return power_user.instruct.system_sequence.replace(/{{sys}}/gi, systemPrompt) + separator;
|
||||
} else {
|
||||
return power_user.instruct.system_sequence + separator + systemPrompt;
|
||||
}
|
||||
}
|
||||
|
||||
return systemPrompt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user