@lobehub/chat 1.15.34 → 1.16.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.
Potentially problematic release.
This version of @lobehub/chat might be problematic. Click here for more details.
- package/CHANGELOG.md +51 -0
- package/Dockerfile +4 -0
- package/Dockerfile.database +4 -0
- package/package.json +1 -1
- package/src/app/(main)/settings/llm/ProviderList/providers.tsx +4 -0
- package/src/app/api/chat/agentRuntime.ts +14 -0
- package/src/components/Branding/CustomLogo.tsx +97 -44
- package/src/components/Branding/index.tsx +3 -10
- package/src/config/llm.ts +14 -0
- package/src/config/modelProviders/fireworksai.ts +143 -0
- package/src/config/modelProviders/index.ts +8 -0
- package/src/config/modelProviders/spark.ts +59 -0
- package/src/const/settings/llm.ts +10 -0
- package/src/features/Conversation/Error/APIKeyForm/index.tsx +2 -2
- package/src/libs/agent-runtime/AgentRuntime.ts +14 -0
- package/src/libs/agent-runtime/fireworksai/index.test.ts +255 -0
- package/src/libs/agent-runtime/fireworksai/index.ts +10 -0
- package/src/libs/agent-runtime/spark/index.test.ts +255 -0
- package/src/libs/agent-runtime/spark/index.ts +13 -0
- package/src/libs/agent-runtime/types/type.ts +2 -0
- package/src/libs/agent-runtime/utils/streams/openai.test.ts +3 -3
- package/src/libs/agent-runtime/utils/streams/openai.ts +4 -1
- package/src/server/globalConfig/index.ts +18 -1
- package/src/types/user/settings/keyVaults.ts +2 -0
- package/src/features/Conversation/Error/APIKeyForm/ProviderAvatar.tsx +0 -118
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,57 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
## [Version 1.16.0](https://github.com/lobehub/lobe-chat/compare/v1.15.35...v1.16.0)
|
6
|
+
|
7
|
+
<sup>Released on **2024-09-10**</sup>
|
8
|
+
|
9
|
+
#### ✨ Features
|
10
|
+
|
11
|
+
- **misc**: Add Fireworks AI Model Provider, Add Spark model provider.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's improved
|
19
|
+
|
20
|
+
- **misc**: Add Fireworks AI Model Provider, closes [#3392](https://github.com/lobehub/lobe-chat/issues/3392) [#48](https://github.com/lobehub/lobe-chat/issues/48) ([fa0d84d](https://github.com/lobehub/lobe-chat/commit/fa0d84d))
|
21
|
+
- **misc**: Add Spark model provider, closes [#3098](https://github.com/lobehub/lobe-chat/issues/3098) [#25](https://github.com/lobehub/lobe-chat/issues/25) ([fc85c20](https://github.com/lobehub/lobe-chat/commit/fc85c20))
|
22
|
+
|
23
|
+
</details>
|
24
|
+
|
25
|
+
<div align="right">
|
26
|
+
|
27
|
+
[](#readme-top)
|
28
|
+
|
29
|
+
</div>
|
30
|
+
|
31
|
+
### [Version 1.15.35](https://github.com/lobehub/lobe-chat/compare/v1.15.34...v1.15.35)
|
32
|
+
|
33
|
+
<sup>Released on **2024-09-10**</sup>
|
34
|
+
|
35
|
+
#### 💄 Styles
|
36
|
+
|
37
|
+
- **misc**: Update CustomLogo.
|
38
|
+
|
39
|
+
<br/>
|
40
|
+
|
41
|
+
<details>
|
42
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
43
|
+
|
44
|
+
#### Styles
|
45
|
+
|
46
|
+
- **misc**: Update CustomLogo, closes [#3874](https://github.com/lobehub/lobe-chat/issues/3874) ([dd7c8df](https://github.com/lobehub/lobe-chat/commit/dd7c8df))
|
47
|
+
|
48
|
+
</details>
|
49
|
+
|
50
|
+
<div align="right">
|
51
|
+
|
52
|
+
[](#readme-top)
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
5
56
|
### [Version 1.15.34](https://github.com/lobehub/lobe-chat/compare/v1.15.33...v1.15.34)
|
6
57
|
|
7
58
|
<sup>Released on **2024-09-10**</sup>
|
package/Dockerfile
CHANGED
@@ -117,6 +117,8 @@ ENV \
|
|
117
117
|
BAICHUAN_API_KEY="" \
|
118
118
|
# DeepSeek
|
119
119
|
DEEPSEEK_API_KEY="" \
|
120
|
+
# Fireworks AI
|
121
|
+
FIREWORKSAI_API_KEY="" FIREWORKSAI_MODEL_LIST="" \
|
120
122
|
# Google
|
121
123
|
GOOGLE_API_KEY="" GOOGLE_PROXY_URL="" \
|
122
124
|
# Groq
|
@@ -141,6 +143,8 @@ ENV \
|
|
141
143
|
QWEN_API_KEY="" QWEN_MODEL_LIST="" \
|
142
144
|
# SiliconCloud
|
143
145
|
SILICONCLOUD_API_KEY="" SILICONCLOUD_MODEL_LIST="" SILICONCLOUD_PROXY_URL="" \
|
146
|
+
# Spark
|
147
|
+
SPARK_API_KEY="" \
|
144
148
|
# Stepfun
|
145
149
|
STEPFUN_API_KEY="" \
|
146
150
|
# Taichu
|
package/Dockerfile.database
CHANGED
@@ -149,6 +149,8 @@ ENV \
|
|
149
149
|
BAICHUAN_API_KEY="" \
|
150
150
|
# DeepSeek
|
151
151
|
DEEPSEEK_API_KEY="" \
|
152
|
+
# Fireworks AI
|
153
|
+
FIREWORKSAI_API_KEY="" FIREWORKSAI_MODEL_LIST="" \
|
152
154
|
# Google
|
153
155
|
GOOGLE_API_KEY="" GOOGLE_PROXY_URL="" \
|
154
156
|
# Groq
|
@@ -173,6 +175,8 @@ ENV \
|
|
173
175
|
QWEN_API_KEY="" QWEN_MODEL_LIST="" \
|
174
176
|
# SiliconCloud
|
175
177
|
SILICONCLOUD_API_KEY="" SILICONCLOUD_MODEL_LIST="" SILICONCLOUD_PROXY_URL="" \
|
178
|
+
# Spark
|
179
|
+
SPARK_API_KEY="" \
|
176
180
|
# Stepfun
|
177
181
|
STEPFUN_API_KEY="" \
|
178
182
|
# Taichu
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.16.0",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -5,6 +5,7 @@ import {
|
|
5
5
|
AnthropicProviderCard,
|
6
6
|
BaichuanProviderCard,
|
7
7
|
DeepSeekProviderCard,
|
8
|
+
FireworksAIProviderCard,
|
8
9
|
GoogleProviderCard,
|
9
10
|
GroqProviderCard,
|
10
11
|
MinimaxProviderCard,
|
@@ -15,6 +16,7 @@ import {
|
|
15
16
|
PerplexityProviderCard,
|
16
17
|
QwenProviderCard,
|
17
18
|
SiliconCloudProviderCard,
|
19
|
+
SparkProviderCard,
|
18
20
|
StepfunProviderCard,
|
19
21
|
TaichuProviderCard,
|
20
22
|
TogetherAIProviderCard,
|
@@ -47,6 +49,7 @@ export const useProviderList = (): ProviderItem[] => {
|
|
47
49
|
OpenRouterProviderCard,
|
48
50
|
NovitaProviderCard,
|
49
51
|
TogetherAIProviderCard,
|
52
|
+
FireworksAIProviderCard,
|
50
53
|
QwenProviderCard,
|
51
54
|
DeepSeekProviderCard,
|
52
55
|
MinimaxProviderCard,
|
@@ -61,6 +64,7 @@ export const useProviderList = (): ProviderItem[] => {
|
|
61
64
|
Ai360ProviderCard,
|
62
65
|
SiliconCloudProviderCard,
|
63
66
|
UpstageProviderCard,
|
67
|
+
SparkProviderCard,
|
64
68
|
],
|
65
69
|
[AzureProvider, OllamaProvider, OpenAIProvider, BedrockProvider],
|
66
70
|
);
|
@@ -151,6 +151,13 @@ const getLlmOptionsFromPayload = (provider: string, payload: JWTPayload) => {
|
|
151
151
|
|
152
152
|
return { apiKey };
|
153
153
|
}
|
154
|
+
case ModelProvider.FireworksAI: {
|
155
|
+
const { FIREWORKSAI_API_KEY } = getLLMConfig();
|
156
|
+
|
157
|
+
const apiKey = apiKeyManager.pick(payload?.apiKey || FIREWORKSAI_API_KEY);
|
158
|
+
|
159
|
+
return { apiKey };
|
160
|
+
}
|
154
161
|
case ModelProvider.ZeroOne: {
|
155
162
|
const { ZEROONE_API_KEY } = getLLMConfig();
|
156
163
|
|
@@ -213,6 +220,13 @@ const getLlmOptionsFromPayload = (provider: string, payload: JWTPayload) => {
|
|
213
220
|
|
214
221
|
const apiKey = apiKeyManager.pick(payload?.apiKey || UPSTAGE_API_KEY);
|
215
222
|
|
223
|
+
return { apiKey };
|
224
|
+
}
|
225
|
+
case ModelProvider.Spark: {
|
226
|
+
const { SPARK_API_KEY } = getLLMConfig();
|
227
|
+
|
228
|
+
const apiKey = apiKeyManager.pick(payload?.apiKey || SPARK_API_KEY);
|
229
|
+
|
216
230
|
return { apiKey };
|
217
231
|
}
|
218
232
|
}
|
@@ -1,72 +1,125 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
import type { DivProps, SvgProps } from '@lobehub/ui';
|
2
|
+
import type { LobeChatProps } from '@lobehub/ui/brand';
|
3
|
+
import { createStyles, useTheme } from 'antd-style';
|
4
|
+
import Image, { ImageProps } from 'next/image';
|
5
|
+
import { ReactNode, memo } from 'react';
|
6
|
+
import { Flexbox, FlexboxProps } from 'react-layout-kit';
|
5
7
|
|
6
8
|
import { BRANDING_LOGO_URL, BRANDING_NAME } from '@/const/branding';
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
const useStyles = createStyles(({ css }) => {
|
11
|
+
return {
|
12
|
+
extraTitle: css`
|
13
|
+
font-weight: 300;
|
14
|
+
white-space: nowrap;
|
15
|
+
`,
|
16
|
+
};
|
17
|
+
});
|
14
18
|
|
15
|
-
const
|
16
|
-
|
19
|
+
const CustomTextLogo = memo<FlexboxProps & { size: number }>(({ size, style, ...rest }) => {
|
20
|
+
return (
|
17
21
|
<Flexbox
|
18
|
-
className={className}
|
19
22
|
height={size}
|
20
23
|
style={{
|
21
24
|
fontSize: size / 1.5,
|
22
|
-
fontWeight: '
|
25
|
+
fontWeight: 'bolder',
|
23
26
|
userSelect: 'none',
|
27
|
+
...style,
|
24
28
|
}}
|
29
|
+
{...rest}
|
25
30
|
>
|
26
31
|
{BRANDING_NAME}
|
27
32
|
</Flexbox>
|
28
33
|
);
|
34
|
+
});
|
35
|
+
|
36
|
+
const CustomImageLogo = memo<Omit<ImageProps, 'alt' | 'src'> & { size: number }>(
|
37
|
+
({ size, ...rest }) => {
|
38
|
+
return (
|
39
|
+
<Image
|
40
|
+
alt={BRANDING_NAME}
|
41
|
+
height={size}
|
42
|
+
src={BRANDING_LOGO_URL}
|
43
|
+
unoptimized={true}
|
44
|
+
width={size}
|
45
|
+
{...rest}
|
46
|
+
/>
|
47
|
+
);
|
48
|
+
},
|
49
|
+
);
|
29
50
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
51
|
+
const Divider = memo<SvgProps & DivProps & { size?: number }>(
|
52
|
+
({ size = '1em', style, ...rest }) => (
|
53
|
+
<svg
|
54
|
+
fill="none"
|
34
55
|
height={size}
|
35
|
-
|
36
|
-
|
56
|
+
shapeRendering="geometricPrecision"
|
57
|
+
stroke="currentColor"
|
58
|
+
strokeLinecap="round"
|
59
|
+
strokeLinejoin="round"
|
60
|
+
style={{ flex: 'none', lineHeight: 1, ...style }}
|
61
|
+
viewBox="0 0 24 24"
|
37
62
|
width={size}
|
38
|
-
|
39
|
-
|
63
|
+
{...rest}
|
64
|
+
>
|
65
|
+
<path d="M16.88 3.549L7.12 20.451" />
|
66
|
+
</svg>
|
67
|
+
),
|
68
|
+
);
|
69
|
+
|
70
|
+
const CustomLogo = memo<LobeChatProps>(({ extra, size = 32, className, style, type, ...rest }) => {
|
71
|
+
const theme = useTheme();
|
72
|
+
const { styles } = useStyles();
|
73
|
+
let logoComponent: ReactNode;
|
74
|
+
|
40
75
|
switch (type) {
|
76
|
+
case '3d':
|
77
|
+
case 'flat': {
|
78
|
+
logoComponent = <CustomImageLogo size={size} style={style} {...rest} />;
|
79
|
+
break;
|
80
|
+
}
|
81
|
+
case 'mono': {
|
82
|
+
logoComponent = (
|
83
|
+
<CustomImageLogo size={size} style={{ filter: 'grayscale(100%)', ...style }} {...rest} />
|
84
|
+
);
|
85
|
+
break;
|
86
|
+
}
|
41
87
|
case 'text': {
|
42
|
-
|
88
|
+
logoComponent = <CustomTextLogo size={size} style={style} {...rest} />;
|
89
|
+
break;
|
43
90
|
}
|
44
|
-
|
45
91
|
case 'combine': {
|
46
|
-
|
47
|
-
|
48
|
-
{
|
49
|
-
{
|
50
|
-
|
92
|
+
logoComponent = (
|
93
|
+
<>
|
94
|
+
<CustomImageLogo size={size} />
|
95
|
+
<CustomTextLogo size={size} style={{ marginLeft: Math.round(size / 4) }} />
|
96
|
+
</>
|
51
97
|
);
|
52
|
-
}
|
53
98
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
height={size}
|
63
|
-
src={BRANDING_LOGO_URL}
|
64
|
-
unoptimized={true}
|
65
|
-
width={size}
|
66
|
-
/>
|
67
|
-
);
|
99
|
+
if (!extra)
|
100
|
+
logoComponent = (
|
101
|
+
<Flexbox align={'center'} flex={'none'} horizontal {...rest}>
|
102
|
+
{logoComponent}
|
103
|
+
</Flexbox>
|
104
|
+
);
|
105
|
+
|
106
|
+
break;
|
68
107
|
}
|
69
108
|
}
|
109
|
+
|
110
|
+
if (!extra) return logoComponent;
|
111
|
+
|
112
|
+
const extraSize = Math.round((size / 3) * 1.9);
|
113
|
+
|
114
|
+
return (
|
115
|
+
<Flexbox align={'center'} className={className} flex={'none'} horizontal {...rest}>
|
116
|
+
{logoComponent}
|
117
|
+
<Divider size={extraSize} style={{ color: theme.colorFill }} />
|
118
|
+
<div className={styles.extraTitle} style={{ fontSize: extraSize }}>
|
119
|
+
{extra}
|
120
|
+
</div>
|
121
|
+
</Flexbox>
|
122
|
+
);
|
70
123
|
});
|
71
124
|
|
72
125
|
export default CustomLogo;
|
@@ -5,17 +5,10 @@ import { isCustomBranding } from '@/const/version';
|
|
5
5
|
|
6
6
|
import CustomLogo from './CustomLogo';
|
7
7
|
|
8
|
-
|
9
|
-
className?: string;
|
10
|
-
extra?: string;
|
11
|
-
size?: number;
|
12
|
-
type?: LobeChatProps['type'];
|
13
|
-
}
|
14
|
-
|
15
|
-
export const ProductLogo = memo<ProductLogoProps>(({ size, className, extra, type }) => {
|
8
|
+
export const ProductLogo = memo<LobeChatProps>((props) => {
|
16
9
|
if (isCustomBranding) {
|
17
|
-
return <CustomLogo
|
10
|
+
return <CustomLogo {...props} />;
|
18
11
|
}
|
19
12
|
|
20
|
-
return <LobeChat
|
13
|
+
return <LobeChat {...props} />;
|
21
14
|
});
|
package/src/config/llm.ts
CHANGED
@@ -64,6 +64,10 @@ export const getLLMConfig = () => {
|
|
64
64
|
TOGETHERAI_API_KEY: z.string().optional(),
|
65
65
|
TOGETHERAI_MODEL_LIST: z.string().optional(),
|
66
66
|
|
67
|
+
ENABLED_FIREWORKSAI: z.boolean(),
|
68
|
+
FIREWORKSAI_API_KEY: z.string().optional(),
|
69
|
+
FIREWORKSAI_MODEL_LIST: z.string().optional(),
|
70
|
+
|
67
71
|
ENABLED_AWS_BEDROCK: z.boolean(),
|
68
72
|
AWS_BEDROCK_MODEL_LIST: z.string().optional(),
|
69
73
|
AWS_REGION: z.string().optional(),
|
@@ -101,6 +105,9 @@ export const getLLMConfig = () => {
|
|
101
105
|
|
102
106
|
ENABLED_UPSTAGE: z.boolean(),
|
103
107
|
UPSTAGE_API_KEY: z.string().optional(),
|
108
|
+
|
109
|
+
ENABLED_SPARK: z.boolean(),
|
110
|
+
SPARK_API_KEY: z.string().optional(),
|
104
111
|
},
|
105
112
|
runtimeEnv: {
|
106
113
|
API_KEY_SELECT_MODE: process.env.API_KEY_SELECT_MODE,
|
@@ -149,6 +156,10 @@ export const getLLMConfig = () => {
|
|
149
156
|
TOGETHERAI_API_KEY: process.env.TOGETHERAI_API_KEY,
|
150
157
|
TOGETHERAI_MODEL_LIST: process.env.TOGETHERAI_MODEL_LIST,
|
151
158
|
|
159
|
+
ENABLED_FIREWORKSAI: !!process.env.FIREWORKSAI_API_KEY,
|
160
|
+
FIREWORKSAI_API_KEY: process.env.FIREWORKSAI_API_KEY,
|
161
|
+
FIREWORKSAI_MODEL_LIST: process.env.FIREWORKSAI_MODEL_LIST,
|
162
|
+
|
152
163
|
ENABLED_MOONSHOT: !!process.env.MOONSHOT_API_KEY,
|
153
164
|
MOONSHOT_API_KEY: process.env.MOONSHOT_API_KEY,
|
154
165
|
MOONSHOT_PROXY_URL: process.env.MOONSHOT_PROXY_URL,
|
@@ -199,6 +210,9 @@ export const getLLMConfig = () => {
|
|
199
210
|
|
200
211
|
ENABLED_UPSTAGE: !!process.env.UPSTAGE_API_KEY,
|
201
212
|
UPSTAGE_API_KEY: process.env.UPSTAGE_API_KEY,
|
213
|
+
|
214
|
+
ENABLED_SPARK: !!process.env.SPARK_API_KEY,
|
215
|
+
SPARK_API_KEY: process.env.SPARK_API_KEY,
|
202
216
|
},
|
203
217
|
});
|
204
218
|
};
|
@@ -0,0 +1,143 @@
|
|
1
|
+
import { ModelProviderCard } from '@/types/llm';
|
2
|
+
|
3
|
+
// ref https://fireworks.ai/models?show=Serverless
|
4
|
+
// ref https://fireworks.ai/pricing
|
5
|
+
const FireworksAI: ModelProviderCard = {
|
6
|
+
chatModels: [
|
7
|
+
{
|
8
|
+
description: 'Fireworks latest and most performant function-calling model. Firefunction-v2 is based on Llama-3 and trained to excel at function-calling as well as chat and instruction-following. See blog post for more details https://fireworks.ai/blog/firefunction-v2-launch-post',
|
9
|
+
displayName: 'Firefunction V2',
|
10
|
+
enabled: true,
|
11
|
+
functionCall: true,
|
12
|
+
id: 'accounts/fireworks/models/firefunction-v2',
|
13
|
+
tokens: 8192,
|
14
|
+
},
|
15
|
+
{
|
16
|
+
description: 'Fireworks open-source function calling model.',
|
17
|
+
displayName: 'Firefunction V1',
|
18
|
+
functionCall: true,
|
19
|
+
id: 'accounts/fireworks/models/firefunction-v1',
|
20
|
+
tokens: 32_768,
|
21
|
+
},
|
22
|
+
{
|
23
|
+
description: 'Vision-language model allowing both image and text as inputs (single image is recommended), trained on OSS model generated training data and open sourced on huggingface at fireworks-ai/FireLLaVA-13b',
|
24
|
+
displayName: 'FireLLaVA-13B',
|
25
|
+
enabled: true,
|
26
|
+
functionCall: false,
|
27
|
+
id: 'accounts/fireworks/models/firellava-13b',
|
28
|
+
tokens: 4096,
|
29
|
+
vision: true,
|
30
|
+
},
|
31
|
+
{
|
32
|
+
displayName: 'Llama 3.1 8B Instruct',
|
33
|
+
enabled: true,
|
34
|
+
functionCall: false,
|
35
|
+
id: 'accounts/fireworks/models/llama-v3p1-8b-instruct',
|
36
|
+
tokens: 131_072,
|
37
|
+
},
|
38
|
+
{
|
39
|
+
displayName: 'Llama 3.1 70B Instruct',
|
40
|
+
enabled: true,
|
41
|
+
functionCall: false,
|
42
|
+
id: 'accounts/fireworks/models/llama-v3p1-70b-instruct',
|
43
|
+
tokens: 131_072,
|
44
|
+
},
|
45
|
+
{
|
46
|
+
displayName: 'Llama 3.1 405B Instruct',
|
47
|
+
enabled: true,
|
48
|
+
functionCall: false,
|
49
|
+
id: 'accounts/fireworks/models/llama-v3p1-405b-instruct',
|
50
|
+
tokens: 131_072,
|
51
|
+
},
|
52
|
+
{
|
53
|
+
displayName: 'Llama 3 8B Instruct',
|
54
|
+
functionCall: false,
|
55
|
+
id: 'accounts/fireworks/models/llama-v3-8b-instruct',
|
56
|
+
tokens: 8192,
|
57
|
+
},
|
58
|
+
{
|
59
|
+
displayName: 'Llama 3 70B Instruct',
|
60
|
+
functionCall: false,
|
61
|
+
id: 'accounts/fireworks/models/llama-v3-70b-instruct',
|
62
|
+
tokens: 8192,
|
63
|
+
},
|
64
|
+
{
|
65
|
+
displayName: 'Llama 3 8B Instruct (HF version)',
|
66
|
+
functionCall: false,
|
67
|
+
id: 'accounts/fireworks/models/llama-v3-8b-instruct-hf',
|
68
|
+
tokens: 8192,
|
69
|
+
},
|
70
|
+
{
|
71
|
+
displayName: 'Llama 3 70B Instruct (HF version)',
|
72
|
+
functionCall: false,
|
73
|
+
id: 'accounts/fireworks/models/llama-v3-70b-instruct-hf',
|
74
|
+
tokens: 8192,
|
75
|
+
},
|
76
|
+
{
|
77
|
+
displayName: 'Gemma 2 9B Instruct',
|
78
|
+
enabled: true,
|
79
|
+
functionCall: false,
|
80
|
+
id: 'accounts/fireworks/models/gemma2-9b-it',
|
81
|
+
tokens: 8192,
|
82
|
+
},
|
83
|
+
{
|
84
|
+
displayName: 'Mixtral MoE 8x7B Instruct',
|
85
|
+
enabled: true,
|
86
|
+
functionCall: false,
|
87
|
+
id: 'accounts/fireworks/models/mixtral-8x7b-instruct',
|
88
|
+
tokens: 32_768,
|
89
|
+
},
|
90
|
+
{
|
91
|
+
displayName: 'Mixtral MoE 8x22B Instruct',
|
92
|
+
enabled: true,
|
93
|
+
functionCall: false,
|
94
|
+
id: 'accounts/fireworks/models/mixtral-8x22b-instruct',
|
95
|
+
tokens: 65_536,
|
96
|
+
},
|
97
|
+
{
|
98
|
+
displayName: 'Mixtral MoE 8x7B Instruct (HF version)',
|
99
|
+
functionCall: false,
|
100
|
+
id: 'accounts/fireworks/models/mixtral-8x7b-instruct-hf',
|
101
|
+
tokens: 32_768,
|
102
|
+
},
|
103
|
+
{
|
104
|
+
displayName: 'Phi 3 Vision Instruct',
|
105
|
+
enabled: true,
|
106
|
+
functionCall: false,
|
107
|
+
id: 'accounts/fireworks/models/phi-3-vision-128k-instruct',
|
108
|
+
tokens: 8192,
|
109
|
+
vision: true,
|
110
|
+
},
|
111
|
+
{
|
112
|
+
displayName: 'Yi-Large',
|
113
|
+
enabled: true,
|
114
|
+
functionCall: false,
|
115
|
+
id: 'accounts/yi-01-ai/models/yi-large',
|
116
|
+
tokens: 32_768,
|
117
|
+
},
|
118
|
+
{
|
119
|
+
displayName: 'StarCoder 7B',
|
120
|
+
functionCall: false,
|
121
|
+
id: 'accounts/fireworks/models/starcoder-7b',
|
122
|
+
tokens: 8192,
|
123
|
+
},
|
124
|
+
{
|
125
|
+
displayName: 'StarCoder 15.5B',
|
126
|
+
functionCall: false,
|
127
|
+
id: 'accounts/fireworks/models/starcoder-16b',
|
128
|
+
tokens: 8192,
|
129
|
+
},
|
130
|
+
{
|
131
|
+
displayName: 'MythoMax L2 13b',
|
132
|
+
functionCall: false,
|
133
|
+
id: 'accounts/fireworks/models/mythomax-l2-13b',
|
134
|
+
tokens: 4096,
|
135
|
+
},
|
136
|
+
],
|
137
|
+
checkModel: 'accounts/fireworks/models/firefunction-v2',
|
138
|
+
id: 'fireworksai',
|
139
|
+
modelList: { showModelFetcher: true },
|
140
|
+
name: 'Fireworks AI',
|
141
|
+
};
|
142
|
+
|
143
|
+
export default FireworksAI;
|
@@ -6,6 +6,7 @@ import AzureProvider from './azure';
|
|
6
6
|
import BaichuanProvider from './baichuan';
|
7
7
|
import BedrockProvider from './bedrock';
|
8
8
|
import DeepSeekProvider from './deepseek';
|
9
|
+
import FireworksAIProvider from './fireworksai';
|
9
10
|
import GoogleProvider from './google';
|
10
11
|
import GroqProvider from './groq';
|
11
12
|
import MinimaxProvider from './minimax';
|
@@ -18,6 +19,7 @@ import OpenRouterProvider from './openrouter';
|
|
18
19
|
import PerplexityProvider from './perplexity';
|
19
20
|
import QwenProvider from './qwen';
|
20
21
|
import SiliconCloudProvider from './siliconcloud';
|
22
|
+
import SparkProvider from './spark';
|
21
23
|
import StepfunProvider from './stepfun';
|
22
24
|
import TaichuProvider from './taichu';
|
23
25
|
import TogetherAIProvider from './togetherai';
|
@@ -39,6 +41,7 @@ export const LOBE_DEFAULT_MODEL_LIST: ChatModelCard[] = [
|
|
39
41
|
OllamaProvider.chatModels,
|
40
42
|
OpenRouterProvider.chatModels,
|
41
43
|
TogetherAIProvider.chatModels,
|
44
|
+
FireworksAIProvider.chatModels,
|
42
45
|
PerplexityProvider.chatModels,
|
43
46
|
AnthropicProvider.chatModels,
|
44
47
|
ZeroOneProvider.chatModels,
|
@@ -49,6 +52,7 @@ export const LOBE_DEFAULT_MODEL_LIST: ChatModelCard[] = [
|
|
49
52
|
Ai360Provider.chatModels,
|
50
53
|
SiliconCloudProvider.chatModels,
|
51
54
|
UpstageProvider.chatModels,
|
55
|
+
SparkProvider.chatModels,
|
52
56
|
].flat();
|
53
57
|
|
54
58
|
export const DEFAULT_MODEL_PROVIDER_LIST = [
|
@@ -61,6 +65,7 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
|
|
61
65
|
GoogleProvider,
|
62
66
|
OpenRouterProvider,
|
63
67
|
TogetherAIProvider,
|
68
|
+
FireworksAIProvider,
|
64
69
|
BedrockProvider,
|
65
70
|
PerplexityProvider,
|
66
71
|
MinimaxProvider,
|
@@ -76,6 +81,7 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
|
|
76
81
|
Ai360Provider,
|
77
82
|
SiliconCloudProvider,
|
78
83
|
UpstageProvider,
|
84
|
+
SparkProvider,
|
79
85
|
];
|
80
86
|
|
81
87
|
export const filterEnabledModels = (provider: ModelProviderCard) => {
|
@@ -93,6 +99,7 @@ export { default as AzureProviderCard } from './azure';
|
|
93
99
|
export { default as BaichuanProviderCard } from './baichuan';
|
94
100
|
export { default as BedrockProviderCard } from './bedrock';
|
95
101
|
export { default as DeepSeekProviderCard } from './deepseek';
|
102
|
+
export { default as FireworksAIProviderCard } from './fireworksai';
|
96
103
|
export { default as GoogleProviderCard } from './google';
|
97
104
|
export { default as GroqProviderCard } from './groq';
|
98
105
|
export { default as MinimaxProviderCard } from './minimax';
|
@@ -105,6 +112,7 @@ export { default as OpenRouterProviderCard } from './openrouter';
|
|
105
112
|
export { default as PerplexityProviderCard } from './perplexity';
|
106
113
|
export { default as QwenProviderCard } from './qwen';
|
107
114
|
export { default as SiliconCloudProviderCard } from './siliconcloud';
|
115
|
+
export { default as SparkProviderCard } from './spark';
|
108
116
|
export { default as StepfunProviderCard } from './stepfun';
|
109
117
|
export { default as TaichuProviderCard } from './taichu';
|
110
118
|
export { default as TogetherAIProviderCard } from './togetherai';
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { ModelProviderCard } from '@/types/llm';
|
2
|
+
|
3
|
+
// ref https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html#_3-%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E
|
4
|
+
// ref https://www.xfyun.cn/doc/spark/Web.html#_1-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E
|
5
|
+
const Spark: ModelProviderCard = {
|
6
|
+
chatModels: [
|
7
|
+
{
|
8
|
+
description: '轻量级大语言模型,低延迟,全免费 支持在线联网搜索功能 响应快速、便捷,全面免费开放 适用于低算力推理与模型精调等定制化场景',
|
9
|
+
displayName: 'Spark Lite',
|
10
|
+
enabled: true,
|
11
|
+
functionCall: false,
|
12
|
+
id: 'general',
|
13
|
+
maxOutput: 4096,
|
14
|
+
tokens: 8192,
|
15
|
+
},
|
16
|
+
{
|
17
|
+
description: '专业级大语言模型,兼顾模型效果与性能 数学、代码、医疗、教育等场景专项优化 支持联网搜索、天气、日期等多个内置插件 覆盖大部分知识问答、语言理解、文本创作等多个场景',
|
18
|
+
displayName: 'Spark Pro',
|
19
|
+
enabled: true,
|
20
|
+
functionCall: false,
|
21
|
+
id: 'generalv3',
|
22
|
+
maxOutput: 8192,
|
23
|
+
tokens: 8192,
|
24
|
+
},
|
25
|
+
{
|
26
|
+
description: '支持最长上下文的星火大模型,长文无忧 128K星火大模型强势来袭 通读全文,旁征博引 沟通无界,逻辑连贯',
|
27
|
+
displayName: 'Spark Pro-128K',
|
28
|
+
enabled: true,
|
29
|
+
functionCall: false,
|
30
|
+
id: 'Pro-128k',
|
31
|
+
maxOutput: 4096,
|
32
|
+
tokens: 128_000,
|
33
|
+
},
|
34
|
+
{
|
35
|
+
description: '最全面的星火大模型版本,功能丰富 支持联网搜索、天气、日期等多个内置插件 核心能力全面升级,各场景应用效果普遍提升 支持System角色人设与FunctionCall函数调用',
|
36
|
+
displayName: 'Spark3.5 Max',
|
37
|
+
enabled: true,
|
38
|
+
functionCall: false,
|
39
|
+
id: 'generalv3.5',
|
40
|
+
maxOutput: 8192,
|
41
|
+
tokens: 8192,
|
42
|
+
},
|
43
|
+
{
|
44
|
+
description: '最强大的星火大模型版本,效果极佳 全方位提升效果,引领智能巅峰 优化联网搜索链路,提供精准回答 强化文本总结能力,提升办公生产力',
|
45
|
+
displayName: 'Spark4.0 Ultra',
|
46
|
+
enabled: true,
|
47
|
+
functionCall: false,
|
48
|
+
id: '4.0Ultra',
|
49
|
+
maxOutput: 8192,
|
50
|
+
tokens: 8192,
|
51
|
+
},
|
52
|
+
],
|
53
|
+
checkModel: 'generalv3',
|
54
|
+
id: 'spark',
|
55
|
+
modelList: { showModelFetcher: true },
|
56
|
+
name: 'Spark',
|
57
|
+
};
|
58
|
+
|
59
|
+
export default Spark;
|