Merge branch 'Yidadaa:main' into main

This commit is contained in:
Hk-Gosuto
2023-07-11 13:02:58 +08:00
committed by GitHub
26 changed files with 357 additions and 235 deletions

View File

@@ -293,7 +293,6 @@ export const useChatStore = create<ChatStore>()(
const botMessage: ChatMessage = createMessage({
role: "assistant",
streaming: true,
id: userMessage.id! + 1,
model: modelConfig.model,
});
@@ -420,8 +419,7 @@ Reply in ${getLang()} and markdown.`;
const contextPrompts = session.mask.context.slice();
// system prompts, to get close to OpenAI Web ChatGPT
// only will be injected if user does not use a mask or set none context prompts
const shouldInjectSystemPrompts = contextPrompts.length === 0;
const shouldInjectSystemPrompts = modelConfig.enableInjectSystemPrompts;
const systemPrompts = shouldInjectSystemPrompts
? [
createMessage({