mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-09 16:49:01 +01:00
fix: dont trim prefill message, but do trim message
This commit is contained in:
parent
8401cc6032
commit
d5f94577dc
@ -133,7 +133,7 @@ function convertClaudeMessages(messages, prefillString, useSysPrompt, humanMsgFi
|
||||
|
||||
// Shouldn't be conditional anymore, messages api expects the last role to be user unless we're explicitly prefilling
|
||||
if (messages[messages.length - 1].role == 'assistant' && prefillString) {
|
||||
messages[messages.length - 1].content = prefillString.trimEnd() + messages[messages.length - 1].content;
|
||||
messages[messages.length - 1].content = prefillString + messages[messages.length - 1].content.trimEnd();
|
||||
} else if (prefillString) {
|
||||
messages.push({
|
||||
role: 'assistant',
|
||||
|
Loading…
x
Reference in New Issue
Block a user