mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fixed out of index error
This commit is contained in:
@ -242,7 +242,7 @@ export class TextCompletionService {
|
|||||||
|
|
||||||
// Format messages using instruct formatting
|
// Format messages using instruct formatting
|
||||||
const formattedMessages = [];
|
const formattedMessages = [];
|
||||||
const prefillActive = prompt[prompt.length - 1].role === 'assistant';
|
const prefillActive = prompt.length > 0 ? prompt[prompt.length - 1].role === 'assistant' : false;
|
||||||
for (const message of prompt) {
|
for (const message of prompt) {
|
||||||
let messageContent = message.content;
|
let messageContent = message.content;
|
||||||
if (!message.ignoreInstruct) {
|
if (!message.ignoreInstruct) {
|
||||||
|
Reference in New Issue
Block a user