71 lines
1.7 KiB
TypeScript
71 lines
1.7 KiB
TypeScript
// src/views/AgentChat/constants/models.ts
|
||
// 可用模型配置
|
||
|
||
import * as React from 'react';
|
||
import { Brain, Zap, TrendingUp } from 'lucide-react';
|
||
|
||
/**
|
||
* 模型配置接口
|
||
*/
|
||
export interface ModelConfig {
|
||
/** 模型唯一标识 */
|
||
id: string;
|
||
/** 模型显示名称 */
|
||
name: string;
|
||
/** 模型描述 */
|
||
description: string;
|
||
/** 模型图标(React 元素)*/
|
||
icon: React.ReactNode;
|
||
/** 颜色主题 */
|
||
color: string;
|
||
}
|
||
|
||
/**
|
||
* 可用模型配置列表
|
||
* 包含所有可供用户选择的 AI 模型
|
||
*/
|
||
export const AVAILABLE_MODELS: ModelConfig[] = [
|
||
{
|
||
id: 'deepseek',
|
||
name: 'DeepSeek',
|
||
description: '高性能对话模型,响应迅速',
|
||
icon: React.createElement(Zap, { className: 'w-5 h-5' }),
|
||
color: 'blue',
|
||
},
|
||
{
|
||
id: 'kimi-k2-thinking',
|
||
name: 'Kimi K2 Thinking',
|
||
description: '深度思考模型,适合复杂分析',
|
||
icon: React.createElement(Brain, { className: 'w-5 h-5' }),
|
||
color: 'purple',
|
||
},
|
||
{
|
||
id: 'kimi-k2',
|
||
name: 'Kimi K2',
|
||
description: '快速响应模型,适合简单查询',
|
||
icon: React.createElement(Zap, { className: 'w-5 h-5' }),
|
||
color: 'cyan',
|
||
},
|
||
{
|
||
id: 'deepmoney',
|
||
name: 'DeepMoney',
|
||
description: '金融专业模型,65K 上下文',
|
||
icon: React.createElement(TrendingUp, { className: 'w-5 h-5' }),
|
||
color: 'green',
|
||
},
|
||
];
|
||
|
||
/**
|
||
* 默认选中的模型 ID
|
||
*/
|
||
export const DEFAULT_MODEL_ID = 'deepmoney';
|
||
|
||
/**
|
||
* 根据 ID 查找模型配置
|
||
* @param modelId 模型 ID
|
||
* @returns 模型配置对象,未找到则返回 undefined
|
||
*/
|
||
export const findModelById = (modelId: string): ModelConfig | undefined => {
|
||
return AVAILABLE_MODELS.find((model) => model.id === modelId);
|
||
};
|