mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-13 18:40:11 +01:00
Don't use user filler
This commit is contained in:
parent
7d4b3e0800
commit
2b32c8638a
@ -401,9 +401,8 @@ function convertAI21Messages(messages, charName = '', userName = '') {
|
||||
|
||||
messages.splice(0, i);
|
||||
|
||||
// Check if the first message in the array is of type user, if not, interject with humanMsgFix or a blank message.
|
||||
// Also prevents erroring out if the messages array is empty.
|
||||
if (messages.length === 0 || (messages.length > 0 && messages[0].role !== 'user')) {
|
||||
// Prevent erroring out if the messages array is empty.
|
||||
if (messages.length === 0) {
|
||||
messages.unshift({
|
||||
role: 'user',
|
||||
content: '[Start a new chat]',
|
||||
|
Loading…
x
Reference in New Issue
Block a user