perf: message filter

This commit is contained in:
archer
2023-05-09 23:40:02 +08:00
parent 9b683884cc
commit e3c9b8179e
4 changed files with 7 additions and 21 deletions

View File

@@ -72,7 +72,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
} else {
// 没有用知识库搜索,仅用系统提示词
model.chat.systemPrompt &&
prompts.unshift({
prompts.splice(prompts.length - 1, 0, {
obj: ChatRoleEnum.System,
value: model.chat.systemPrompt
});