Skip to content

Commit

Permalink
chore: 添加SYSTEM_INIT_MESSAGE缺省值
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Jun 28, 2024
1 parent 396b536 commit 4f658a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/llm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {isMistralAIEnable, requestCompletionsFromMistralAI} from './mistralai.js
* @return {Promise<Object>}
*/
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;

// 判断是否禁用历史记录
Expand Down

0 comments on commit 4f658a4

Please sign in to comment.