forked from QuantumNous/new-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
147 lines (134 loc) · 3.6 KB
/
Copy pathconstants.ts
File metadata and controls
147 lines (134 loc) · 3.6 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
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
/**
* Home page constants
* All hardcoded data for home page sections
*/
import { type TFunction } from 'i18next'
// Layout - Main base classes
export const MAIN_BASE_CLASSES = 'bg-background text-foreground w-full'
// Hero section - AI Applications (Left side)
export const AI_APPLICATIONS = [
'LobeHub.Color',
'Dify.Color',
'OpenWebUI',
'Cline',
] as const
// Hero section - AI Models (Right side)
export const AI_MODELS = [
'Qwen.Color',
'DeepSeek.Color',
'Doubao.Color',
'OpenAI',
'Claude.Color',
'Gemini.Color',
] as const
// Hero section - Gateway Features
export const GATEWAY_FEATURES = [
'Cost Tracking',
'Model Access',
'Guardrails',
'Observability',
'Budgets',
'Load Balancing',
'Rate Limiting',
'Token Mgmt',
'Prompt Caching',
'Pass-Through',
] as const
// Stats section - Default statistics
export const DEFAULT_STATS = [
{
value: '50',
suffix: '+',
description: 'upstream services integrated',
},
{
value: '100',
suffix: '+',
description: 'model billing support',
},
{
value: '50',
suffix: '+',
description: 'compatible API routes',
},
{
value: '10',
suffix: '+',
description: 'scheduling controls',
},
] as const
// Features section - Default features
export const DEFAULT_FEATURES = [
{
title: 'Lightning Fast',
description:
'Optimized network architecture ensures millisecond response times',
iconName: 'Zap',
},
{
title: 'Secure & Reliable',
description:
'Enterprise-grade security with comprehensive permission management',
iconName: 'Shield',
},
{
title: 'Global Coverage',
description: 'Multi-region deployment for stable global access',
iconName: 'Globe',
},
{
title: 'Developer Friendly',
description: 'Compatible API routes for common AI application workflows',
iconName: 'Code',
},
{
title: 'High Performance',
description: 'Support for high concurrency with automatic load balancing',
iconName: 'Gauge',
},
{
title: 'Transparent Billing',
description: 'Pay-as-you-go with real-time usage monitoring',
iconName: 'DollarSign',
},
{
title: 'Team Collaboration',
description: 'Multi-user management with flexible permission allocation',
iconName: 'Users',
},
{
title: 'Open Source',
description: 'Community driven, self-hosted, and extensible',
iconName: 'HeartHandshake',
},
] as const
export function getGatewayFeatures(t: TFunction) {
return GATEWAY_FEATURES.map((feature) => t(feature))
}
export function getDefaultStats(t: TFunction) {
return DEFAULT_STATS.map((stat) => ({
...stat,
description: stat.description ? t(stat.description) : undefined,
}))
}
export function getDefaultFeatures(t: TFunction) {
return DEFAULT_FEATURES.map((feature) => ({
...feature,
title: t(feature.title),
description: t(feature.description),
}))
}