adding option to cleanUpMessage() to not include the user prompt bias, and removing the user prompt bias from generateRaw() results.

3412d1ce1f3b030c148ec4c7741e2856afbef17b

qvink <qvink@users.noreply.github.com>

1 files changed, +4 -2Showing whitespace changes
public/script.js+4 -2
@@ -3611,7 +3611,8 @@ export async function generateRaw(prompt, api, instructOverride, quietToLoud, sy
3611 throw new Error(data.response);3611 throw new Error(data.response);
3612 }3612 }
36133613
3614 const message = cleanUpMessage(extractMessageFromData(data), false, false, true);3614 // format result, exclude user prompt bias
3615 const message = cleanUpMessage(extractMessageFromData(data), false, false, true, null, false);
36153616
3616 if (!message) {3617 if (!message) {
3617 throw new Error('No message generated');3618 throw new Error('No message generated');
@@ -5883,13 +5884,14 @@ function extractMultiSwipes(data, type) {
5883 return swipes;5884 return swipes;
5884}5885}
58855886
5886export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncompleteSentences = false, stoppingStrings = null) {5887export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncompleteSentences = false, stoppingStrings = null, include_user_prompt_bias=true) {
5887 if (!getMessage) {5888 if (!getMessage) {
5888 return '';5889 return '';
5889 }5890 }
58905891
5891 // Add the prompt bias before anything else5892 // Add the prompt bias before anything else
5892 if (5893 if (
5894 include_user_prompt_bias &&
5893 power_user.user_prompt_bias &&5895 power_user.user_prompt_bias &&
5894 !isImpersonate &&5896 !isImpersonate &&
5895 !isContinue &&5897 !isContinue &&