ohlcv-ai 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +3 -0
- package/dist/aliyun/index.d.ts.map +1 -0
- package/dist/aliyun/model.d.ts.map +1 -0
- package/dist/deepseek/index.d.ts.map +1 -0
- package/dist/deepseek/model.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/openai/index.d.ts.map +1 -0
- package/dist/openai/model.d.ts.map +1 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +42 -0
- package/src/aliyun/index.ts +446 -0
- package/src/aliyun/model.ts +475 -0
- package/src/deepseek/index.ts +479 -0
- package/src/deepseek/model.ts +455 -0
- package/src/index.ts +50 -0
- package/src/openai/index.ts +766 -0
- package/src/openai/model.ts +430 -0
- package/src/types.ts +12 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
export enum DeepSeekModelType {
|
|
2
|
+
// Chat models
|
|
3
|
+
DEEPSEEK_CHAT = 'deepseek-chat',
|
|
4
|
+
DEEPSEEK_CHAT_LITE = 'deepseek-chat-lite',
|
|
5
|
+
DEEPSEEK_CHAT_PRO = 'deepseek-chat-pro',
|
|
6
|
+
DEEPSEEK_CHAT_MAX = 'deepseek-chat-max',
|
|
7
|
+
// Coder models
|
|
8
|
+
DEEPSEEK_CODER = 'deepseek-coder',
|
|
9
|
+
DEEPSEEK_CODER_LITE = 'deepseek-coder-lite',
|
|
10
|
+
DEEPSEEK_CODER_PRO = 'deepseek-coder-pro',
|
|
11
|
+
// Math models
|
|
12
|
+
DEEPSEEK_MATH = 'deepseek-math',
|
|
13
|
+
DEEPSEEK_MATH_PRO = 'deepseek-math-pro',
|
|
14
|
+
// Reasoning models
|
|
15
|
+
DEEPSEEK_REASONER = 'deepseek-reasoner',
|
|
16
|
+
DEEPSEEK_REASONER_PRO = 'deepseek-reasoner-pro',
|
|
17
|
+
// Vision models
|
|
18
|
+
DEEPSEEK_VISION = 'deepseek-vision',
|
|
19
|
+
DEEPSEEK_VISION_PRO = 'deepseek-vision-pro',
|
|
20
|
+
// Specialized models
|
|
21
|
+
DEEPSEEK_FINANCE = 'deepseek-finance',
|
|
22
|
+
DEEPSEEK_LAW = 'deepseek-law',
|
|
23
|
+
DEEPSEEK_MEDICAL = 'deepseek-medical',
|
|
24
|
+
DEEPSEEK_RESEARCH = 'deepseek-research',
|
|
25
|
+
// Multimodal models
|
|
26
|
+
DEEPSEEK_OMNI = 'deepseek-omni',
|
|
27
|
+
DEEPSEEK_OMNI_PRO = 'deepseek-omni-pro',
|
|
28
|
+
// Legacy models
|
|
29
|
+
DEEPSEEK_LLM = 'deepseek-llm',
|
|
30
|
+
DEEPSEEK_LLM_67B = 'deepseek-llm-67b',
|
|
31
|
+
DEEPSEEK_LLM_131B = 'deepseek-llm-131b'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DeepSeekModel {
|
|
35
|
+
name: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
endpoint: string;
|
|
38
|
+
endpoints?: string[];
|
|
39
|
+
format: 'openai' | 'deepseek';
|
|
40
|
+
description?: string;
|
|
41
|
+
maxTokens?: number;
|
|
42
|
+
contextLength?: number;
|
|
43
|
+
capabilities?: string[];
|
|
44
|
+
version?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const DEEPSEEK_MODELS: Map<DeepSeekModelType, DeepSeekModel> = new Map([
|
|
48
|
+
// Chat models
|
|
49
|
+
[
|
|
50
|
+
DeepSeekModelType.DEEPSEEK_CHAT,
|
|
51
|
+
{
|
|
52
|
+
name: DeepSeekModelType.DEEPSEEK_CHAT,
|
|
53
|
+
displayName: 'DeepSeek Chat',
|
|
54
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
55
|
+
endpoints: [
|
|
56
|
+
'https://api.deepseek.com/v1/chat/completions'
|
|
57
|
+
],
|
|
58
|
+
format: 'openai',
|
|
59
|
+
description: 'General purpose chat model for everyday conversations and tasks',
|
|
60
|
+
maxTokens: 4096,
|
|
61
|
+
contextLength: 16000,
|
|
62
|
+
capabilities: ['chat', 'text-generation', 'reasoning'],
|
|
63
|
+
version: '2025-01'
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
DeepSeekModelType.DEEPSEEK_CHAT_LITE,
|
|
68
|
+
{
|
|
69
|
+
name: DeepSeekModelType.DEEPSEEK_CHAT_LITE,
|
|
70
|
+
displayName: 'DeepSeek Chat Lite',
|
|
71
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
72
|
+
format: 'openai',
|
|
73
|
+
description: 'Lightweight chat model optimized for speed and efficiency',
|
|
74
|
+
maxTokens: 2048,
|
|
75
|
+
contextLength: 8000,
|
|
76
|
+
capabilities: ['chat', 'text-generation'],
|
|
77
|
+
version: '2025-01'
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
DeepSeekModelType.DEEPSEEK_CHAT_PRO,
|
|
82
|
+
{
|
|
83
|
+
name: DeepSeekModelType.DEEPSEEK_CHAT_PRO,
|
|
84
|
+
displayName: 'DeepSeek Chat Pro',
|
|
85
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
86
|
+
format: 'openai',
|
|
87
|
+
description: 'Professional chat model with enhanced reasoning capabilities',
|
|
88
|
+
maxTokens: 8192,
|
|
89
|
+
contextLength: 32000,
|
|
90
|
+
capabilities: ['chat', 'text-generation', 'complex-reasoning', 'analysis'],
|
|
91
|
+
version: '2025-01'
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
DeepSeekModelType.DEEPSEEK_CHAT_MAX,
|
|
96
|
+
{
|
|
97
|
+
name: DeepSeekModelType.DEEPSEEK_CHAT_MAX,
|
|
98
|
+
displayName: 'DeepSeek Chat Max',
|
|
99
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
100
|
+
format: 'openai',
|
|
101
|
+
description: 'Maximum capability chat model for most demanding tasks',
|
|
102
|
+
maxTokens: 16384,
|
|
103
|
+
contextLength: 64000,
|
|
104
|
+
capabilities: ['chat', 'text-generation', 'expert-analysis', 'research'],
|
|
105
|
+
version: '2025-01'
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
// Coder models
|
|
109
|
+
[
|
|
110
|
+
DeepSeekModelType.DEEPSEEK_CODER,
|
|
111
|
+
{
|
|
112
|
+
name: DeepSeekModelType.DEEPSEEK_CODER,
|
|
113
|
+
displayName: 'DeepSeek Coder',
|
|
114
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
115
|
+
format: 'openai',
|
|
116
|
+
description: 'Specialized model for code generation and programming tasks',
|
|
117
|
+
maxTokens: 16384,
|
|
118
|
+
contextLength: 64000,
|
|
119
|
+
capabilities: ['code-generation', 'programming', 'debugging', 'code-review'],
|
|
120
|
+
version: '2025-01'
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
[
|
|
124
|
+
DeepSeekModelType.DEEPSEEK_CODER_LITE,
|
|
125
|
+
{
|
|
126
|
+
name: DeepSeekModelType.DEEPSEEK_CODER_LITE,
|
|
127
|
+
displayName: 'DeepSeek Coder Lite',
|
|
128
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
129
|
+
format: 'openai',
|
|
130
|
+
description: 'Lightweight code generation model',
|
|
131
|
+
maxTokens: 4096,
|
|
132
|
+
contextLength: 16000,
|
|
133
|
+
capabilities: ['code-generation', 'programming'],
|
|
134
|
+
version: '2025-01'
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
DeepSeekModelType.DEEPSEEK_CODER_PRO,
|
|
139
|
+
{
|
|
140
|
+
name: DeepSeekModelType.DEEPSEEK_CODER_PRO,
|
|
141
|
+
displayName: 'DeepSeek Coder Pro',
|
|
142
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
143
|
+
format: 'openai',
|
|
144
|
+
description: 'Professional code generation model with advanced features',
|
|
145
|
+
maxTokens: 32768,
|
|
146
|
+
contextLength: 128000,
|
|
147
|
+
capabilities: ['code-generation', 'programming', 'system-design', 'architecture'],
|
|
148
|
+
version: '2025-01'
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
|
|
152
|
+
// Math models
|
|
153
|
+
[
|
|
154
|
+
DeepSeekModelType.DEEPSEEK_MATH,
|
|
155
|
+
{
|
|
156
|
+
name: DeepSeekModelType.DEEPSEEK_MATH,
|
|
157
|
+
displayName: 'DeepSeek Math',
|
|
158
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
159
|
+
format: 'openai',
|
|
160
|
+
description: 'Specialized model for mathematical reasoning and problem solving',
|
|
161
|
+
maxTokens: 8192,
|
|
162
|
+
contextLength: 32000,
|
|
163
|
+
capabilities: ['mathematical-reasoning', 'problem-solving', 'calculations'],
|
|
164
|
+
version: '2025-01'
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
DeepSeekModelType.DEEPSEEK_MATH_PRO,
|
|
169
|
+
{
|
|
170
|
+
name: DeepSeekModelType.DEEPSEEK_MATH_PRO,
|
|
171
|
+
displayName: 'DeepSeek Math Pro',
|
|
172
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
173
|
+
format: 'openai',
|
|
174
|
+
description: 'Advanced mathematical reasoning model for complex problems',
|
|
175
|
+
maxTokens: 16384,
|
|
176
|
+
contextLength: 64000,
|
|
177
|
+
capabilities: ['mathematical-reasoning', 'advanced-calculus', 'statistics'],
|
|
178
|
+
version: '2025-01'
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
|
|
182
|
+
// Reasoning models
|
|
183
|
+
[
|
|
184
|
+
DeepSeekModelType.DEEPSEEK_REASONER,
|
|
185
|
+
{
|
|
186
|
+
name: DeepSeekModelType.DEEPSEEK_REASONER,
|
|
187
|
+
displayName: 'DeepSeek Reasoner',
|
|
188
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
189
|
+
format: 'openai',
|
|
190
|
+
description: 'Dedicated reasoning model for logical analysis',
|
|
191
|
+
maxTokens: 8192,
|
|
192
|
+
contextLength: 32000,
|
|
193
|
+
capabilities: ['logical-reasoning', 'analysis', 'decision-making'],
|
|
194
|
+
version: '2025-01'
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
[
|
|
198
|
+
DeepSeekModelType.DEEPSEEK_REASONER_PRO,
|
|
199
|
+
{
|
|
200
|
+
name: DeepSeekModelType.DEEPSEEK_REASONER_PRO,
|
|
201
|
+
displayName: 'DeepSeek Reasoner Pro',
|
|
202
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
203
|
+
format: 'openai',
|
|
204
|
+
description: 'Advanced reasoning model for complex logical problems',
|
|
205
|
+
maxTokens: 16384,
|
|
206
|
+
contextLength: 64000,
|
|
207
|
+
capabilities: ['complex-reasoning', 'scientific-analysis', 'research'],
|
|
208
|
+
version: '2025-01'
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
|
|
212
|
+
// Vision models
|
|
213
|
+
[
|
|
214
|
+
DeepSeekModelType.DEEPSEEK_VISION,
|
|
215
|
+
{
|
|
216
|
+
name: DeepSeekModelType.DEEPSEEK_VISION,
|
|
217
|
+
displayName: 'DeepSeek Vision',
|
|
218
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
219
|
+
format: 'openai',
|
|
220
|
+
description: 'Vision model for image understanding and analysis',
|
|
221
|
+
maxTokens: 4096,
|
|
222
|
+
contextLength: 16000,
|
|
223
|
+
capabilities: ['image-understanding', 'visual-qa', 'document-analysis'],
|
|
224
|
+
version: '2025-01'
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
[
|
|
228
|
+
DeepSeekModelType.DEEPSEEK_VISION_PRO,
|
|
229
|
+
{
|
|
230
|
+
name: DeepSeekModelType.DEEPSEEK_VISION_PRO,
|
|
231
|
+
displayName: 'DeepSeek Vision Pro',
|
|
232
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
233
|
+
format: 'openai',
|
|
234
|
+
description: 'Advanced vision model for complex visual tasks',
|
|
235
|
+
maxTokens: 8192,
|
|
236
|
+
contextLength: 32000,
|
|
237
|
+
capabilities: ['image-understanding', 'video-analysis', 'visual-reasoning'],
|
|
238
|
+
version: '2025-01'
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
|
|
242
|
+
// Specialized models
|
|
243
|
+
[
|
|
244
|
+
DeepSeekModelType.DEEPSEEK_FINANCE,
|
|
245
|
+
{
|
|
246
|
+
name: DeepSeekModelType.DEEPSEEK_FINANCE,
|
|
247
|
+
displayName: 'DeepSeek Finance',
|
|
248
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
249
|
+
format: 'openai',
|
|
250
|
+
description: 'Specialized for financial analysis, market prediction, and investment insights',
|
|
251
|
+
maxTokens: 8192,
|
|
252
|
+
contextLength: 32000,
|
|
253
|
+
capabilities: ['financial-analysis', 'market-prediction', 'risk-assessment', 'investment-advice'],
|
|
254
|
+
version: '2025-01'
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
[
|
|
258
|
+
DeepSeekModelType.DEEPSEEK_LAW,
|
|
259
|
+
{
|
|
260
|
+
name: DeepSeekModelType.DEEPSEEK_LAW,
|
|
261
|
+
displayName: 'DeepSeek Law',
|
|
262
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
263
|
+
format: 'openai',
|
|
264
|
+
description: 'Specialized for legal analysis, contract review, and legal research',
|
|
265
|
+
maxTokens: 16384,
|
|
266
|
+
contextLength: 64000,
|
|
267
|
+
capabilities: ['legal-analysis', 'contract-review', 'legal-research'],
|
|
268
|
+
version: '2025-01'
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
[
|
|
272
|
+
DeepSeekModelType.DEEPSEEK_MEDICAL,
|
|
273
|
+
{
|
|
274
|
+
name: DeepSeekModelType.DEEPSEEK_MEDICAL,
|
|
275
|
+
displayName: 'DeepSeek Medical',
|
|
276
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
277
|
+
format: 'openai',
|
|
278
|
+
description: 'Specialized for medical consultation, diagnosis support, and health analysis',
|
|
279
|
+
maxTokens: 8192,
|
|
280
|
+
contextLength: 32000,
|
|
281
|
+
capabilities: ['medical-consultation', 'diagnostic-support', 'health-analysis'],
|
|
282
|
+
version: '2025-01'
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
[
|
|
286
|
+
DeepSeekModelType.DEEPSEEK_RESEARCH,
|
|
287
|
+
{
|
|
288
|
+
name: DeepSeekModelType.DEEPSEEK_RESEARCH,
|
|
289
|
+
displayName: 'DeepSeek Research',
|
|
290
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
291
|
+
format: 'openai',
|
|
292
|
+
description: 'Specialized for academic research and scientific analysis',
|
|
293
|
+
maxTokens: 32768,
|
|
294
|
+
contextLength: 128000,
|
|
295
|
+
capabilities: ['academic-research', 'scientific-analysis', 'paper-writing'],
|
|
296
|
+
version: '2025-01'
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
|
|
300
|
+
// Multimodal models
|
|
301
|
+
[
|
|
302
|
+
DeepSeekModelType.DEEPSEEK_OMNI,
|
|
303
|
+
{
|
|
304
|
+
name: DeepSeekModelType.DEEPSEEK_OMNI,
|
|
305
|
+
displayName: 'DeepSeek Omni',
|
|
306
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
307
|
+
format: 'openai',
|
|
308
|
+
description: 'Multimodal model supporting text, image, and audio',
|
|
309
|
+
maxTokens: 16384,
|
|
310
|
+
contextLength: 64000,
|
|
311
|
+
capabilities: ['text-generation', 'image-understanding', 'audio-processing', 'multimodal'],
|
|
312
|
+
version: '2025-01'
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
[
|
|
316
|
+
DeepSeekModelType.DEEPSEEK_OMNI_PRO,
|
|
317
|
+
{
|
|
318
|
+
name: DeepSeekModelType.DEEPSEEK_OMNI_PRO,
|
|
319
|
+
displayName: 'DeepSeek Omni Pro',
|
|
320
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
321
|
+
format: 'openai',
|
|
322
|
+
description: 'Professional multimodal model with advanced capabilities',
|
|
323
|
+
maxTokens: 32768,
|
|
324
|
+
contextLength: 128000,
|
|
325
|
+
capabilities: ['text-generation', 'multimodal', 'complex-reasoning', 'expert-analysis'],
|
|
326
|
+
version: '2025-01'
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
|
|
330
|
+
// Legacy models
|
|
331
|
+
[
|
|
332
|
+
DeepSeekModelType.DEEPSEEK_LLM,
|
|
333
|
+
{
|
|
334
|
+
name: DeepSeekModelType.DEEPSEEK_LLM,
|
|
335
|
+
displayName: 'DeepSeek LLM',
|
|
336
|
+
endpoint: 'https://api.deepseek.com/v1/chat/completions',
|
|
337
|
+
format: 'openai',
|
|
338
|
+
description: 'Base large language model',
|
|
339
|
+
maxTokens: 4096,
|
|
340
|
+
contextLength: 16000,
|
|
341
|
+
capabilities: ['text-generation'],
|
|
342
|
+
version: '2024-12'
|
|
343
|
+
}
|
|
344
|
+
]
|
|
345
|
+
]);
|
|
346
|
+
|
|
347
|
+
export function getDeepSeekModel(type: DeepSeekModelType): DeepSeekModel | undefined {
|
|
348
|
+
return DEEPSEEK_MODELS.get(type);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export function getAllDeepSeekModels(): DeepSeekModel[] {
|
|
352
|
+
return Array.from(DEEPSEEK_MODELS.values());
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export function getDeepSeekModelByName(name: string): DeepSeekModel | undefined {
|
|
356
|
+
for (const model of DEEPSEEK_MODELS.values()) {
|
|
357
|
+
if (model.name === name) {
|
|
358
|
+
return model;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
return undefined;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export function getAvailableDeepSeekModelTypes(): DeepSeekModelType[] {
|
|
365
|
+
return Array.from(DEEPSEEK_MODELS.keys());
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Helper functions for specific model categories
|
|
369
|
+
export function getDeepSeekTextModels(): DeepSeekModel[] {
|
|
370
|
+
return getAllDeepSeekModels().filter(model =>
|
|
371
|
+
model.capabilities?.includes('text-generation') &&
|
|
372
|
+
!model.capabilities?.includes('image-understanding') &&
|
|
373
|
+
!model.capabilities?.includes('audio-processing')
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export function getDeepSeekCodingModels(): DeepSeekModel[] {
|
|
378
|
+
return getAllDeepSeekModels().filter(model =>
|
|
379
|
+
model.capabilities?.includes('code-generation') ||
|
|
380
|
+
model.capabilities?.includes('programming')
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export function getDeepSeekReasoningModels(): DeepSeekModel[] {
|
|
385
|
+
return getAllDeepSeekModels().filter(model =>
|
|
386
|
+
model.capabilities?.includes('reasoning') ||
|
|
387
|
+
model.capabilities?.includes('logical-reasoning') ||
|
|
388
|
+
model.capabilities?.includes('complex-reasoning')
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export function getDeepSeekFinancialModels(): DeepSeekModel[] {
|
|
393
|
+
return getAllDeepSeekModels().filter(model =>
|
|
394
|
+
model.capabilities?.includes('financial-analysis') ||
|
|
395
|
+
model.capabilities?.includes('market-prediction')
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export function getDeepSeekSpecializedModels(): DeepSeekModel[] {
|
|
400
|
+
const specializedCapabilities = [
|
|
401
|
+
'financial-analysis',
|
|
402
|
+
'medical-consultation',
|
|
403
|
+
'mathematical-reasoning',
|
|
404
|
+
'legal-analysis',
|
|
405
|
+
'academic-research'
|
|
406
|
+
];
|
|
407
|
+
return getAllDeepSeekModels().filter(model =>
|
|
408
|
+
model.capabilities?.some(cap => specializedCapabilities.includes(cap))
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export function getDeepSeekMultimodalModels(): DeepSeekModel[] {
|
|
413
|
+
return getAllDeepSeekModels().filter(model =>
|
|
414
|
+
model.capabilities?.includes('multimodal')
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export function getBestModelForTask(taskType: string): DeepSeekModel | undefined {
|
|
419
|
+
const models = getAllDeepSeekModels();
|
|
420
|
+
|
|
421
|
+
switch (taskType.toLowerCase()) {
|
|
422
|
+
case 'chat':
|
|
423
|
+
case 'conversation':
|
|
424
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_CHAT_PRO);
|
|
425
|
+
|
|
426
|
+
case 'coding':
|
|
427
|
+
case 'programming':
|
|
428
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_CODER);
|
|
429
|
+
|
|
430
|
+
case 'reasoning':
|
|
431
|
+
case 'analysis':
|
|
432
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_REASONER_PRO);
|
|
433
|
+
|
|
434
|
+
case 'finance':
|
|
435
|
+
case 'financial':
|
|
436
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_FINANCE);
|
|
437
|
+
|
|
438
|
+
case 'math':
|
|
439
|
+
case 'mathematics':
|
|
440
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_MATH_PRO);
|
|
441
|
+
|
|
442
|
+
case 'vision':
|
|
443
|
+
case 'image':
|
|
444
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_VISION_PRO);
|
|
445
|
+
|
|
446
|
+
case 'multimodal':
|
|
447
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_OMNI_PRO);
|
|
448
|
+
|
|
449
|
+
case 'research':
|
|
450
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_RESEARCH);
|
|
451
|
+
|
|
452
|
+
default:
|
|
453
|
+
return models.find(m => m.name === DeepSeekModelType.DEEPSEEK_CHAT);
|
|
454
|
+
}
|
|
455
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// aliyun
|
|
2
|
+
export {
|
|
3
|
+
AliyunAI, createAliyunAI, AliyunConfig,
|
|
4
|
+
AliYunChatOptions,
|
|
5
|
+
AliYunStreamCallback,
|
|
6
|
+
} from './aliyun';
|
|
7
|
+
export {
|
|
8
|
+
AliYunModelType,
|
|
9
|
+
ALIYUN_MODELS
|
|
10
|
+
} from './aliyun/model';
|
|
11
|
+
|
|
12
|
+
// deepseek
|
|
13
|
+
export { DeepSeekAI, createDeepSeekAI } from './deepseek';
|
|
14
|
+
export {
|
|
15
|
+
DeepSeekModelType,
|
|
16
|
+
DEEPSEEK_MODELS
|
|
17
|
+
} from './deepseek/model';
|
|
18
|
+
export type {
|
|
19
|
+
DeepSeekConfig,
|
|
20
|
+
DeepSeekChatOptions,
|
|
21
|
+
DeepSeekStreamCallback,
|
|
22
|
+
DeepSeekChatMessage
|
|
23
|
+
} from './deepseek';
|
|
24
|
+
|
|
25
|
+
// open ai
|
|
26
|
+
export { OpenAI, createOpenAI, OpenAIConfig, OpenAIChatOptions, OpenAIStreamCallback } from './openai';
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
OpenAIModelType,
|
|
30
|
+
OPENAI_MODELS,
|
|
31
|
+
OpenAIModel,
|
|
32
|
+
getOpenAIModel,
|
|
33
|
+
getAllOpenAIModels,
|
|
34
|
+
getOpenAIModelByName,
|
|
35
|
+
getAvailableOpenAIModelTypes,
|
|
36
|
+
getChatModels,
|
|
37
|
+
getCompletionModels,
|
|
38
|
+
getEmbeddingModels,
|
|
39
|
+
getVisionModelsOpenAI,
|
|
40
|
+
getAudioModelsOpenAI,
|
|
41
|
+
getMultimodalModelsOpenAI,
|
|
42
|
+
getLatestModels,
|
|
43
|
+
getCostEfficientModels,
|
|
44
|
+
getHighContextModels,
|
|
45
|
+
estimateCost,
|
|
46
|
+
suggestModel,
|
|
47
|
+
CostEstimate
|
|
48
|
+
} from './openai/model';
|
|
49
|
+
|
|
50
|
+
export { OHLCV } from '@/types'
|