Add missing space on continue

This commit is contained in:
Cohee 2023-08-24 02:38:02 +03:00
parent 4038e7f9e3
commit ffc8150eef
1 changed files with 5 additions and 0 deletions

View File

@ -2694,6 +2694,11 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
promptCache = promptCache.replace(promptBias, '');
}
// Add a space if prompt cache doesn't start with one
if (!/^\s/.test(promptCache) && !isInstruct) {
promptCache = ' ' + promptCache;
}
return promptCache;
}