mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 22:13:47 +08:00
Fix System Message
[+] fix(chat.ts): change schema for adding system message after summarizing the topic
This commit is contained in:
@@ -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];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user