mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
feat:词库信息加入上下文
This commit is contained in:
parent
2a901e65bf
commit
0216f31681
11
apps/ai.js
11
apps/ai.js
@ -206,6 +206,17 @@ async function handleMixMode(userMessage, e, aiConfig) {
|
||||
recall: 0,
|
||||
},
|
||||
];
|
||||
let resToSave = res;
|
||||
resToSave.data += '[词库预设消息]';
|
||||
const newChatHistory = [
|
||||
...chatHistory,
|
||||
{ role: 'user', content: userMessage },
|
||||
{ role: 'assistant', content: resToSave },
|
||||
];
|
||||
SessionManager.updateChatHistory(e.group_id, newChatHistory);
|
||||
SessionManager.deactivateSession(e.group_id,e.user_id);
|
||||
|
||||
return res;
|
||||
} else {
|
||||
logger.info('[crystelf-ai] 关键词匹配失败,使用ai回复')
|
||||
//关键词匹配失败,使用AI回复
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user