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
1 changed files with 4 additions and 0 deletions

View File

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