mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix reasoning error on empty chat
This commit is contained in:
@@ -6004,7 +6004,7 @@ export async function saveReply(type, getMessage, fromStreaming, title, swipes,
|
||||
}
|
||||
|
||||
// Coerce null/undefined to empty string
|
||||
if (!chat[chat.length - 1]['extra']['reasoning']) {
|
||||
if (chat.length && !chat[chat.length - 1]['extra']['reasoning']) {
|
||||
chat[chat.length - 1]['extra']['reasoning'] = '';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user