mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
Fix System Message
[+] fix(chat.ts): change schema for adding system message after summarizing the topic
This commit is contained in:
parent
18175d4d6a
commit
3b1ce9ee71
@ -523,11 +523,12 @@ export const useChatStore = createPersistStore(
|
||||
session.topic =
|
||||
message.length > 0 ? trimTopic(message) : DEFAULT_TOPIC;
|
||||
// Add system message after summarizing the topic
|
||||
// which is powerful based of fine-tuning
|
||||
const systemMessage: ChatMessage = {
|
||||
role: "system",
|
||||
content: `${Locale.FineTuned.Sysmessage} ${session.topic}`,
|
||||
date: new Date().toLocaleString(),
|
||||
id: nanoid(),
|
||||
role: "system",
|
||||
content: `${Locale.FineTuned.Sysmessage} ${session.topic}`,
|
||||
};
|
||||
session.messages = [systemMessage, ...session.messages];
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user