50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
export const DEFAULT_CHAT_MODEL: string =
|
||
process.env.NEXT_PUBLIC_DEFAULT_CHAT_MODEL ?? "chat-model";
|
||
|
||
export type ChatModel = {
|
||
id: string;
|
||
name: string;
|
||
description: string;
|
||
};
|
||
|
||
const baseName = (id: string, fallback: string): string =>
|
||
process.env[`NEXT_PUBLIC_MODEL_${id.toUpperCase()}_NAME`] ?? fallback;
|
||
|
||
const baseDescription = (id: string, fallback: string): string =>
|
||
process.env[`NEXT_PUBLIC_MODEL_${id.toUpperCase()}_DESCRIPTION`] ?? fallback;
|
||
|
||
export const chatModels: ChatModel[] = [
|
||
{
|
||
id: "chat-model",
|
||
name: baseName("chat-model", "Grok Vision"),
|
||
description: baseDescription(
|
||
"chat-model",
|
||
"多模态模型,支持文字与图片理解"
|
||
),
|
||
},
|
||
{
|
||
id: "chat-model-reasoning",
|
||
name: baseName("chat-model-reasoning", "Grok Reasoning"),
|
||
description: baseDescription(
|
||
"chat-model-reasoning",
|
||
"偏重复杂推理、链式思考的模型"
|
||
),
|
||
},
|
||
{
|
||
id: "qwen3-vl-plus",
|
||
name: baseName("qwen3-vl-plus", "Qwen3 VL Plus"),
|
||
description: baseDescription(
|
||
"qwen3-vl-plus",
|
||
"阿里云通义千问多模态模型(Qwen3 VL Plus,支持图文理解与推理)"
|
||
),
|
||
},
|
||
{
|
||
id: "gpt-5-nano",
|
||
name: baseName("gpt-5-nano", "GPT-5 Nano"),
|
||
description: baseDescription(
|
||
"gpt-5-nano",
|
||
"第三方 GPT-5 Nano 模型(通过 OpenAI 兼容 API 接入)"
|
||
),
|
||
},
|
||
];
|