forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstepfun.ts
192 lines (188 loc) · 4.98 KB
/
stepfun.ts
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
import { ModelProviderCard } from '@/types/llm';
// ref: https://platform.stepfun.com/docs/llm/text
// 根据文档,阶级星辰大模型的上下文长度,其 k 的含义均为 1000
const Stepfun: ModelProviderCard = {
chatModels: [
{
contextWindowTokens: 8000,
description: '高速模型,适合实时对话。',
displayName: 'Step 1 Flash',
enabled: true,
functionCall: true,
id: 'step-1-flash',
pricing: {
currency: 'CNY',
input: 1,
output: 4,
},
},
{
contextWindowTokens: 8000,
description: '小型模型,适合轻量级任务。',
displayName: 'Step 1 8K',
enabled: true,
functionCall: true,
id: 'step-1-8k',
pricing: {
currency: 'CNY',
input: 5,
output: 20,
},
},
{
contextWindowTokens: 32_000,
description: '支持中等长度的对话,适用于多种应用场景。',
displayName: 'Step 1 32K',
enabled: true,
functionCall: true,
id: 'step-1-32k',
pricing: {
currency: 'CNY',
input: 15,
output: 70,
},
},
{
contextWindowTokens: 128_000,
description: '平衡性能与成本,适合一般场景。',
displayName: 'Step 1 128K',
enabled: true,
functionCall: true,
id: 'step-1-128k',
pricing: {
currency: 'CNY',
input: 40,
output: 200,
},
},
{
contextWindowTokens: 256_000,
description: '具备超长上下文处理能力,尤其适合长文档分析。',
displayName: 'Step 1 256K',
functionCall: true,
id: 'step-1-256k',
pricing: {
currency: 'CNY',
input: 95,
output: 300,
},
},
{
contextWindowTokens: 16_000,
description: '支持大规模上下文交互,适合复杂对话场景。',
displayName: 'Step 2 16K',
enabled: true,
functionCall: true,
id: 'step-2-16k',
pricing: {
currency: 'CNY',
input: 38,
output: 120,
},
},
{
contextWindowTokens: 8000,
description:
'基于新一代自研Attention架构MFA的极速大模型,用极低成本达到和step1类似的效果,同时保持了更高的吞吐和更快响应时延。能够处理通用任务,在代码能力上具备特长。',
displayName: 'Step 2 Mini',
enabled: true,
functionCall: true,
id: 'step-2-mini',
pricing: {
currency: 'CNY',
input: 1,
output: 2,
},
},
{
contextWindowTokens: 16_000,
description: 'step-2模型的实验版本,包含最新的特性,滚动更新中。不推荐在正式生产环境使用。',
displayName: 'Step 2 16K Exp',
functionCall: true,
id: 'step-2-16k-exp',
pricing: {
currency: 'CNY',
input: 38,
output: 120,
},
},
{
contextWindowTokens: 8000,
description: '小型视觉模型,适合基本的图文任务。',
displayName: 'Step 1V 8K',
enabled: true,
functionCall: true,
id: 'step-1v-8k',
pricing: {
currency: 'CNY',
input: 5,
output: 20,
},
vision: true,
},
{
contextWindowTokens: 32_000,
description: '支持视觉输入,增强多模态交互体验。',
displayName: 'Step 1V 32K',
functionCall: true,
id: 'step-1v-32k',
pricing: {
currency: 'CNY',
input: 15,
output: 70,
},
vision: true,
},
{
contextWindowTokens: 32_000,
description: '该模型拥有强大的图像理解能力。相比于 step-1v 系列模型,拥有更强的视觉性能。',
displayName: 'Step 1o Vision 32K',
enabled: true,
id: 'step-1o-vision-32k',
pricing: {
currency: 'CNY',
input: 15,
output: 70,
},
vision: true,
},
{
contextWindowTokens: 32_000,
description: '该模型拥有强大的视频理解能力。',
displayName: 'Step 1.5V Mini',
enabled: true,
id: 'step-1.5v-mini',
pricing: {
currency: 'CNY',
input: 8,
output: 35,
},
vision: true,
},
],
checkModel: 'step-2-mini',
description:
'阶级星辰大模型具备行业领先的多模态及复杂推理能力,支持超长文本理解和强大的自主调度搜索引擎功能。',
// after test, currently https://api.stepfun.com/v1/chat/completions has the CORS issue
// So we should close the browser request mode
disableBrowserRequest: true,
id: 'stepfun',
modelList: { showModelFetcher: true },
modelsUrl: 'https://platform.stepfun.com/docs/llm/text',
name: 'Stepfun',
settings: {
disableBrowserRequest: true,
sdkType: 'openai',
showModelFetcher: true,
smoothing: {
speed: 2,
text: true,
},
},
smoothing: {
speed: 2,
text: true,
},
url: 'https://stepfun.com',
};
export default Stepfun;