mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Avoid an empty line in OpenAI when bottom anchor is empty
This commit is contained in:
@ -205,8 +205,10 @@ function generateOpenAIPromptCache(charPersonality, topAnchorDepth, anchorTop, b
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i === openai_msgs.length - 1 && openai_msgs.length > bottomAnchorThreshold && msg.role === "user") {//For add anchor in end
|
if (i === openai_msgs.length - 1 && openai_msgs.length > bottomAnchorThreshold && msg.role === "user") {//For add anchor in end
|
||||||
|
if (anchorBottom) {
|
||||||
item = anchorBottom + "\n" + item;
|
item = anchorBottom + "\n" + item;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
msg["content"] = item;
|
msg["content"] = item;
|
||||||
openai_msgs[i] = msg;
|
openai_msgs[i] = msg;
|
||||||
|
Reference in New Issue
Block a user