@lobehub/chat 0.97.1 → 0.98.1
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/README.md +2 -0
- package/locales/en_US/welcome.json +2 -2
- package/package.json +2 -2
- package/src/app/chat/features/SystemRole/index.tsx +6 -4
- package/src/app/welcome/features/Banner/Hero.tsx +18 -5
- package/src/const/llm.ts +3 -6
- package/src/const/modelTokens.ts +6 -2
- package/src/types/llm.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.98.1](https://github.com/lobehub/lobe-chat/compare/v0.98.0...v0.98.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-11-07**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Update welcome assetes.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Update welcome assetes ([8840554](https://github.com/lobehub/lobe-chat/commit/8840554))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 0.98.0](https://github.com/lobehub/lobe-chat/compare/v0.97.1...v0.98.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-11-07**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **misc**: Support latest openai model.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **misc**: Support latest openai model, closes [#417](https://github.com/lobehub/lobe-chat/issues/417) ([46386dc](https://github.com/lobehub/lobe-chat/commit/46386dc))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.97.1](https://github.com/lobehub/lobe-chat/compare/v0.97.0...v0.97.1)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-11-06**</sup>
|
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ LobeChat is an open-source, extensible ([Function Calling][fc-link]) high-perfor
|
|
|
35
35
|
[![][share-reddit-shield]][share-reddit-link]
|
|
36
36
|
[![][share-weibo-shield]][share-weibo-link]
|
|
37
37
|
|
|
38
|
+
<sup>Pioneering the new age of thinking and creating. Built for you, the Super Individual.</sup>
|
|
39
|
+
|
|
38
40
|

|
|
39
41
|
|
|
40
42
|
</div>
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"pickAgent": "Or choose from the following agent templates",
|
|
8
8
|
"skip": "Skip Creation",
|
|
9
9
|
"slogan": {
|
|
10
|
-
"desc1": "
|
|
10
|
+
"desc1": "Pioneering the new age of thinking and creating. Built for you, the Super Individual.",
|
|
11
11
|
"desc2": "Create your first agent and let's get started~",
|
|
12
|
-
"title": "
|
|
12
|
+
"title": "Unlock the superpower of your brain"
|
|
13
13
|
}
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.1",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"modern-screenshot": "^4",
|
|
94
94
|
"nanoid": "^5",
|
|
95
95
|
"next": "^13.5.3",
|
|
96
|
-
"openai": "
|
|
96
|
+
"openai": "~4.15.0",
|
|
97
97
|
"polished": "^4",
|
|
98
98
|
"posthog-js": "^1",
|
|
99
99
|
"query-string": "^8",
|
|
@@ -46,7 +46,7 @@ const SystemRole = memo(() => {
|
|
|
46
46
|
|
|
47
47
|
const handleOpen = () => {
|
|
48
48
|
if (!init) return;
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
setOpen(true);
|
|
51
51
|
};
|
|
52
52
|
|
|
@@ -82,9 +82,11 @@ const SystemRole = memo(() => {
|
|
|
82
82
|
extra: (
|
|
83
83
|
<AgentInfo
|
|
84
84
|
meta={meta}
|
|
85
|
-
onAvatarClick={() =>
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
onAvatarClick={() => {
|
|
86
|
+
setOpen(false);
|
|
87
|
+
setEditing(false);
|
|
88
|
+
router.push(pathString('/chat/settings', { hash: location.hash }));
|
|
89
|
+
}}
|
|
88
90
|
style={{ marginBottom: 16 }}
|
|
89
91
|
/>
|
|
90
92
|
),
|
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
import dynamic from 'next/dynamic';
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { Flexbox } from 'react-layout-kit';
|
|
4
5
|
|
|
5
6
|
import { genSize, useStyles } from './style';
|
|
6
7
|
|
|
7
8
|
const LogoThree = dynamic(() => import('@lobehub/ui/es/LogoThree'));
|
|
9
|
+
const LogoSpline = dynamic(() => import('@lobehub/ui/es/LogoThree/LogoSpline'));
|
|
8
10
|
|
|
9
11
|
const Hero = memo<{ mobile?: boolean; width: number }>(({ width, mobile }) => {
|
|
10
|
-
const size = {
|
|
12
|
+
const size: any = {
|
|
11
13
|
base: genSize(width / 3.5, 240),
|
|
12
14
|
desc: genSize(width / 50, 14),
|
|
13
|
-
logo: genSize(width /
|
|
15
|
+
logo: genSize(width / 2.5, 180),
|
|
14
16
|
title: genSize(width / 20, 32),
|
|
15
17
|
};
|
|
18
|
+
|
|
19
|
+
size.marginTop = mobile ? -size.logo / 9 : -size.logo / 3;
|
|
20
|
+
size.marginBottom = mobile ? -size.logo / 9 : -size.logo / 4;
|
|
21
|
+
|
|
16
22
|
const { styles } = useStyles(size.base);
|
|
17
23
|
|
|
18
24
|
const { t } = useTranslation('welcome');
|
|
19
25
|
|
|
20
26
|
return (
|
|
21
27
|
<>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
<Flexbox
|
|
29
|
+
style={{
|
|
30
|
+
height: size.logo,
|
|
31
|
+
marginBottom: size.marginBottom,
|
|
32
|
+
marginTop: size.marginTop,
|
|
33
|
+
position: 'relative',
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
{mobile ? <LogoThree size={size.logo} /> : <LogoSpline height={'100%'} width={'100%'} />}
|
|
37
|
+
</Flexbox>
|
|
25
38
|
<div className={styles.title} style={{ fontSize: size.title }}>
|
|
26
39
|
<strong style={mobile ? { fontSize: '1.2em' } : {}}>LobeChat</strong>
|
|
27
40
|
{mobile ? <br /> : ' '}
|
package/src/const/llm.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LanguageModel } from '@/types/llm';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* A white list of language models that are allowed to display and be used in the app.
|
|
3
5
|
*/
|
|
@@ -9,9 +11,4 @@ export const LanguageModelWhiteList = [
|
|
|
9
11
|
'gpt-4-32k',
|
|
10
12
|
];
|
|
11
13
|
|
|
12
|
-
export const DEFAULT_OPENAI_MODEL_LIST =
|
|
13
|
-
'gpt-3.5-turbo',
|
|
14
|
-
'gpt-3.5-turbo-16k',
|
|
15
|
-
'gpt-4',
|
|
16
|
-
'gpt-4-32k',
|
|
17
|
-
];
|
|
14
|
+
export const DEFAULT_OPENAI_MODEL_LIST: string[] = Object.values(LanguageModel);
|
package/src/const/modelTokens.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { LanguageModel } from '@/types/llm';
|
|
2
2
|
|
|
3
|
+
// refs to: https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo
|
|
3
4
|
export const ModelTokens: Record<LanguageModel, number> = {
|
|
4
5
|
[LanguageModel.GPT3_5]: 4096,
|
|
5
|
-
[LanguageModel.
|
|
6
|
+
[LanguageModel.GPT3_5_1106]: 16_385,
|
|
7
|
+
[LanguageModel.GPT3_5_16K]: 16_385,
|
|
6
8
|
[LanguageModel.GPT4]: 8196,
|
|
7
|
-
[LanguageModel.
|
|
9
|
+
[LanguageModel.GPT4_PREVIEW]: 128_000,
|
|
10
|
+
[LanguageModel.GPT4_VISION_PREVIEW]: 128_000,
|
|
11
|
+
[LanguageModel.GPT4_32K]: 32_768,
|
|
8
12
|
};
|
package/src/types/llm.ts
CHANGED
|
@@ -6,12 +6,15 @@ export enum LanguageModel {
|
|
|
6
6
|
* GPT 3.5 Turbo
|
|
7
7
|
*/
|
|
8
8
|
GPT3_5 = 'gpt-3.5-turbo',
|
|
9
|
+
GPT3_5_1106 = 'gpt-3.5-turbo-1106',
|
|
9
10
|
GPT3_5_16K = 'gpt-3.5-turbo-16k',
|
|
10
11
|
/**
|
|
11
12
|
* GPT 4
|
|
12
13
|
*/
|
|
13
14
|
GPT4 = 'gpt-4',
|
|
14
15
|
GPT4_32K = 'gpt-4-32k',
|
|
16
|
+
GPT4_PREVIEW = 'gpt-4-1106-preview',
|
|
17
|
+
GPT4_VISION_PREVIEW = 'gpt-4-vision-preview',
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
// 语言模型的设置参数
|