@lobehub/chat 1.47.12 → 1.47.14
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/CHANGELOG.md +50 -0
- package/changelog/v1.json +18 -0
- package/locales/ar/models.json +6 -0
- package/locales/bg-BG/models.json +6 -0
- package/locales/de-DE/models.json +6 -0
- package/locales/en-US/common.json +1 -1
- package/locales/en-US/models.json +6 -0
- package/locales/es-ES/models.json +6 -0
- package/locales/fa-IR/models.json +6 -0
- package/locales/fr-FR/models.json +6 -0
- package/locales/it-IT/models.json +6 -0
- package/locales/ja-JP/models.json +6 -0
- package/locales/ko-KR/models.json +6 -0
- package/locales/nl-NL/models.json +6 -0
- package/locales/pl-PL/models.json +6 -0
- package/locales/pt-BR/models.json +6 -0
- package/locales/ru-RU/models.json +6 -0
- package/locales/tr-TR/models.json +6 -0
- package/locales/vi-VN/models.json +6 -0
- package/locales/zh-CN/models.json +6 -0
- package/locales/zh-TW/models.json +6 -0
- package/package.json +4 -4
- package/src/app/(main)/settings/provider/(detail)/[id]/index.tsx +1 -1
- package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +118 -110
- package/src/app/(main)/settings/provider/features/ModelList/index.tsx +9 -6
- package/src/config/aiModels/ai360.ts +23 -27
- package/src/config/aiModels/giteeai.ts +61 -31
- package/src/config/aiModels/minimax.ts +19 -0
- package/src/config/aiModels/moonshot.ts +73 -1
- package/src/config/aiModels/taichu.ts +22 -1
- package/src/config/aiModels/upstage.ts +1 -1
- package/src/config/aiModels/zhipu.ts +13 -0
- package/src/config/modelProviders/ai21.ts +0 -2
- package/src/config/modelProviders/ai360.ts +22 -26
- package/src/config/modelProviders/anthropic.ts +1 -0
- package/src/config/modelProviders/giteeai.ts +58 -32
- package/src/config/modelProviders/google.ts +2 -0
- package/src/config/modelProviders/hunyuan.ts +0 -2
- package/src/config/modelProviders/mistral.ts +2 -0
- package/src/config/modelProviders/moonshot.ts +2 -0
- package/src/config/modelProviders/spark.ts +0 -2
- package/src/config/modelProviders/taichu.ts +15 -10
- package/src/config/modelProviders/upstage.ts +1 -3
- package/src/config/modelProviders/zeroone.ts +5 -1
- package/src/config/modelProviders/zhipu.ts +17 -1
- package/src/libs/agent-runtime/ai360/index.ts +24 -0
- package/src/libs/agent-runtime/anthropic/index.ts +36 -0
- package/src/libs/agent-runtime/baichuan/index.ts +28 -0
- package/src/libs/agent-runtime/deepseek/index.ts +17 -0
- package/src/libs/agent-runtime/fireworksai/index.ts +22 -0
- package/src/libs/agent-runtime/giteeai/index.ts +28 -0
- package/src/libs/agent-runtime/google/index.ts +40 -1
- package/src/libs/agent-runtime/groq/index.ts +29 -0
- package/src/libs/agent-runtime/huggingface/index.ts +37 -0
- package/src/libs/agent-runtime/internlm/index.ts +17 -0
- package/src/libs/agent-runtime/minimax/index.ts +2 -2
- package/src/libs/agent-runtime/mistral/index.ts +26 -0
- package/src/libs/agent-runtime/moonshot/index.ts +18 -0
- package/src/libs/agent-runtime/qwen/index.ts +25 -0
- package/src/libs/agent-runtime/sensenova/index.ts +28 -0
- package/src/libs/agent-runtime/siliconcloud/index.ts +34 -0
- package/src/libs/agent-runtime/stepfun/index.ts +25 -0
- package/src/libs/agent-runtime/xai/index.ts +18 -0
- package/src/libs/agent-runtime/zeroone/index.ts +17 -0
- package/src/libs/agent-runtime/zhipu/index.ts +35 -0
- package/src/server/globalConfig/genServerAiProviderConfig.ts +4 -1
- package/src/server/globalConfig/index.ts +3 -0
- package/src/services/chat.ts +7 -3
- package/src/types/aiProvider.ts +1 -0
@@ -6,10 +6,31 @@ const taichuChatModels: AIChatModelCard[] = [
|
|
6
6
|
functionCall: true,
|
7
7
|
},
|
8
8
|
contextWindowTokens: 32_768,
|
9
|
-
description: '
|
9
|
+
description: '基于海量高质数据训练,具有更强的文本理解、内容创作、对话问答等能力',
|
10
10
|
displayName: 'Taichu 2.0',
|
11
11
|
enabled: true,
|
12
12
|
id: 'taichu_llm',
|
13
|
+
pricing: {
|
14
|
+
currency: 'CNY',
|
15
|
+
input: 2,
|
16
|
+
output: 2,
|
17
|
+
},
|
18
|
+
type: 'chat',
|
19
|
+
},
|
20
|
+
{
|
21
|
+
abilities: {
|
22
|
+
vision: true,
|
23
|
+
},
|
24
|
+
contextWindowTokens: 4096,
|
25
|
+
description: '融合了图像理解、知识迁移、逻辑归因等能力,在图文问答领域表现突出',
|
26
|
+
displayName: 'Taichu 2.0V',
|
27
|
+
enabled: true,
|
28
|
+
id: 'taichu2_mm',
|
29
|
+
pricing: {
|
30
|
+
currency: 'CNY',
|
31
|
+
input: 5,
|
32
|
+
output: 5,
|
33
|
+
},
|
13
34
|
type: 'chat',
|
14
35
|
},
|
15
36
|
];
|
@@ -22,7 +22,7 @@ const upstageChatModels: AIChatModelCard[] = [
|
|
22
22
|
type: 'chat',
|
23
23
|
},
|
24
24
|
{
|
25
|
-
contextWindowTokens:
|
25
|
+
contextWindowTokens: 32_768,
|
26
26
|
description:
|
27
27
|
'Solar Pro 是 Upstage 推出的一款高智能LLM,专注于单GPU的指令跟随能力,IFEval得分80以上。目前支持英语,正式版本计划于2024年11月推出,将扩展语言支持和上下文长度。',
|
28
28
|
displayName: 'Solar Pro',
|
@@ -1,6 +1,19 @@
|
|
1
1
|
import { AIChatModelCard } from '@/types/aiModel';
|
2
2
|
|
3
3
|
const zhipuChatModels: AIChatModelCard[] = [
|
4
|
+
{
|
5
|
+
contextWindowTokens: 16_384,
|
6
|
+
description: 'GLM-Zero-Preview具备强大的复杂推理能力,在逻辑推理、数学、编程等领域表现优异。',
|
7
|
+
displayName: 'GLM-Zero-Preview',
|
8
|
+
enabled: true,
|
9
|
+
id: 'glm-zero-preview',
|
10
|
+
pricing: {
|
11
|
+
currency: 'CNY',
|
12
|
+
input: 10,
|
13
|
+
output: 10,
|
14
|
+
},
|
15
|
+
type: 'chat',
|
16
|
+
},
|
4
17
|
{
|
5
18
|
abilities: {
|
6
19
|
functionCall: true,
|
@@ -29,12 +29,10 @@ const Ai21: ModelProviderCard = {
|
|
29
29
|
checkModel: 'jamba-1.5-mini',
|
30
30
|
description: 'AI21 Labs 为企业构建基础模型和人工智能系统,加速生成性人工智能在生产中的应用。',
|
31
31
|
id: 'ai21',
|
32
|
-
modelList: { showModelFetcher: true },
|
33
32
|
modelsUrl: 'https://docs.ai21.com/reference',
|
34
33
|
name: 'Ai21Labs',
|
35
34
|
settings: {
|
36
35
|
sdkType: 'openai',
|
37
|
-
showModelFetcher: true,
|
38
36
|
},
|
39
37
|
url: 'https://studio.ai21.com',
|
40
38
|
};
|
@@ -4,59 +4,55 @@ import { ModelProviderCard } from '@/types/llm';
|
|
4
4
|
const Ai360: ModelProviderCard = {
|
5
5
|
chatModels: [
|
6
6
|
{
|
7
|
-
contextWindowTokens:
|
7
|
+
contextWindowTokens: 8000,
|
8
8
|
description:
|
9
|
-
'
|
10
|
-
displayName: '360GPT2
|
9
|
+
'360gpt2-o1 使用树搜索构建思维链,并引入了反思机制,使用强化学习训练,模型具备自我反思与纠错的能力。',
|
10
|
+
displayName: '360GPT2 o1',
|
11
11
|
enabled: true,
|
12
|
-
id: '360gpt2-
|
13
|
-
maxOutput: 7000,
|
12
|
+
id: '360gpt2-o1',
|
14
13
|
pricing: {
|
15
14
|
currency: 'CNY',
|
16
|
-
input:
|
17
|
-
output:
|
15
|
+
input: 20,
|
16
|
+
output: 50,
|
18
17
|
},
|
19
18
|
},
|
20
19
|
{
|
21
|
-
contextWindowTokens:
|
20
|
+
contextWindowTokens: 8000,
|
22
21
|
description:
|
23
|
-
'
|
24
|
-
displayName: '
|
22
|
+
'360智脑系列效果最好的主力千亿级大模型,广泛适用于各领域复杂任务场景。',
|
23
|
+
displayName: '360GPT2 Pro',
|
25
24
|
enabled: true,
|
26
|
-
|
27
|
-
id: '360gpt-pro',
|
28
|
-
maxOutput: 7000,
|
25
|
+
id: '360gpt2-pro',
|
29
26
|
pricing: {
|
30
27
|
currency: 'CNY',
|
31
|
-
input:
|
28
|
+
input: 2,
|
32
29
|
output: 5,
|
33
30
|
},
|
34
31
|
},
|
35
32
|
{
|
36
|
-
contextWindowTokens:
|
33
|
+
contextWindowTokens: 8000,
|
37
34
|
description:
|
38
|
-
'
|
39
|
-
displayName: '360GPT
|
35
|
+
'360智脑系列效果最好的主力千亿级大模型,广泛适用于各领域复杂任务场景。',
|
36
|
+
displayName: '360GPT Pro',
|
40
37
|
enabled: true,
|
41
|
-
|
42
|
-
|
38
|
+
functionCall: true,
|
39
|
+
id: '360gpt-pro',
|
43
40
|
pricing: {
|
44
41
|
currency: 'CNY',
|
45
42
|
input: 2,
|
46
|
-
output:
|
43
|
+
output: 5,
|
47
44
|
},
|
48
45
|
},
|
49
46
|
{
|
50
|
-
contextWindowTokens:
|
47
|
+
contextWindowTokens: 7000,
|
51
48
|
description:
|
52
|
-
'
|
53
|
-
displayName: '360GPT Turbo
|
49
|
+
'兼顾性能和效果的百亿级大模型,适合对性能/成本要求较高 的场景。',
|
50
|
+
displayName: '360GPT Turbo',
|
54
51
|
enabled: true,
|
55
|
-
id: '360gpt-turbo
|
56
|
-
maxOutput: 2048,
|
52
|
+
id: '360gpt-turbo',
|
57
53
|
pricing: {
|
58
54
|
currency: 'CNY',
|
59
|
-
input:
|
55
|
+
input: 1,
|
60
56
|
output: 2,
|
61
57
|
},
|
62
58
|
},
|
@@ -133,6 +133,7 @@ const Anthropic: ModelProviderCard = {
|
|
133
133
|
'Anthropic 是一家专注于人工智能研究和开发的公司,提供了一系列先进的语言模型,如 Claude 3.5 Sonnet、Claude 3 Sonnet、Claude 3 Opus 和 Claude 3 Haiku。这些模型在智能、速度和成本之间取得了理想的平衡,适用于从企业级工作负载到快速响应的各种应用场景。Claude 3.5 Sonnet 作为其最新模型,在多项评估中表现优异,同时保持了较高的性价比。',
|
134
134
|
enabled: true,
|
135
135
|
id: 'anthropic',
|
136
|
+
modelList: { showModelFetcher: true },
|
136
137
|
modelsUrl: 'https://docs.anthropic.com/en/docs/about-claude/models#model-names',
|
137
138
|
name: 'Anthropic',
|
138
139
|
proxyUrl: {
|
@@ -6,28 +6,14 @@ const GiteeAI: ModelProviderCard = {
|
|
6
6
|
{
|
7
7
|
contextWindowTokens: 16_000,
|
8
8
|
description:
|
9
|
-
'Qwen2.5-72B-Instruct
|
9
|
+
'Qwen2.5-72B-Instruct 支持 16k 上下文, 生成长文本超过 8K 。支持 function call 与外部系统无缝交互,极大提升了灵活性和扩展性。模型知识明显增加,并且大大提高了编码和数学能力, 多语言支持超过 29 种',
|
10
10
|
displayName: 'Qwen2.5 72B Instruct',
|
11
11
|
enabled: true,
|
12
12
|
functionCall: true,
|
13
13
|
id: 'Qwen2.5-72B-Instruct',
|
14
14
|
},
|
15
15
|
{
|
16
|
-
|
17
|
-
'Qwen2.5-Coder-32B-Instruct 是一款专为代码生成、代码理解和高效开发场景设计的大型语言模型,采用了业界领先的32B参数规模,能够满足多样化的编程需求。',
|
18
|
-
displayName: 'Qwen2.5 Coder 32B Instruct',
|
19
|
-
enabled: true,
|
20
|
-
id: 'Qwen2.5-Coder-32B-Instruct',
|
21
|
-
},
|
22
|
-
{
|
23
|
-
description:
|
24
|
-
'Qwen2.5-7B-Instruct 是一款 70 亿参数的大语言模型,支持 function call 与外部系统无缝交互,极大提升了灵活性和扩展性。优化中文和多语言场景,支持智能问答、内容生成等应用。',
|
25
|
-
displayName: 'Qwen2.5 7B Instruct',
|
26
|
-
enabled: true,
|
27
|
-
functionCall: true,
|
28
|
-
id: 'Qwen2.5-7B-Instruct',
|
29
|
-
},
|
30
|
-
{
|
16
|
+
contextWindowTokens: 32_000,
|
31
17
|
description:
|
32
18
|
'Qwen2.5-32B-Instruct 是一款 320 亿参数的大语言模型,性能表现均衡,优化中文和多语言场景,支持智能问答、内容生成等应用。',
|
33
19
|
displayName: 'Qwen2.5 32B Instruct',
|
@@ -35,6 +21,7 @@ const GiteeAI: ModelProviderCard = {
|
|
35
21
|
id: 'Qwen2.5-32B-Instruct',
|
36
22
|
},
|
37
23
|
{
|
24
|
+
contextWindowTokens: 24_000,
|
38
25
|
description:
|
39
26
|
'Qwen2.5-14B-Instruct 是一款 140 亿参数的大语言模型,性能表现优秀,优化中文和多语言场景,支持智能问答、内容生成等应用。',
|
40
27
|
displayName: 'Qwen2.5 14B Instruct',
|
@@ -42,35 +29,71 @@ const GiteeAI: ModelProviderCard = {
|
|
42
29
|
id: 'Qwen2.5-14B-Instruct',
|
43
30
|
},
|
44
31
|
{
|
45
|
-
contextWindowTokens:
|
32
|
+
contextWindowTokens: 32_000,
|
46
33
|
description:
|
47
|
-
'Qwen2
|
34
|
+
'Qwen2.5-7B-Instruct 是一款 70 亿参数的大语言模型,支持 function call 与外部系统无缝交互,极大提升了灵活性和扩展性。优化中文和多语言场景,支持智能问答、内容生成等应用。',
|
35
|
+
displayName: 'Qwen2.5 7B Instruct',
|
36
|
+
enabled: true,
|
37
|
+
functionCall: true,
|
38
|
+
id: 'Qwen2.5-7B-Instruct',
|
39
|
+
},
|
40
|
+
{
|
41
|
+
contextWindowTokens: 32_000,
|
42
|
+
description:
|
43
|
+
'Qwen2 是 Qwen 模型的最新系列,对比当前最优的开源模型,Qwen2-72B 在自然语言理解、知识、代码、数学及多语言等多项能力上均显著超越当前领先的模型。',
|
48
44
|
displayName: 'Qwen2 72B Instruct',
|
49
45
|
id: 'Qwen2-72B-Instruct',
|
50
46
|
},
|
51
47
|
{
|
52
|
-
contextWindowTokens:
|
48
|
+
contextWindowTokens: 24_000,
|
53
49
|
description:
|
54
50
|
'Qwen2 是 Qwen 模型的最新系列,能够超越同等规模的最优开源模型甚至更大规模的模型,Qwen2 7B 在多个评测上取得显著的优势,尤其是代码及中文理解上。',
|
55
51
|
displayName: 'Qwen2 7B Instruct',
|
56
52
|
id: 'Qwen2-7B-Instruct',
|
57
53
|
},
|
58
54
|
{
|
55
|
+
contextWindowTokens: 32_000,
|
59
56
|
description:
|
60
|
-
'
|
61
|
-
displayName: '
|
57
|
+
'Qwen2.5-Coder-32B-Instruct 是一款专为代码生成、代码理解和高效开发场景设计的大型语言模型,采用了业界领先的32B参数规模,能够满足多样化的编程需求。',
|
58
|
+
displayName: 'Qwen2.5 Coder 32B Instruct',
|
62
59
|
enabled: true,
|
63
|
-
id: '
|
60
|
+
id: 'Qwen2.5-Coder-32B-Instruct',
|
61
|
+
},
|
62
|
+
{
|
63
|
+
contextWindowTokens: 24_000,
|
64
|
+
description:
|
65
|
+
'Qwen2.5-Coder-14B-Instruct 是一款基于大规模预训练的编程指令模型,具备强大的代码理解和生成能力,能够高效地处理各种编程任务,特别适合智能代码编写、自动化脚本生成和编程问题解答。',
|
66
|
+
displayName: 'Qwen2.5 Coder 14B Instruct',
|
67
|
+
enabled: true,
|
68
|
+
id: 'Qwen2.5-Coder-14B-Instruct',
|
69
|
+
},
|
70
|
+
{
|
71
|
+
contextWindowTokens: 32_000,
|
72
|
+
description:
|
73
|
+
'Qwen2-VL-72B是一款强大的视觉语言模型,支持图像与文本的多模态处理,能够精确识别图像内容并生成相关描述或回答。',
|
74
|
+
displayName: 'Qwen2 VL 72B',
|
75
|
+
enabled: true,
|
76
|
+
id: 'Qwen2-VL-72B',
|
64
77
|
vision: true,
|
65
78
|
},
|
66
79
|
{
|
80
|
+
contextWindowTokens: 32_000,
|
67
81
|
description:
|
68
|
-
'InternVL2.5-26B
|
82
|
+
'InternVL2.5-26B是一款强大的视觉语言模型,支持图像与文本的多模态处理,能够精确识别图像内容并生成相关描述或回答。',
|
69
83
|
displayName: 'InternVL2.5 26B',
|
70
84
|
enabled: true,
|
71
85
|
id: 'InternVL2.5-26B',
|
72
86
|
vision: true,
|
73
87
|
},
|
88
|
+
{
|
89
|
+
contextWindowTokens: 32_000,
|
90
|
+
description:
|
91
|
+
'InternVL2-8B 是一款强大的视觉语言模型,支持图像与文本的多模态处理,能够精确识别图像内容并生成相关描述或回答。',
|
92
|
+
displayName: 'InternVL2 8B',
|
93
|
+
enabled: true,
|
94
|
+
id: 'InternVL2-8B',
|
95
|
+
vision: true,
|
96
|
+
},
|
74
97
|
{
|
75
98
|
contextWindowTokens: 32_000,
|
76
99
|
description:
|
@@ -82,28 +105,31 @@ const GiteeAI: ModelProviderCard = {
|
|
82
105
|
{
|
83
106
|
contextWindowTokens: 4000,
|
84
107
|
description:
|
85
|
-
'Yi-1.5-34B 在保持原系列模型优秀的通用语言能力的前提下,通过增量训练 5 千亿高质量 token,大幅提高了数学逻辑、代码能力。',
|
108
|
+
'Yi-1.5-34B-Chat 在保持原系列模型优秀的通用语言能力的前提下,通过增量训练 5 千亿高质量 token,大幅提高了数学逻辑、代码能力。',
|
86
109
|
displayName: 'Yi 34B Chat',
|
87
110
|
enabled: true,
|
88
111
|
id: 'Yi-34B-Chat',
|
89
112
|
},
|
113
|
+
/*
|
114
|
+
// not compatible with OpenAI SDK
|
90
115
|
{
|
91
|
-
contextWindowTokens: 8000,
|
92
116
|
description:
|
93
|
-
'
|
94
|
-
displayName: '
|
117
|
+
'代码小浣熊是基于商汤大语言模型的软件智能研发助手,覆盖软件需求分析、架构设计、代码编写、软件测试等环节,满足用户代码编写、编程学习等各类需求。代码小浣熊支持 Python、Java、JavaScript、C++、Go、SQL 等 90+主流编程语言和 VS Code、IntelliJ IDEA 等主流 IDE。在实际应用中,代码小浣熊可帮助开发者提升编程效率超 50%。',
|
118
|
+
displayName: 'Code Raccoon v1',
|
95
119
|
enabled: true,
|
96
|
-
id: '
|
120
|
+
id: 'code-raccoon-v1',
|
97
121
|
},
|
122
|
+
*/
|
98
123
|
{
|
124
|
+
contextWindowTokens: 8000,
|
99
125
|
description:
|
100
|
-
'
|
101
|
-
displayName: '
|
126
|
+
'DeepSeek Coder 33B 是一个代码语言模型, 基于 2 万亿数据训练而成,其中 87% 为代码, 13% 为中英文语言。模型引入 16K 窗口大小和填空任务,提供项目级别的代码补全和片段填充功能。',
|
127
|
+
displayName: 'DeepSeek Coder 33B Instruct',
|
102
128
|
enabled: true,
|
103
|
-
id: '
|
129
|
+
id: 'deepseek-coder-33B-instruct',
|
104
130
|
},
|
105
131
|
{
|
106
|
-
contextWindowTokens:
|
132
|
+
contextWindowTokens: 32_000,
|
107
133
|
description:
|
108
134
|
'CodeGeeX4-ALL-9B 是一个多语言代码生成模型,支持包括代码补全和生成、代码解释器、网络搜索、函数调用、仓库级代码问答在内的全面功能,覆盖软件开发的各种场景。是参数少于 10B 的顶尖代码生成模型。',
|
109
135
|
displayName: 'CodeGeeX4 All 9B',
|
@@ -273,6 +273,7 @@ const Google: ModelProviderCard = {
|
|
273
273
|
'Google 的 Gemini 系列是其最先进、通用的 AI模型,由 Google DeepMind 打造,专为多模态设计,支持文本、代码、图像、音频和视频的无缝理解与处理。适用于从数据中心到移动设备的多种环境,极大提升了AI模型的效率与应用广泛性。',
|
274
274
|
enabled: true,
|
275
275
|
id: 'google',
|
276
|
+
modelList: { showModelFetcher: true },
|
276
277
|
modelsUrl: 'https://ai.google.dev/gemini-api/docs/models/gemini',
|
277
278
|
name: 'Google',
|
278
279
|
proxyUrl: {
|
@@ -283,6 +284,7 @@ const Google: ModelProviderCard = {
|
|
283
284
|
placeholder: 'https://generativelanguage.googleapis.com',
|
284
285
|
},
|
285
286
|
sdkType: 'google',
|
287
|
+
showModelFetcher: true,
|
286
288
|
smoothing: {
|
287
289
|
speed: 2,
|
288
290
|
text: true,
|
@@ -135,13 +135,11 @@ const Hunyuan: ModelProviderCard = {
|
|
135
135
|
'由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力',
|
136
136
|
disableBrowserRequest: true,
|
137
137
|
id: 'hunyuan',
|
138
|
-
modelList: { showModelFetcher: true },
|
139
138
|
modelsUrl: 'https://cloud.tencent.com/document/product/1729/104753',
|
140
139
|
name: 'Hunyuan',
|
141
140
|
settings: {
|
142
141
|
disableBrowserRequest: true,
|
143
142
|
sdkType: 'openai',
|
144
|
-
showModelFetcher: true,
|
145
143
|
},
|
146
144
|
url: 'https://hunyuan.tencent.com',
|
147
145
|
};
|
@@ -150,10 +150,12 @@ const Mistral: ModelProviderCard = {
|
|
150
150
|
description:
|
151
151
|
'Mistral 提供先进的通用、专业和研究型模型,广泛应用于复杂推理、多语言任务、代码生成等领域,通过功能调用接口,用户可以集成自定义功能,实现特定应用。',
|
152
152
|
id: 'mistral',
|
153
|
+
modelList: { showModelFetcher: true },
|
153
154
|
modelsUrl: 'https://docs.mistral.ai/getting-started/models',
|
154
155
|
name: 'Mistral',
|
155
156
|
settings: {
|
156
157
|
sdkType: 'openai',
|
158
|
+
showModelFetcher: true,
|
157
159
|
},
|
158
160
|
url: 'https://mistral.ai',
|
159
161
|
};
|
@@ -35,6 +35,7 @@ const Moonshot: ModelProviderCard = {
|
|
35
35
|
description:
|
36
36
|
'Moonshot 是由北京月之暗面科技有限公司推出的开源平台,提供多种自然语言处理模型,应用领域广泛,包括但不限于内容创作、学术研究、智能推荐、医疗诊断等,支持长文本处理和复杂生成任务。',
|
37
37
|
id: 'moonshot',
|
38
|
+
modelList: { showModelFetcher: true },
|
38
39
|
modelsUrl: 'https://platform.moonshot.cn/docs/intro',
|
39
40
|
name: 'Moonshot',
|
40
41
|
proxyUrl: {
|
@@ -45,6 +46,7 @@ const Moonshot: ModelProviderCard = {
|
|
45
46
|
placeholder: 'https://api.moonshot.cn/v1',
|
46
47
|
},
|
47
48
|
sdkType: 'openai',
|
49
|
+
showModelFetcher: true,
|
48
50
|
smoothing: {
|
49
51
|
speed: 2,
|
50
52
|
text: true,
|
@@ -66,12 +66,10 @@ const Spark: ModelProviderCard = {
|
|
66
66
|
description:
|
67
67
|
'科大讯飞星火大模型提供多领域、多语言的强大 AI 能力,利用先进的自然语言处理技术,构建适用于智能硬件、智慧医疗、智慧金融等多种垂直场景的创新应用。',
|
68
68
|
id: 'spark',
|
69
|
-
modelList: { showModelFetcher: true },
|
70
69
|
modelsUrl: 'https://xinghuo.xfyun.cn/spark',
|
71
70
|
name: 'Spark',
|
72
71
|
settings: {
|
73
72
|
sdkType: 'openai',
|
74
|
-
showModelFetcher: true,
|
75
73
|
smoothing: {
|
76
74
|
speed: 2,
|
77
75
|
text: true,
|
@@ -5,34 +5,39 @@ const Taichu: ModelProviderCard = {
|
|
5
5
|
chatModels: [
|
6
6
|
{
|
7
7
|
contextWindowTokens: 32_768,
|
8
|
-
description: '
|
8
|
+
description: '基于海量高质数据训练,具有更强的文本理解、内容创作、对话问答等能力',
|
9
9
|
displayName: 'Taichu 2.0',
|
10
10
|
enabled: true,
|
11
11
|
functionCall: true,
|
12
12
|
id: 'taichu_llm',
|
13
|
+
pricing: {
|
14
|
+
currency: 'CNY',
|
15
|
+
input: 2,
|
16
|
+
output: 2,
|
17
|
+
},
|
13
18
|
},
|
14
|
-
/*
|
15
|
-
// TODO: Not support for now
|
16
19
|
{
|
17
|
-
|
18
|
-
|
20
|
+
contextWindowTokens: 4096,
|
21
|
+
description: '融合了图像理解、知识迁移、逻辑归因等能力,在图文问答领域表现突出',
|
19
22
|
displayName: 'Taichu 2.0V',
|
20
|
-
|
21
|
-
|
23
|
+
enabled: true,
|
24
|
+
id: 'taichu2_mm',
|
25
|
+
pricing: {
|
26
|
+
currency: 'CNY',
|
27
|
+
input: 5,
|
28
|
+
output: 5,
|
29
|
+
},
|
22
30
|
vision: true,
|
23
31
|
},
|
24
|
-
*/
|
25
32
|
],
|
26
33
|
checkModel: 'taichu_llm',
|
27
34
|
description:
|
28
35
|
'中科院自动化研究所和武汉人工智能研究院推出新一代多模态大模型,支持多轮问答、文本创作、图像生成、3D理解、信号分析等全面问答任务,拥有更强的认知、理解、创作能力,带来全新互动体验。',
|
29
36
|
id: 'taichu',
|
30
|
-
modelList: { showModelFetcher: true },
|
31
37
|
modelsUrl: 'https://ai-maas.wair.ac.cn/#/doc',
|
32
38
|
name: 'Taichu',
|
33
39
|
settings: {
|
34
40
|
sdkType: 'openai',
|
35
|
-
showModelFetcher: true,
|
36
41
|
},
|
37
42
|
url: 'https://ai-maas.wair.ac.cn',
|
38
43
|
};
|
@@ -21,7 +21,7 @@ const Upstage: ModelProviderCard = {
|
|
21
21
|
id: 'solar-1-mini-chat-ja',
|
22
22
|
},
|
23
23
|
{
|
24
|
-
contextWindowTokens:
|
24
|
+
contextWindowTokens: 32_768,
|
25
25
|
description:
|
26
26
|
'Solar Pro 是 Upstage 推出的一款高智能LLM,专注于单GPU的指令跟随能力,IFEval得分80以上。目前支持英语,正式版本计划于2024年11月推出,将扩展语言支持和上下文长度。',
|
27
27
|
displayName: 'Solar Pro',
|
@@ -34,12 +34,10 @@ const Upstage: ModelProviderCard = {
|
|
34
34
|
description:
|
35
35
|
'Upstage 专注于为各种商业需求开发AI模型,包括 Solar LLM 和文档 AI,旨在实现工作的人造通用智能(AGI)。通过 Chat API 创建简单的对话代理,并支持功能调用、翻译、嵌入以及特定领域应用。',
|
36
36
|
id: 'upstage',
|
37
|
-
modelList: { showModelFetcher: true },
|
38
37
|
modelsUrl: 'https://developers.upstage.ai/docs/getting-started/models',
|
39
38
|
name: 'Upstage',
|
40
39
|
settings: {
|
41
40
|
sdkType: 'openai',
|
42
|
-
showModelFetcher: true,
|
43
41
|
},
|
44
42
|
url: 'https://upstage.ai',
|
45
43
|
};
|
@@ -141,9 +141,13 @@ const ZeroOne: ModelProviderCard = {
|
|
141
141
|
description:
|
142
142
|
'零一万物致力于推动以人为本的AI 2.0技术革命,旨在通过大语言模型创造巨大的经济和社会价值,并开创新的AI生态与商业模式。',
|
143
143
|
id: 'zeroone',
|
144
|
+
modelList: { showModelFetcher: true },
|
144
145
|
modelsUrl: 'https://platform.lingyiwanwu.com/docs#模型与计费',
|
145
146
|
name: '01.AI',
|
146
|
-
settings: {
|
147
|
+
settings: {
|
148
|
+
sdkType: 'openai',
|
149
|
+
showModelFetcher: true,
|
150
|
+
},
|
147
151
|
url: 'https://www.lingyiwanwu.com/',
|
148
152
|
};
|
149
153
|
|
@@ -5,6 +5,18 @@ import { ModelProviderCard } from '@/types/llm';
|
|
5
5
|
// ref :https://open.bigmodel.cn/modelcenter/square
|
6
6
|
const ZhiPu: ModelProviderCard = {
|
7
7
|
chatModels: [
|
8
|
+
{
|
9
|
+
contextWindowTokens: 16_384,
|
10
|
+
description: 'GLM-Zero-Preview具备强大的复杂推理能力,在逻辑推理、数学、编程等领域表现优异。',
|
11
|
+
displayName: 'GLM-Zero-Preview',
|
12
|
+
enabled: true,
|
13
|
+
id: 'glm-zero-preview',
|
14
|
+
pricing: {
|
15
|
+
currency: 'CNY',
|
16
|
+
input: 10,
|
17
|
+
output: 10,
|
18
|
+
},
|
19
|
+
},
|
8
20
|
{
|
9
21
|
contextWindowTokens: 128_000,
|
10
22
|
description: 'GLM-4-Flash 是处理简单任务的理想选择,速度最快且免费。',
|
@@ -199,9 +211,13 @@ const ZhiPu: ModelProviderCard = {
|
|
199
211
|
description:
|
200
212
|
'智谱 AI 提供多模态与语言模型的开放平台,支持广泛的AI应用场景,包括文本处理、图像理解与编程辅助等。',
|
201
213
|
id: 'zhipu',
|
214
|
+
modelList: { showModelFetcher: true },
|
202
215
|
modelsUrl: 'https://open.bigmodel.cn/dev/howuse/model',
|
203
216
|
name: 'ZhiPu',
|
204
|
-
settings: {
|
217
|
+
settings: {
|
218
|
+
sdkType: 'openai',
|
219
|
+
showModelFetcher: true
|
220
|
+
},
|
205
221
|
url: 'https://zhipuai.cn',
|
206
222
|
};
|
207
223
|
|
@@ -1,6 +1,14 @@
|
|
1
1
|
import { ModelProvider } from '../types';
|
2
2
|
import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';
|
3
3
|
|
4
|
+
import { LOBE_DEFAULT_MODEL_LIST } from '@/config/aiModels';
|
5
|
+
|
6
|
+
export interface Ai360ModelCard {
|
7
|
+
id: string;
|
8
|
+
max_tokens: number;
|
9
|
+
total_tokens: number;
|
10
|
+
}
|
11
|
+
|
4
12
|
export const LobeAi360AI = LobeOpenAICompatibleFactory({
|
5
13
|
baseURL: 'https://api.360.cn/v1',
|
6
14
|
chatCompletion: {
|
@@ -14,5 +22,21 @@ export const LobeAi360AI = LobeOpenAICompatibleFactory({
|
|
14
22
|
debug: {
|
15
23
|
chatCompletion: () => process.env.DEBUG_AI360_CHAT_COMPLETION === '1',
|
16
24
|
},
|
25
|
+
models: {
|
26
|
+
transformModel: (m) => {
|
27
|
+
const model = m as unknown as Ai360ModelCard;
|
28
|
+
|
29
|
+
return {
|
30
|
+
contextWindowTokens: model.total_tokens,
|
31
|
+
enabled: LOBE_DEFAULT_MODEL_LIST.find((m) => model.id.endsWith(m.id))?.enabled || false,
|
32
|
+
functionCall: model.id === '360gpt-pro',
|
33
|
+
id: model.id,
|
34
|
+
maxTokens:
|
35
|
+
typeof model.max_tokens === 'number'
|
36
|
+
? model.max_tokens
|
37
|
+
: undefined,
|
38
|
+
};
|
39
|
+
},
|
40
|
+
},
|
17
41
|
provider: ModelProvider.Ai360,
|
18
42
|
});
|
@@ -13,18 +13,28 @@ import { buildAnthropicMessages, buildAnthropicTools } from '../utils/anthropicH
|
|
13
13
|
import { StreamingResponse } from '../utils/response';
|
14
14
|
import { AnthropicStream } from '../utils/streams';
|
15
15
|
|
16
|
+
import { LOBE_DEFAULT_MODEL_LIST } from '@/config/aiModels';
|
17
|
+
import type { ChatModelCard } from '@/types/llm';
|
18
|
+
|
19
|
+
export interface AnthropicModelCard {
|
20
|
+
display_name: string;
|
21
|
+
id: string;
|
22
|
+
}
|
23
|
+
|
16
24
|
const DEFAULT_BASE_URL = 'https://api.anthropic.com';
|
17
25
|
|
18
26
|
export class LobeAnthropicAI implements LobeRuntimeAI {
|
19
27
|
private client: Anthropic;
|
20
28
|
|
21
29
|
baseURL: string;
|
30
|
+
apiKey?: string;
|
22
31
|
|
23
32
|
constructor({ apiKey, baseURL = DEFAULT_BASE_URL, ...res }: ClientOptions = {}) {
|
24
33
|
if (!apiKey) throw AgentRuntimeError.createError(AgentRuntimeErrorType.InvalidProviderAPIKey);
|
25
34
|
|
26
35
|
this.client = new Anthropic({ apiKey, baseURL, ...res });
|
27
36
|
this.baseURL = this.client.baseURL;
|
37
|
+
this.apiKey = apiKey;
|
28
38
|
}
|
29
39
|
|
30
40
|
async chat(payload: ChatStreamPayload, options?: ChatCompetitionOptions) {
|
@@ -102,6 +112,32 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
|
|
102
112
|
top_p,
|
103
113
|
} satisfies Anthropic.MessageCreateParams;
|
104
114
|
}
|
115
|
+
|
116
|
+
async models() {
|
117
|
+
const url = `${this.baseURL}/v1/models`;
|
118
|
+
const response = await fetch(url, {
|
119
|
+
headers: {
|
120
|
+
'anthropic-version': '2023-06-01',
|
121
|
+
'x-api-key': `${this.apiKey}`,
|
122
|
+
},
|
123
|
+
method: 'GET',
|
124
|
+
});
|
125
|
+
const json = await response.json();
|
126
|
+
|
127
|
+
const modelList: AnthropicModelCard[] = json['data'];
|
128
|
+
|
129
|
+
return modelList
|
130
|
+
.map((model) => {
|
131
|
+
return {
|
132
|
+
displayName: model.display_name,
|
133
|
+
enabled: LOBE_DEFAULT_MODEL_LIST.find((m) => model.id.endsWith(m.id))?.enabled || false,
|
134
|
+
functionCall: model.id.toLowerCase().includes('claude-3'),
|
135
|
+
id: model.id,
|
136
|
+
vision: model.id.toLowerCase().includes('claude-3') && !model.id.toLowerCase().includes('claude-3-5-haiku'),
|
137
|
+
};
|
138
|
+
})
|
139
|
+
.filter(Boolean) as ChatModelCard[];
|
140
|
+
}
|
105
141
|
}
|
106
142
|
|
107
143
|
export default LobeAnthropicAI;
|