From e93a2fbed0e367caa68562ee4ea20fb232c0ccfd Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 12 Oct 2024 01:10:22 +0300 Subject: [PATCH] Fix continue prefill not getting added. --- public/scripts/openai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 544a09cf7..15c30a6d3 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -749,7 +749,7 @@ async function populateChatHistory(messages, prompts, chatCompletion, type = nul // in case we are using continue_prefill and the latest message is an assistant message, we want to prepend the users assistant prefill on the message if (chatPrompt.role === 'assistant') { const continueMessage = await Message.createAsync(chatMessage.role, substituteParams(oai_settings.assistant_prefill + '\n\n') + chatMessage.content, chatMessage.identifier); - const collection = new MessageCollection('continuePrefill', ); + const collection = new MessageCollection('continuePrefill', continueMessage); chatCompletion.add(collection, -1); continue; }