mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 13:36:47 +01:00
system prompt in system sequence
This commit is contained in:
parent
582464a2e7
commit
56a6398189
@ -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,7 +256,12 @@ 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' : '';
|
||||
return power_user.instruct.system_sequence + separator + systemPrompt;
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user