Don't wrap empty sysprompts in instruct mode

This commit is contained in:
Cohee 2024-10-01 13:16:55 +03:00
parent 697f02e7f3
commit b4529e75c6

View File

@ -384,6 +384,10 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
* @returns {string} Formatted instruct mode system prompt. * @returns {string} Formatted instruct mode system prompt.
*/ */
export function formatInstructModeSystemPrompt(systemPrompt) { export function formatInstructModeSystemPrompt(systemPrompt) {
if (!systemPrompt) {
return '';
}
const separator = power_user.instruct.wrap ? '\n' : ''; const separator = power_user.instruct.wrap ? '\n' : '';
if (power_user.instruct.system_sequence_prefix) { if (power_user.instruct.system_sequence_prefix) {