From 63da98591e6f34e5fc50ecbc7f705e35d1ffe348 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 2 Apr 2024 10:18:34 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20bug=20in=20edit=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/llm/templates/edit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/llm/templates/edit.ts b/core/llm/templates/edit.ts index 717d943cb..188ff0966 100644 --- a/core/llm/templates/edit.ts +++ b/core/llm/templates/edit.ts @@ -86,7 +86,7 @@ const osModelsEditPrompt: PromptTemplate = (history, otherData) => { } // Use a different prompt when there's neither prefix nor suffix - if (otherData.prefix.trim() === "" && otherData.suffix.trim() === "") { + if (otherData.prefix?.trim() === "" && otherData.suffix?.trim() === "") { return [ { role: "user",