-
Notifications
You must be signed in to change notification settings - Fork 572
Expand file tree
/
Copy pathmodelConfig.ts
More file actions
156 lines (141 loc) · 3.57 KB
/
modelConfig.ts
File metadata and controls
156 lines (141 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Model type constants
export const MODEL_TYPES = {
LLM: "llm",
EMBEDDING: "embedding",
MULTI_EMBEDDING: "multi_embedding",
RERANK: "rerank",
STT: "stt",
TTS: "tts",
VLM: "vlm",
} as const;
// Model source constants
export const MODEL_SOURCES = {
OPENAI: "openai",
SILICON: "silicon",
MODELENGINE: "modelengine",
OPENAI_API_COMPATIBLE: "OpenAI-API-Compatible",
CUSTOM: "custom",
DASHSCOPE: "dashscope",
TOKENPONY: "tokenpony",
MINIMAX: "minimax",
} as const;
// Model status constants
export const MODEL_STATUS = {
AVAILABLE: "available",
UNAVAILABLE: "unavailable",
CHECKING: "detecting",
UNCHECKED: "not_detected",
} as const;
// Icon type constants
export const ICON_TYPES = {
PRESET: "preset",
CUSTOM: "custom",
} as const;
// Provider detection and icon mapping
export const MODEL_PROVIDER_KEYS = [
"qwen",
"openai",
"siliconflow",
"jina",
"deepseek",
"aliyuncs",
"tokenpony",
"dashscope",
"minimax",
] as const;
export type ModelProviderKey = (typeof MODEL_PROVIDER_KEYS)[number];
// Direct provider hint string mapping (no arrays)
export const PROVIDER_HINTS: Record<ModelProviderKey, string> = {
qwen: "qwen",
openai: "openai",
siliconflow: "siliconflow",
jina: "jina",
deepseek: "deepseek",
aliyuncs: "aliyuncs",
tokenpony: "tokenpony",
dashscope: "dashscope",
minimax: "minimax",
};
// Icon filenames for providers
export const PROVIDER_ICON_MAP: Record<ModelProviderKey, string> = {
qwen: "/qwen.png",
openai: "/openai.png",
siliconflow: "/siliconflow.png",
jina: "/jina.png",
deepseek: "/deepseek.png",
aliyuncs: "/aliyuncs.png",
dashscope:"/aliyuncs.png",
tokenpony: "/tokenpony.png",
minimax: "/minimax.png",
};
export const OFFICIAL_PROVIDER_ICON = "/modelengine-logo.png";
export const DEFAULT_PROVIDER_ICON = "/default-icon.png";
// Provider official website links
export const PROVIDER_LINKS: Record<string, string> = {
modelengine: "https://modelengine-ai.net/",
siliconflow: "https://siliconflow.ai/",
openai: "https://platform.openai.com/",
kimi: "https://platform.moonshot.ai/",
deepseek: "https://platform.deepseek.com/",
qwen: "https://bailian.console.aliyun.com/",
jina: "https://jina.ai/",
baai: "https://www.baai.ac.cn/",
minimax: "https://www.minimaxi.com/",
};
// User role constants
export const USER_ROLES = {
SPEED: "SPEED",
SU: "SU",
ADMIN: "ADMIN",
DEV: "DEV",
USER: "USER",
} as const;
// Memory tab key constants
export const MEMORY_TAB_KEYS = {
BASE: "base",
TENANT: "tenant",
AGENT_SHARED: "agentShared",
USER_PERSONAL: "userPersonal",
USER_AGENT: "userAgent",
} as const;
// Type for memory tab keys
export type MemoryTabKey =
(typeof MEMORY_TAB_KEYS)[keyof typeof MEMORY_TAB_KEYS];
// Layout configuration constants
export const LAYOUT_CONFIG = {
CARD_HEADER_PADDING: "10px 24px",
CARD_BODY_PADDING: "12px 20px",
MODEL_TITLE_MARGIN_LEFT: "0px",
HEADER_HEIGHT: 57, // Card title height
BUTTON_AREA_HEIGHT: 48, // Button area height
CARD_GAP: 12, // Row gutter
// App config specific
APP_CARD_BODY_PADDING: "8px 20px",
};
// Card theme constants
export const CARD_THEMES = {
default: {
borderColor: "#e6e6e6",
backgroundColor: "#ffffff",
},
llm: {
borderColor: "#e6e6e6",
backgroundColor: "#ffffff",
},
embedding: {
borderColor: "#e6e6e6",
backgroundColor: "#ffffff",
},
reranker: {
borderColor: "#e6e6e6",
backgroundColor: "#ffffff",
},
multimodal: {
borderColor: "#e6e6e6",
backgroundColor: "#ffffff",
},
voice: {
borderColor: "#e6e6e6",
backgroundColor: "#ffffff",
},
};