From 4f658a4fb66b6c9984afd67cb5d0b51049ad3a3b Mon Sep 17 00:00:00 2001 From: tbxark Date: Fri, 28 Jun 2024 09:54:18 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0SYSTEM=5FINIT=5FMESS?= =?UTF-8?q?AGE=E7=BC=BA=E7=9C=81=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/llm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llm.js b/src/llm.js index a7181144..36ea8845 100644 --- a/src/llm.js +++ b/src/llm.js @@ -27,7 +27,7 @@ import {isMistralAIEnable, requestCompletionsFromMistralAI} from './mistralai.js * @return {Promise} */ async function loadHistory(key, context) { - const initMessage = {role: 'system', content: context.USER_CONFIG.SYSTEM_INIT_MESSAGE}; + const initMessage = {role: 'system', content: context.USER_CONFIG.SYSTEM_INIT_MESSAGE || 'You are a useful assistant!'}; const historyDisable = ENV.AUTO_TRIM_HISTORY && ENV.MAX_HISTORY_LENGTH <= 0; // 判断是否禁用历史记录