mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Remove last message role restriction for Cohere
This commit is contained in:
@ -351,11 +351,6 @@ export function convertCohereMessages(messages, names) {
|
||||
}
|
||||
});
|
||||
|
||||
// A prompt should end with a user/tool message
|
||||
if (messages.length && !['user', 'tool'].includes(messages[messages.length - 1].role)) {
|
||||
messages[messages.length - 1].role = 'user';
|
||||
}
|
||||
|
||||
return { chatHistory: messages };
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user