forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathollama.ts
347 lines (345 loc) · 12.2 KB
/
ollama.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
import { ModelProviderCard } from '@/types/llm';
const Ollama: ModelProviderCard = {
chatModels: [
{
contextWindowTokens: 128_000,
description:
'Llama 3.1 是 Meta 推出的领先模型,支持高达 405B 参数,可应用于复杂对话、多语言翻译和数据分析领域。',
displayName: 'Llama 3.1 8B',
enabled: true,
functionCall: true,
id: 'llama3.1',
},
{
contextWindowTokens: 128_000,
description:
'Llama 3.1 是 Meta 推出的领先模型,支持高达 405B 参数,可应用于复杂对话、多语言翻译和数据分析领域。',
displayName: 'Llama 3.1 70B',
id: 'llama3.1:70b',
},
{
contextWindowTokens: 128_000,
description:
'Llama 3.1 是 Meta 推出的领先模型,支持高达 405B 参数,可应用于复杂对话、多语言翻译和数据分析领域。',
displayName: 'Llama 3.1 405B',
id: 'llama3.1:405b',
},
{
contextWindowTokens: 16_384,
description:
'Code Llama 是一款专注于代码生成和讨论的 LLM,结合广泛的编程语言支持,适用于开发者环境。',
displayName: 'Code Llama 7B',
enabled: true,
id: 'codellama',
},
{
contextWindowTokens: 16_384,
description:
'Code Llama 是一款专注于代码生成和讨论的 LLM,结合广泛的编程语言支持,适用于开发者环境。',
displayName: 'Code Llama 13B',
id: 'codellama:13b',
},
{
contextWindowTokens: 16_384,
description:
'Code Llama 是一款专注于代码生成和讨论的 LLM,结合广泛的编程语言支持,适用于开发者环境。',
displayName: 'Code Llama 34B',
id: 'codellama:34b',
},
{
contextWindowTokens: 16_384,
description:
'Code Llama 是一款专注于代码生成和讨论的 LLM,结合广泛的编程语言支持,适用于开发者环境。',
displayName: 'Code Llama 70B',
id: 'codellama:70b',
},
{
contextWindowTokens: 128_000,
description: 'QwQ 是一个实验研究模型,专注于提高 AI 推理能力。',
displayName: 'QwQ 32B',
enabled: true,
functionCall: true,
id: 'qwq',
releasedAt: '2024-11-28',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2.5 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2.5 0.5B',
id: 'qwen2.5:0.5b',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2.5 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2.5 1.5B',
id: 'qwen2.5:1.5b',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2.5 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2.5 7B',
enabled: true,
functionCall: true,
id: 'qwen2.5',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2.5 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2.5 72B',
id: 'qwen2.5:72b',
},
{
contextWindowTokens: 65_536,
description: 'CodeQwen1.5 是基于大量代码数据训练的大型语言模型,专为解决复杂编程任务。',
displayName: 'CodeQwen1.5 7B',
functionCall: true,
id: 'codeqwen',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2 0.5B',
functionCall: true,
id: 'qwen2:0.5b',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2 1.5B',
functionCall: true,
id: 'qwen2:1.5b',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2 7B',
functionCall: true,
id: 'qwen2',
},
{
contextWindowTokens: 128_000,
description: 'Qwen2 是阿里巴巴的新一代大规模语言模型,以优异的性能支持多元化的应用需求。',
displayName: 'Qwen2 72B',
functionCall: true,
id: 'qwen2:72b',
},
{
contextWindowTokens: 8192,
description: 'Gemma 2 是 Google 推出的高效模型,涵盖从小型应用到复杂数据处理的多种应用场景。',
displayName: 'Gemma 2 2B',
id: 'gemma2:2b',
},
{
contextWindowTokens: 8192,
description: 'Gemma 2 是 Google 推出的高效模型,涵盖从小型应用到复杂数据处理的多种应用场景。',
displayName: 'Gemma 2 9B',
id: 'gemma2',
},
{
contextWindowTokens: 8192,
description: 'Gemma 2 是 Google 推出的高效模型,涵盖从小型应用到复杂数据处理的多种应用场景。',
displayName: 'Gemma 2 27B',
id: 'gemma2:27b',
},
{
contextWindowTokens: 8192,
description: 'CodeGemma 专用于不同编程任务的轻量级语言模型,支持快速迭代和集成。',
displayName: 'CodeGemma 2B',
id: 'codegemma:2b',
},
{
contextWindowTokens: 8192,
description: 'CodeGemma 专用于不同编程任务的轻量级语言模型,支持快速迭代和集成。',
displayName: 'CodeGemma 7B',
id: 'codegemma',
},
{
contextWindowTokens: 128_000,
description: 'Phi-3 是微软推出的轻量级开放模型,适用于高效集成和大规模知识推理。',
displayName: 'Phi-3 3.8B',
enabled: true,
id: 'phi3',
},
{
contextWindowTokens: 128_000,
description: 'Phi-3 是微软推出的轻量级开放模型,适用于高效集成和大规模知识推理。',
displayName: 'Phi-3 14B',
id: 'phi3:14b',
},
{
contextWindowTokens: 32_768,
description:
'WizardLM 2 是微软AI提供的语言模型,在复杂对话、多语言、推理和智能助手领域表现尤为出色。',
displayName: 'WizardLM 2 7B',
enabled: true,
id: 'wizardlm2',
},
{
contextWindowTokens: 65_536,
description:
'WizardLM 2 是微软AI提供的语言模型,在复杂对话、多语言、推理和智能助手领域表现尤为出色。',
displayName: 'WizardLM 2 8x22B',
id: 'wizardlm2:8x22b',
},
{
contextWindowTokens: 32_768,
description: 'MathΣtral 专为科学研究和数学推理设计,提供有效的计算能力和结果解释。',
displayName: 'MathΣtral 7B',
enabled: true,
id: 'mathstral',
},
{
contextWindowTokens: 32_768,
description: 'Mistral 是 Mistral AI 发布的 7B 模型,适合多变的语言处理需求。',
displayName: 'Mistral 7B',
enabled: true,
functionCall: true,
id: 'mistral',
},
{
contextWindowTokens: 32_768,
description:
'Mixtral 是 Mistral AI 的专家模型,具有开源权重,并在代码生成和语言理解方面提供支持。',
displayName: 'Mixtral 8x7B',
enabled: true,
functionCall: true,
id: 'mixtral',
},
{
contextWindowTokens: 65_536,
description:
'Mixtral 是 Mistral AI 的专家模型,具有开源权重,并在代码生成和语言理解方面提供支持。',
displayName: 'Mixtral 8x22B',
functionCall: true,
id: 'mixtral:8x22b',
},
{
contextWindowTokens: 128_000,
description:
'Mixtral Large 是 Mistral 的旗舰模型,结合代码生成、数学和推理的能力,支持 128k 上下文窗口。',
displayName: 'Mixtral Large 123B',
enabled: true,
id: 'mistral-large',
},
{
contextWindowTokens: 128_000,
description: 'Mistral Nemo 由 Mistral AI 和 NVIDIA 合作推出,是高效性能的 12B 模型。',
displayName: 'Mixtral Nemo 12B',
enabled: true,
functionCall: true,
id: 'mistral-nemo',
},
{
contextWindowTokens: 32_768,
description: 'Codestral 是 Mistral AI 的首款代码模型,为代码生成任务提供优异支持。',
displayName: 'Codestral 22B',
enabled: true,
id: 'codestral',
},
{
contextWindowTokens: 8192,
description: 'Aya 23 是 Cohere 推出的多语言模型,支持 23 种语言,为多元化语言应用提供便利。',
displayName: 'Aya 23 8B',
enabled: true,
id: 'aya',
},
{
contextWindowTokens: 8192,
description: 'Aya 23 是 Cohere 推出的多语言模型,支持 23 种语言,为多元化语言应用提供便利。',
displayName: 'Aya 23 35B',
id: 'aya:35b',
},
{
contextWindowTokens: 131_072,
description: 'Command R 是优化用于对话和长上下文任务的LLM,特别适合动态交互与知识管理。',
displayName: 'Command R 35B',
enabled: true,
functionCall: true,
id: 'command-r',
},
{
contextWindowTokens: 131_072,
description: 'Command R+ 是一款高性能的大型语言模型,专为真实企业场景和复杂应用而设计。',
displayName: 'Command R+ 104B',
enabled: true,
functionCall: true,
id: 'command-r-plus',
},
{
contextWindowTokens: 32_768,
description: 'DeepSeek V2 是高效的 Mixture-of-Experts 语言模型,适用于经济高效的处理需求。',
displayName: 'DeepSeek V2 16B',
enabled: true,
id: 'deepseek-v2',
},
{
contextWindowTokens: 128_000,
description: 'DeepSeek V2 236B 是 DeepSeek 的设计代码模型,提供强大的代码生成能力。',
displayName: 'DeepSeek V2 236B',
id: 'deepseek-v2:236b',
},
{
contextWindowTokens: 128_000,
description:
'DeepSeek Coder V2 是开源的混合专家代码模型,在代码任务方面表现优异,与 GPT4-Turbo 相媲美。',
displayName: 'DeepSeek Coder V2 16B',
enabled: true,
id: 'deepseek-coder-v2',
},
{
contextWindowTokens: 128_000,
description:
'DeepSeek Coder V2 是开源的混合专家代码模型,在代码任务方面表现优异,与 GPT4-Turbo 相媲美。',
displayName: 'DeepSeek Coder V2 236B',
id: 'deepseek-coder-v2:236b',
},
{
contextWindowTokens: 4096,
description: 'LLaVA 是结合视觉编码器和 Vicuna 的多模态模型,用于强大的视觉和语言理解。',
displayName: 'LLaVA 7B',
enabled: true,
id: 'llava',
vision: true,
},
{
contextWindowTokens: 4096,
description: 'LLaVA 是结合视觉编码器和 Vicuna 的多模态模型,用于强大的视觉和语言理解。',
displayName: 'LLaVA 13B',
id: 'llava:13b',
vision: true,
},
{
contextWindowTokens: 4096,
description: 'LLaVA 是结合视觉编码器和 Vicuna 的多模态模型,用于强大的视觉和语言理解。',
displayName: 'LLaVA 34B',
id: 'llava:34b',
vision: true,
},
{
contextWindowTokens: 128_000,
description:
'MiniCPM-V 是 OpenBMB 推出的新一代多模态大模型,具备卓越的 OCR 识别和多模态理解能力,支持广泛的应用场景。',
displayName: 'MiniCPM-V 8B',
enabled: true,
id: 'minicpm-v',
vision: true,
},
],
checkModel: 'deepseek-r1',
defaultShowBrowserRequest: true,
description:
'Ollama 提供的模型广泛涵盖代码生成、数学运算、多语种处理和对话互动等领域,支持企业级和本地化部署的多样化需求。',
id: 'ollama',
modelList: { showModelFetcher: true },
modelsUrl: 'https://ollama.com/library',
name: 'Ollama',
settings: {
defaultShowBrowserRequest: true,
sdkType: 'ollama',
showApiKey: false,
showModelFetcher: true,
},
showApiKey: false,
url: 'https://ollama.com',
};
export default Ollama;