mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 03:27:44 +01:00
Merge pull request #1902 from khanonnie/patch-1
Fix Claude 3 inline images when "Add Character Names" setting is enabled
This commit is contained in:
commit
8be17251fe
@ -151,7 +151,11 @@ function convertClaudeMessages(messages, prefillString, useSysPrompt, humanMsgFi
|
||||
// Take care of name properties since claude messages don't support them
|
||||
mergedMessages.forEach((message) => {
|
||||
if (message.name) {
|
||||
message.content = `${message.name}: ${message.content}`;
|
||||
if (Array.isArray(message.content)) {
|
||||
message.content[0].text = `${message.name}: ${message.content[0].text}`;
|
||||
} else {
|
||||
message.content = `${message.name}: ${message.content}`;
|
||||
}
|
||||
delete message.name;
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user