Don't wrap empty sysprompts in instruct mode

b4529e75c6adafd9f66fd138799675ff411d88f8

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -0Showing whitespace changes
public/scripts/instruct-mode.js+4 -0
@@ -384,6 +384,10 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
384 * @returns {string} Formatted instruct mode system prompt.384 * @returns {string} Formatted instruct mode system prompt.
385 */385 */
386export function formatInstructModeSystemPrompt(systemPrompt) {386export function formatInstructModeSystemPrompt(systemPrompt) {
387 if (!systemPrompt) {
388 return '';
389 }
390
387 const separator = power_user.instruct.wrap ? '\n' : '';391 const separator = power_user.instruct.wrap ? '\n' : '';
388392
389 if (power_user.instruct.system_sequence_prefix) {393 if (power_user.instruct.system_sequence_prefix) {