Don't wrap empty sysprompts in instruct mode
| @@ -384,6 +384,10 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata | ||
| 384 | 384 | * @returns {string} Formatted instruct mode system prompt. |
| 385 | 385 | */ |
| 386 | 386 | export function formatInstructModeSystemPrompt(systemPrompt) { |
| 387 | + if (!systemPrompt) { | |
| 388 | + return ''; | |
| 389 | + } | |
| 390 | + | |
| 387 | 391 | const separator = power_user.instruct.wrap ? '\n' : ''; |
| 388 | 392 | |
| 389 | 393 | if (power_user.instruct.system_sequence_prefix) { |