diff --git a/index.ts b/index.ts index 369bdde..69885f1 100644 --- a/index.ts +++ b/index.ts @@ -36,7 +36,7 @@ type Message = { async function complete(messages: Message[]) { if (messages.length < 1) throw new Error("messages are empty"); - const init = messages.slice(0, -2); + const init = messages.slice(0, -1); const last = messages.at(-1) as Message; const context = await model.createContext(); const session = new LlamaChatSession({