@lobehub/chat 1.14.3 → 1.14.4
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 +25 -0
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/docker-compose/.env.example +1 -1
- package/docker-compose/.env.zh-CN.example +1 -1
- package/docs/self-hosting/advanced/auth/next-auth/github.mdx +1 -1
- package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +4 -4
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +74 -0
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +78 -0
- package/docs/self-hosting/environment-variables/auth.mdx +21 -0
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +31 -8
- package/docs/self-hosting/server-database/docker-compose.mdx +31 -10
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +32 -11
- package/package.json +2 -2
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/features/ShareButton/Preview.tsx +1 -1
- package/src/app/(main)/chat/@session/features/SessionListContent/List/Item/index.tsx +1 -1
- package/src/app/(main)/settings/llm/ProviderList/Azure/index.tsx +1 -14
- package/src/app/(main)/settings/llm/ProviderList/Bedrock/index.tsx +1 -10
- package/src/app/(main)/settings/llm/ProviderList/Ollama/index.tsx +0 -2
- package/src/app/(main)/settings/llm/ProviderList/OpenAI/index.tsx +0 -3
- package/src/app/(main)/settings/llm/ProviderList/providers.tsx +28 -174
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +17 -17
- package/src/app/(main)/settings/llm/components/ProviderModelList/CustomModelOption.tsx +1 -1
- package/src/app/(main)/settings/llm/components/ProviderModelList/Option.tsx +1 -1
- package/src/app/(main)/settings/tts/features/{const.ts → const.tsx} +6 -3
- package/src/components/ModelSelect/index.tsx +15 -5
- package/src/const/url.ts +1 -0
- package/src/features/AgentSetting/AgentTTS/options.tsx +19 -0
- package/src/features/Conversation/Extras/Assistant.tsx +1 -1
- package/src/components/ModelIcon/index.tsx +0 -114
- package/src/components/ModelProviderIcon/index.tsx +0 -148
- package/src/components/ModelTag/ModelIcon.tsx +0 -105
- package/src/components/ModelTag/index.tsx +0 -13
- package/src/features/AgentSetting/AgentTTS/options.ts +0 -16
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Ai360,
|
|
3
|
-
AiMass,
|
|
4
|
-
Anthropic,
|
|
5
|
-
Azure,
|
|
6
|
-
Baichuan,
|
|
7
|
-
Bedrock,
|
|
8
|
-
DeepSeek,
|
|
9
|
-
Google,
|
|
10
|
-
Groq,
|
|
11
|
-
LobeHub,
|
|
12
|
-
Minimax,
|
|
13
|
-
Mistral,
|
|
14
|
-
Moonshot,
|
|
15
|
-
Novita,
|
|
16
|
-
Ollama,
|
|
17
|
-
OpenAI,
|
|
18
|
-
OpenRouter,
|
|
19
|
-
Perplexity,
|
|
20
|
-
SiliconCloud,
|
|
21
|
-
Stepfun,
|
|
22
|
-
Together,
|
|
23
|
-
Tongyi,
|
|
24
|
-
ZeroOne,
|
|
25
|
-
Zhipu,
|
|
26
|
-
} from '@lobehub/icons';
|
|
27
|
-
import { memo } from 'react';
|
|
28
|
-
import { Center } from 'react-layout-kit';
|
|
29
|
-
|
|
30
|
-
import { ModelProvider } from '@/libs/agent-runtime';
|
|
31
|
-
|
|
32
|
-
interface ModelProviderIconProps {
|
|
33
|
-
provider?: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const ModelProviderIcon = memo<ModelProviderIconProps>(({ provider }) => {
|
|
37
|
-
switch (provider) {
|
|
38
|
-
case 'lobehub': {
|
|
39
|
-
return <LobeHub.Color size={20} />;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
case ModelProvider.ZhiPu: {
|
|
43
|
-
return <Zhipu size={20} />;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
case ModelProvider.Bedrock: {
|
|
47
|
-
return <Bedrock size={20} />;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
case ModelProvider.DeepSeek: {
|
|
51
|
-
return <DeepSeek size={20} />;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
case ModelProvider.Google: {
|
|
55
|
-
return (
|
|
56
|
-
<Center height={20} width={20}>
|
|
57
|
-
<Google size={14} />
|
|
58
|
-
</Center>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
case ModelProvider.Azure: {
|
|
63
|
-
return (
|
|
64
|
-
<Center height={20} width={20}>
|
|
65
|
-
<Azure size={14} />
|
|
66
|
-
</Center>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
case ModelProvider.Moonshot: {
|
|
71
|
-
return <Moonshot size={20} />;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
case ModelProvider.OpenAI: {
|
|
75
|
-
return <OpenAI size={20} />;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
case ModelProvider.Ollama: {
|
|
79
|
-
return <Ollama size={20} />;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
case ModelProvider.Perplexity: {
|
|
83
|
-
return <Perplexity size={20} />;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
case ModelProvider.Minimax: {
|
|
87
|
-
return <Minimax size={20} />;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
case ModelProvider.Mistral: {
|
|
91
|
-
return <Mistral size={20} />;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
case ModelProvider.Anthropic: {
|
|
95
|
-
return <Anthropic size={20} />;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
case ModelProvider.Groq: {
|
|
99
|
-
return <Groq size={20} />;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
case ModelProvider.OpenRouter: {
|
|
103
|
-
return <OpenRouter size={20} />;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
case ModelProvider.ZeroOne: {
|
|
107
|
-
return <ZeroOne size={20} />;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
case ModelProvider.TogetherAI: {
|
|
111
|
-
return <Together size={20} />;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
case ModelProvider.Qwen: {
|
|
115
|
-
return <Tongyi size={20} />;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
case ModelProvider.Stepfun: {
|
|
119
|
-
return <Stepfun size={20} />;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
case ModelProvider.Novita: {
|
|
123
|
-
return <Novita size={20} />;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
case ModelProvider.Baichuan: {
|
|
127
|
-
return <Baichuan size={20} />;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
case ModelProvider.Taichu: {
|
|
131
|
-
return <AiMass size={20} />;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
case ModelProvider.Ai360: {
|
|
135
|
-
return <Ai360 size={20} />;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
case ModelProvider.SiliconCloud: {
|
|
139
|
-
return <SiliconCloud size={20} />;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
default: {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
export default ModelProviderIcon;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AdobeFirefly,
|
|
3
|
-
Ai21,
|
|
4
|
-
Ai360,
|
|
5
|
-
AiMass,
|
|
6
|
-
Aws,
|
|
7
|
-
Aya,
|
|
8
|
-
Azure,
|
|
9
|
-
Baichuan,
|
|
10
|
-
ByteDance,
|
|
11
|
-
ChatGLM,
|
|
12
|
-
Claude,
|
|
13
|
-
CodeGeeX,
|
|
14
|
-
Cohere,
|
|
15
|
-
Dbrx,
|
|
16
|
-
DeepSeek,
|
|
17
|
-
FishAudio,
|
|
18
|
-
Gemini,
|
|
19
|
-
Gemma,
|
|
20
|
-
Hunyuan,
|
|
21
|
-
LLaVA,
|
|
22
|
-
Meta,
|
|
23
|
-
Minimax,
|
|
24
|
-
Mistral,
|
|
25
|
-
Moonshot,
|
|
26
|
-
OpenAI,
|
|
27
|
-
OpenChat,
|
|
28
|
-
OpenRouter,
|
|
29
|
-
Perplexity,
|
|
30
|
-
Rwkv,
|
|
31
|
-
Spark,
|
|
32
|
-
Stability,
|
|
33
|
-
Stepfun,
|
|
34
|
-
Tongyi,
|
|
35
|
-
Wenxin,
|
|
36
|
-
Yi,
|
|
37
|
-
} from '@lobehub/icons';
|
|
38
|
-
import { memo } from 'react';
|
|
39
|
-
|
|
40
|
-
interface ModelIconProps {
|
|
41
|
-
model?: string;
|
|
42
|
-
size?: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const ModelIcon = memo<ModelIconProps>(({ model: originModel, size = 12 }) => {
|
|
46
|
-
if (!originModel) return;
|
|
47
|
-
|
|
48
|
-
// lower case the origin model so to better match more model id case
|
|
49
|
-
const model = originModel.toLowerCase();
|
|
50
|
-
|
|
51
|
-
// currently supported models, maybe not in its own provider
|
|
52
|
-
if (model.startsWith('gpt')) return <OpenAI size={size} />;
|
|
53
|
-
if (model.startsWith('glm') || model.includes('chatglm')) return <ChatGLM size={size} />;
|
|
54
|
-
if (model.includes('codegeex')) return <CodeGeeX size={size} />;
|
|
55
|
-
if (model.includes('claude')) return <Claude size={size} />;
|
|
56
|
-
if (model.includes('deepseek')) return <DeepSeek size={size} />;
|
|
57
|
-
if (model.includes('titan')) return <Aws size={size} />;
|
|
58
|
-
if (model.includes('llama')) return <Meta size={size} />;
|
|
59
|
-
if (model.includes('llava')) return <LLaVA size={size} />;
|
|
60
|
-
if (model.includes('gemini')) return <Gemini size={size} />;
|
|
61
|
-
if (model.includes('gemma')) return <Gemma.Simple size={size} />;
|
|
62
|
-
if (model.includes('moonshot')) return <Moonshot size={size} />;
|
|
63
|
-
if (model.includes('qwen')) return <Tongyi size={size} />;
|
|
64
|
-
if (model.includes('minmax')) return <Minimax size={size} />;
|
|
65
|
-
if (model.includes('abab')) return <Minimax size={size} />;
|
|
66
|
-
if (model.includes('mistral') || model.includes('mixtral') || model.includes('codestral') || model.includes('mathstral')) return <Mistral size={size} />;
|
|
67
|
-
if (model.includes('pplx') || model.includes('sonar')) return <Perplexity size={size} />;
|
|
68
|
-
if (model.includes('yi-')) return <Yi size={size} />;
|
|
69
|
-
if (model.startsWith('openrouter')) return <OpenRouter size={size} />; // only for Cinematika and Auto
|
|
70
|
-
if (model.startsWith('openchat')) return <OpenChat size={size} />;
|
|
71
|
-
if (model.includes('aya')) return <Aya.Avatar size={size} />;
|
|
72
|
-
if (model.includes('command')) return <Cohere size={size} />;
|
|
73
|
-
if (model.includes('dbrx')) return <Dbrx size={size} />;
|
|
74
|
-
if (model.includes('step')) return <Stepfun size={size} />;
|
|
75
|
-
if (model.includes('taichu')) return <AiMass size={size} />;
|
|
76
|
-
if (model.includes('360gpt')) return <Ai360 size={size} />;
|
|
77
|
-
|
|
78
|
-
// below: To be supported in providers, move up if supported
|
|
79
|
-
if (model.includes('baichuan')) return <Baichuan size={size} />;
|
|
80
|
-
if (model.includes('rwkv')) return <Rwkv size={size} />;
|
|
81
|
-
if (model.includes('ernie')) return <Wenxin size={size} />;
|
|
82
|
-
if (model.includes('spark')) return <Spark size={size} />;
|
|
83
|
-
if (model.includes('hunyuan')) return <Hunyuan size={size} />;
|
|
84
|
-
// ref https://github.com/fishaudio/Bert-VITS2/blob/master/train_ms.py#L702
|
|
85
|
-
if (model.startsWith('d_') || model.startsWith('g_') || model.startsWith('wd_'))
|
|
86
|
-
return <FishAudio size={size} />;
|
|
87
|
-
if (model.includes('skylark')) return <ByteDance size={size} />;
|
|
88
|
-
|
|
89
|
-
if (
|
|
90
|
-
model.includes('stable-diffusion') ||
|
|
91
|
-
model.includes('stable-video') ||
|
|
92
|
-
model.includes('stable-cascade') ||
|
|
93
|
-
model.includes('sdxl') ||
|
|
94
|
-
model.includes('stablelm') ||
|
|
95
|
-
model.startsWith('stable-') ||
|
|
96
|
-
model.startsWith('sd3')
|
|
97
|
-
)
|
|
98
|
-
return <Stability size={size} />;
|
|
99
|
-
|
|
100
|
-
if (model.includes('phi3') || model.includes('phi-3') || model.includes('wizardlm')) return <Azure size={size} />;
|
|
101
|
-
if (model.includes('firefly')) return <AdobeFirefly size={size} />;
|
|
102
|
-
if (model.includes('jamba') || model.includes('j2-')) return <Ai21 size={size} />;
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
export default ModelIcon;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Tag } from '@lobehub/ui';
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
|
|
4
|
-
import ModelIcon from './ModelIcon';
|
|
5
|
-
|
|
6
|
-
interface ModelTagProps {
|
|
7
|
-
model: string;
|
|
8
|
-
}
|
|
9
|
-
const ModelTag = memo<ModelTagProps>(({ model }) => (
|
|
10
|
-
<Tag icon={<ModelIcon model={model} />}>{model}</Tag>
|
|
11
|
-
));
|
|
12
|
-
|
|
13
|
-
export default ModelTag;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SelectProps } from 'antd';
|
|
2
|
-
|
|
3
|
-
export const ttsOptions: SelectProps['options'] = [
|
|
4
|
-
{
|
|
5
|
-
label: 'OpenAI',
|
|
6
|
-
value: 'openai',
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
label: 'Edge Speech',
|
|
10
|
-
value: 'edge',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: 'Microsoft Speech',
|
|
14
|
-
value: 'microsoft',
|
|
15
|
-
},
|
|
16
|
-
];
|