From 093225d4fed4d5249ca506b9867f5b5305ca4003 Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 29 Aug 2024 09:51:05 -0700 Subject: [PATCH] fix: use prompt file sys msg --- core/config/promptFile.ts | 5 +++++ gui/src/pages/help.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/config/promptFile.ts b/core/config/promptFile.ts index f1bfc898d..88d57595a 100644 --- a/core/config/promptFile.ts +++ b/core/config/promptFile.ts @@ -99,6 +99,9 @@ export function slashCommandFromPromptFile( name, description, run: async function* (context) { + const originalSystemMessage = context.llm.systemMessage; + context.llm.systemMessage = systemMessage; + const userInput = extractUserInput(context.input, name); const renderedPrompt = await renderPrompt(prompt, context, userInput); const messages = updateChatHistory( @@ -111,6 +114,8 @@ export function slashCommandFromPromptFile( for await (const chunk of context.llm.streamChat(messages)) { yield stripImages(chunk.content); } + + context.llm.systemMessage = originalSystemMessage; }, }; } diff --git a/gui/src/pages/help.tsx b/gui/src/pages/help.tsx index e054f1afb..8eb21c1a8 100644 --- a/gui/src/pages/help.tsx +++ b/gui/src/pages/help.tsx @@ -91,7 +91,7 @@ function HelpPage() { -
+

Have an issue?

Let us know on GitHub and we'll do our best to resolve it.

@@ -101,7 +101,7 @@ function HelpPage() { target="_blank" className="no-underline" > - + Create a GitHub issue