2aa9d73325
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
224 lines
4.7 KiB
JavaScript
224 lines
4.7 KiB
JavaScript
import i18next from 'i18next';
|
||
|
||
// label 以简体中文(或厂商英文名)为 i18n 键;读取 label 时按当前界面语言翻译,
|
||
// 因此各渲染处直接使用 option.label 即可随语言切换。
|
||
const withLocalizedLabels = (options) =>
|
||
options.map((opt) => {
|
||
const labelKey = opt.label;
|
||
return Object.defineProperty({ ...opt }, 'label', {
|
||
get: () => i18next.t(labelKey),
|
||
enumerable: true,
|
||
});
|
||
});
|
||
|
||
export const CHANNEL_OPTIONS = withLocalizedLabels([
|
||
{ value: 1, color: 'green', label: 'OpenAI' },
|
||
{
|
||
value: 2,
|
||
color: 'light-blue',
|
||
label: 'Midjourney Proxy',
|
||
},
|
||
{
|
||
value: 5,
|
||
color: 'blue',
|
||
label: 'Midjourney Proxy Plus',
|
||
},
|
||
{
|
||
value: 36,
|
||
color: 'purple',
|
||
label: 'Suno API',
|
||
},
|
||
{ value: 4, color: 'grey', label: 'Ollama' },
|
||
{
|
||
value: 14,
|
||
color: 'indigo',
|
||
label: 'Anthropic Claude',
|
||
},
|
||
{
|
||
value: 33,
|
||
color: 'indigo',
|
||
label: 'AWS Claude',
|
||
},
|
||
{ value: 41, color: 'blue', label: 'Vertex AI' },
|
||
{
|
||
value: 3,
|
||
color: 'teal',
|
||
label: 'Azure OpenAI',
|
||
},
|
||
{
|
||
value: 34,
|
||
color: 'purple',
|
||
label: 'Cohere',
|
||
},
|
||
{ value: 39, color: 'grey', label: 'Cloudflare' },
|
||
{ value: 43, color: 'blue', label: 'DeepSeek' },
|
||
{
|
||
value: 15,
|
||
color: 'blue',
|
||
label: '百度文心千帆',
|
||
},
|
||
{
|
||
value: 46,
|
||
color: 'blue',
|
||
label: '百度文心千帆V2',
|
||
},
|
||
{
|
||
value: 17,
|
||
color: 'orange',
|
||
label: '阿里通义千问',
|
||
},
|
||
{
|
||
value: 18,
|
||
color: 'blue',
|
||
label: '讯飞星火认知',
|
||
},
|
||
{
|
||
value: 16,
|
||
color: 'violet',
|
||
label: '智谱 ChatGLM(已经弃用,请使用智谱 GLM-4V)',
|
||
},
|
||
{
|
||
value: 26,
|
||
color: 'purple',
|
||
label: '智谱 GLM-4V',
|
||
},
|
||
{
|
||
value: 27,
|
||
color: 'blue',
|
||
label: 'Perplexity',
|
||
},
|
||
{
|
||
value: 24,
|
||
color: 'orange',
|
||
label: 'Google Gemini',
|
||
},
|
||
{
|
||
value: 11,
|
||
color: 'orange',
|
||
label: 'Google PaLM2',
|
||
},
|
||
{
|
||
value: 47,
|
||
color: 'blue',
|
||
label: 'Xinference',
|
||
},
|
||
{ value: 25, color: 'green', label: 'Moonshot' },
|
||
{ value: 20, color: 'green', label: 'OpenRouter' },
|
||
{ value: 19, color: 'blue', label: '360 智脑' },
|
||
{ value: 23, color: 'teal', label: '腾讯混元' },
|
||
{ value: 31, color: 'green', label: '零一万物' },
|
||
{ value: 35, color: 'green', label: 'MiniMax' },
|
||
{ value: 37, color: 'teal', label: 'Dify' },
|
||
{ value: 38, color: 'blue', label: 'Jina' },
|
||
{ value: 40, color: 'purple', label: 'SiliconCloud' },
|
||
{ value: 42, color: 'blue', label: 'Mistral AI' },
|
||
{ value: 8, color: 'pink', label: '自定义渠道' },
|
||
{
|
||
value: 22,
|
||
color: 'blue',
|
||
label: '知识库:FastGPT',
|
||
},
|
||
{
|
||
value: 21,
|
||
color: 'purple',
|
||
label: '知识库:AI Proxy',
|
||
},
|
||
{
|
||
value: 44,
|
||
color: 'purple',
|
||
label: '嵌入模型:MokaAI M3E',
|
||
},
|
||
{
|
||
value: 45,
|
||
color: 'blue',
|
||
label: '字节火山方舟、豆包通用',
|
||
},
|
||
{
|
||
value: 48,
|
||
color: 'blue',
|
||
label: 'xAI',
|
||
},
|
||
{
|
||
value: 49,
|
||
color: 'blue',
|
||
label: 'Coze',
|
||
},
|
||
{
|
||
value: 50,
|
||
color: 'green',
|
||
label: '可灵',
|
||
},
|
||
{
|
||
value: 51,
|
||
color: 'blue',
|
||
label: '即梦',
|
||
},
|
||
{
|
||
value: 52,
|
||
color: 'purple',
|
||
label: 'Vidu',
|
||
},
|
||
{
|
||
value: 53,
|
||
color: 'blue',
|
||
label: 'SubModel',
|
||
},
|
||
{
|
||
value: 54,
|
||
color: 'blue',
|
||
label: '豆包视频',
|
||
},
|
||
{
|
||
value: 55,
|
||
color: 'green',
|
||
label: 'Sora',
|
||
},
|
||
{
|
||
value: 56,
|
||
color: 'blue',
|
||
label: 'Replicate',
|
||
},
|
||
{
|
||
// 腾讯云视频(点播 VOD AIGC 生视频:VS/seedance + 可灵);value 对应后端 ChannelTypeTencentVideo=57
|
||
// 密钥格式:SecretId|SecretKey|SubAppId[|Region]
|
||
value: 57,
|
||
color: 'teal',
|
||
label: '腾讯云视频',
|
||
},
|
||
{
|
||
// Tezign(特赞)视频网关(seedance 2.0);value 对应后端 ChannelTypeTezignVideo=58
|
||
// 密钥格式:上游 Bearer 密钥(sk-gw-...)
|
||
value: 58,
|
||
color: 'orange',
|
||
label: 'Tezign 视频',
|
||
},
|
||
{
|
||
// 腾讯云生图(点播 VOD AIGC:GEM / nano banana);value 对应后端 ChannelTypeTencentImage=59
|
||
// 密钥格式:SecretId|SecretKey|SubAppId[|Region]
|
||
value: 59,
|
||
color: 'cyan',
|
||
label: '腾讯云生图',
|
||
},
|
||
{
|
||
// Dreamina 视频(海外版 Seedance);value 对应后端 ChannelTypeDreaminaVideo=60
|
||
// 密钥格式:上游 API Key(Bearer 鉴权)
|
||
value: 60,
|
||
color: 'pink',
|
||
label: 'Dreamina 视频',
|
||
},
|
||
{
|
||
// TokenPony Seedance 2.0/2.5;value 对应后端 ChannelTypeTokenPonyVideo=61
|
||
// 密钥格式:上游 API Key(Bearer 鉴权)
|
||
value: 61,
|
||
color: 'cyan',
|
||
label: 'TokenPony 视频',
|
||
},
|
||
{
|
||
value: 62,
|
||
color: 'green',
|
||
label: '百度 Seedance 视频',
|
||
},
|
||
]);
|
||
|
||
export const MODEL_TABLE_PAGE_SIZE = 10;
|