mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
adding option to cleanUpMessage() to not include the user prompt bias, and removing the user prompt bias from generateRaw() results.
This commit is contained in:
@ -3611,7 +3611,8 @@ export async function generateRaw(prompt, api, instructOverride, quietToLoud, sy
|
||||
throw new Error(data.response);
|
||||
}
|
||||
|
||||
const message = cleanUpMessage(extractMessageFromData(data), false, false, true);
|
||||
// format result, exclude user prompt bias
|
||||
const message = cleanUpMessage(extractMessageFromData(data), false, false, true, null, false);
|
||||
|
||||
if (!message) {
|
||||
throw new Error('No message generated');
|
||||
@ -5883,13 +5884,14 @@ function extractMultiSwipes(data, type) {
|
||||
return swipes;
|
||||
}
|
||||
|
||||
export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncompleteSentences = false, stoppingStrings = null) {
|
||||
export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncompleteSentences = false, stoppingStrings = null, include_user_prompt_bias=true) {
|
||||
if (!getMessage) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Add the prompt bias before anything else
|
||||
if (
|
||||
include_user_prompt_bias &&
|
||||
power_user.user_prompt_bias &&
|
||||
!isImpersonate &&
|
||||
!isContinue &&
|
||||
|
Reference in New Issue
Block a user