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,7 +205,9 @@ function generateOpenAIPromptCache(charPersonality, topAnchorDepth, anchorTop, b
|
||||
}
|
||||
}
|
||||
if (i === openai_msgs.length - 1 && openai_msgs.length > bottomAnchorThreshold && msg.role === "user") {//For add anchor in end
|
||||
item = anchorBottom + "\n" + item;
|
||||
if (anchorBottom) {
|
||||
item = anchorBottom + "\n" + item;
|
||||
}
|
||||
}
|
||||
|
||||
msg["content"] = item;
|
||||
|
Reference in New Issue
Block a user