mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix conjoined words and some excessive newlines around various parts of the prompt
This commit is contained in:
@ -1458,21 +1458,8 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
storyString += appendToStoryString(charPersonality, power_user.disable_personality_formatting ? '' : 'Personality: ');
|
storyString += appendToStoryString(charPersonality, power_user.disable_personality_formatting ? '' : 'Personality: ');
|
||||||
storyString += appendToStoryString(Scenario, power_user.disable_scenario_formatting ? '' : 'Scenario: ');
|
storyString += appendToStoryString(Scenario, power_user.disable_scenario_formatting ? '' : 'Scenario: ');
|
||||||
} else {
|
} else {
|
||||||
if (charDescription !== undefined) {
|
|
||||||
if (charPersonality.length > 0 && !power_user.disable_personality_formatting) {
|
|
||||||
charPersonality = name2 + "'s personality: " + charPersonality;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
storyString += appendToStoryString(charDescription, '');
|
storyString += appendToStoryString(charDescription, '');
|
||||||
|
storyString += appendToStoryString(charPersonality, power_user.disable_personality_formatting ? '' : name2 + "'s personality: ");
|
||||||
if (storyString.endsWith('\n')) {
|
|
||||||
storyString = storyString.slice(0, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count_view_mes < topAnchorDepth) {
|
|
||||||
storyString += '\n' + appendToStoryString(charPersonality, '');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (power_user.custom_chat_separator && power_user.custom_chat_separator.length) {
|
if (power_user.custom_chat_separator && power_user.custom_chat_separator.length) {
|
||||||
@ -1484,9 +1471,6 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
if (power_user.pin_examples && main_api !== 'openai') {
|
if (power_user.pin_examples && main_api !== 'openai') {
|
||||||
for (let example of mesExamplesArray) {
|
for (let example of mesExamplesArray) {
|
||||||
if (!is_pygmalion) {
|
if (!is_pygmalion) {
|
||||||
if (!storyString.endsWith('\n')) {
|
|
||||||
storyString += '\n';
|
|
||||||
}
|
|
||||||
const replaceString = power_user.disable_examples_formatting ? '' : `This is how ${name2} should talk`;
|
const replaceString = power_user.disable_examples_formatting ? '' : `This is how ${name2} should talk`;
|
||||||
example = example.replace(/<START>/i, replaceString);
|
example = example.replace(/<START>/i, replaceString);
|
||||||
}
|
}
|
||||||
@ -1645,9 +1629,6 @@ async function Generate(type, automatic_trigger, force_name2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!is_pygmalion && Scenario && Scenario.length > 0) {
|
if (!is_pygmalion && Scenario && Scenario.length > 0) {
|
||||||
if (!storyString.endsWith('\n')) {
|
|
||||||
storyString += '\n';
|
|
||||||
}
|
|
||||||
storyString += !power_user.disable_scenario_formatting ? `Circumstances and context of the dialogue: ${Scenario}\n` : `${Scenario}\n`;
|
storyString += !power_user.disable_scenario_formatting ? `Circumstances and context of the dialogue: ${Scenario}\n` : `${Scenario}\n`;
|
||||||
}
|
}
|
||||||
console.log('calling runGenerate');
|
console.log('calling runGenerate');
|
||||||
|
Reference in New Issue
Block a user