Merge pull request #3711 from qvink/fix_genraw_prompt_bias Fixing user_prompt_bias being incorrectly added using generateRaw()
Signed| @@ -3612,7 +3612,8 @@ export async function generateRaw(prompt, api, instructOverride, quietToLoud, sy | ||
| 3612 | 3612 | throw new Error(data.response); |
| 3613 | 3613 | } |
| 3614 | 3614 | |
| 3615 | - const message = cleanUpMessage(extractMessageFromData(data), false, false, true); | |
| 3615 | + // format result, exclude user prompt bias | |
| 3616 | + const message = cleanUpMessage(extractMessageFromData(data), false, false, true, null, false); | |
| 3616 | 3617 | |
| 3617 | 3618 | if (!message) { |
| 3618 | 3619 | throw new Error('No message generated'); |
| @@ -5884,13 +5885,14 @@ function extractMultiSwipes(data, type) { | ||
| 5884 | 5885 | return swipes; |
| 5885 | 5886 | } |
| 5886 | 5887 | |
| 5887 | 5888 | export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncompleteSentences = false, stoppingStrings = null, includeUserPromptBias = true) { |
| 5888 | 5889 | if (!getMessage) { |
| 5889 | 5890 | return ''; |
| 5890 | 5891 | } |
| 5891 | 5892 | |
| 5892 | 5893 | // Add the prompt bias before anything else |
| 5893 | 5894 | if ( |
| 5895 | + includeUserPromptBias && | |
| 5894 | 5896 | power_user.user_prompt_bias && |
| 5895 | 5897 | !isImpersonate && |
| 5896 | 5898 | !isContinue && |