Simplify anchor selection code

This commit is contained in:
Grzegorz Gidel
2023-04-22 16:08:24 +02:00
parent 4caec7c857
commit 2dfb41d461

View File

@ -1395,26 +1395,26 @@ async function Generate(type, automatic_trigger, force_name2) {
let storyString = ""; let storyString = "";
let finalPromt = ""; let finalPromt = "";
let postAnchorChar = "Elaborate speaker";
let postAnchorStyle = "Writing style: very long messages";//"[Genre: roleplay chat][Tone: very long messages with descriptions]";
let anchorTop = ''; let anchorTop = '';
let anchorBottom = ''; let anchorBottom = '';
const topAnchorDepth = 8; const topAnchorDepth = 8;
if (character_anchor && !is_pygmalion) { // Compute anchors
if (!is_pygmalion) {
console.log('saw not pyg'); console.log('saw not pyg');
let postAnchorChar = character_anchor ? name2 + " Elaborate speaker" : "";
let postAnchorStyle = style_anchor ? "Writing style: very long messages" : "";
if (anchor_order === 0) { if (anchor_order === 0) {
anchorTop = name2 + " " + postAnchorChar; anchorTop = postAnchorChar;
} else { anchorBottom = postAnchorStyle;
console.log('saw pyg, adding anchors') } else { // anchor_order === 1
anchorBottom = "[" + name2 + " " + postAnchorChar + "]";
}
}
if (style_anchor && !is_pygmalion) {
if (anchor_order === 1) {
anchorTop = postAnchorStyle; anchorTop = postAnchorStyle;
} else { anchorBottom = postAnchorChar;
anchorBottom = "[" + postAnchorStyle + "]"; }
if (anchorBottom) {
anchorBottom = "[" + anchorBottom + "]";
} }
} }