✨ feat: 支持其他模型的提示词
This commit is contained in:
parent
f0c3018ec7
commit
d12cf44d06
|
@ -112,7 +112,7 @@ export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lan
|
|||
// Latex block: $$e=mc^2$$
|
||||
// `;
|
||||
export const DEFAULT_SYSTEM_TEMPLATE = `
|
||||
You are ChatGPT, a large language model trained by {{ServiceProvider}}.
|
||||
You are {{model}}, a large language model trained by {{ServiceProvider}}.
|
||||
Knowledge cutoff: {{cutoff}}
|
||||
Current model: {{model}}
|
||||
Current time: {{time}}
|
||||
|
@ -135,6 +135,7 @@ export const KnowledgeCutOffDate: Record<string, string> = {
|
|||
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
|
||||
"gemini-pro": "2023-12",
|
||||
"gemini-pro-vision": "2023-12",
|
||||
"Meta-Llama-3-8B-Instruct": "2023-12",
|
||||
};
|
||||
|
||||
const openaiModels = [
|
||||
|
@ -174,6 +175,10 @@ const anthropicModels = [
|
|||
"claude-3-haiku-20240307",
|
||||
];
|
||||
|
||||
const metaModels = [
|
||||
"Meta-Llama-3-8B-Instruct",
|
||||
];
|
||||
|
||||
export const DEFAULT_MODELS = [
|
||||
...openaiModels.map((name) => ({
|
||||
name,
|
||||
|
@ -202,6 +207,15 @@ export const DEFAULT_MODELS = [
|
|||
providerType: "anthropic",
|
||||
},
|
||||
})),
|
||||
...metaModels.map((name) => ({
|
||||
name,
|
||||
available: true,
|
||||
provider: {
|
||||
id: "meta",
|
||||
providerName: "Meta",
|
||||
providerType: "meta",
|
||||
},
|
||||
})),
|
||||
] as const;
|
||||
|
||||
export const CHAT_PAGE_SIZE = 15;
|
||||
|
|
|
@ -437,9 +437,9 @@ export const useChatStore = createPersistStore(
|
|||
const contextPrompts = session.mask.context.slice();
|
||||
|
||||
// system prompts, to get close to OpenAI Web ChatGPT
|
||||
const shouldInjectSystemPrompts =
|
||||
modelConfig.enableInjectSystemPrompts &&
|
||||
session.mask.modelConfig.model.startsWith("gpt-");
|
||||
const shouldInjectSystemPrompts = modelConfig.enableInjectSystemPrompts;
|
||||
// modelConfig.enableInjectSystemPrompts &&
|
||||
// session.mask.modelConfig.model.startsWith("gpt-");
|
||||
|
||||
var systemPrompts: ChatMessage[] = [];
|
||||
systemPrompts = shouldInjectSystemPrompts
|
||||
|
|
Loading…
Reference in New Issue