aiModels.ts
922 Bytes
/**
* AI 模型配置模块 (精简版 - 仅用于类型定义和工具函数)
* 实际 API 调用已迁移到原有的 chat.ts 和 codex.ts
*/
// 模型配置接口
export interface ModelConfig {
label: string;
modelName: string;
description?: string;
}
// 可用模型列表 (仅用于 UI 显示)
export const AI_MODELS: ModelConfig[] = [
{
label: "豆包模型 (Doubao)",
modelName: "external",
description: "LinkMed 默认模型",
},
{
label: "百川模型 (Baichuan)",
modelName: "baichuan",
description: "百川智能大模型",
},
];
// 获取模型配置
export const getModelConfig = (modelName: string): ModelConfig | undefined => {
return AI_MODELS.find((m) => m.modelName === modelName);
};
// 模型显示名称映射
export const getModelLabel = (modelName: string): string => {
const model = getModelConfig(modelName);
return model?.label || modelName;
};