@lobehub/chat 1.35.2 → 1.35.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 +42 -0
- package/changelog/v1.json +14 -0
- package/package.json +1 -1
- package/src/config/__tests__/app.test.ts +2 -2
- package/src/config/app.ts +7 -2
- package/src/config/modelProviders/openai.ts +17 -0
- package/src/server/modules/AssistantStore/index.test.ts +4 -4
- package/src/store/user/slices/modelList/selectors/modelProvider.test.ts +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,48 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.35.4](https://github.com/lobehub/lobe-chat/compare/v1.35.3...v1.35.4)
|
6
|
+
|
7
|
+
<sup>Released on **2024-12-02**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
22
|
+
### [Version 1.35.3](https://github.com/lobehub/lobe-chat/compare/v1.35.2...v1.35.3)
|
23
|
+
|
24
|
+
<sup>Released on **2024-12-01**</sup>
|
25
|
+
|
26
|
+
#### 💄 Styles
|
27
|
+
|
28
|
+
- **misc**: Add gpt-4o-2024-11-20 model.
|
29
|
+
|
30
|
+
<br/>
|
31
|
+
|
32
|
+
<details>
|
33
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
34
|
+
|
35
|
+
#### Styles
|
36
|
+
|
37
|
+
- **misc**: Add gpt-4o-2024-11-20 model, closes [#4855](https://github.com/lobehub/lobe-chat/issues/4855) ([bc3b396](https://github.com/lobehub/lobe-chat/commit/bc3b396))
|
38
|
+
|
39
|
+
</details>
|
40
|
+
|
41
|
+
<div align="right">
|
42
|
+
|
43
|
+
[](#readme-top)
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
5
47
|
### [Version 1.35.2](https://github.com/lobehub/lobe-chat/compare/v1.35.1...v1.35.2)
|
6
48
|
|
7
49
|
<sup>Released on **2024-12-01**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {},
|
4
|
+
"date": "2024-12-02",
|
5
|
+
"version": "1.35.4"
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"children": {
|
9
|
+
"improvements": [
|
10
|
+
"Add gpt-4o-2024-11-20 model."
|
11
|
+
]
|
12
|
+
},
|
13
|
+
"date": "2024-12-01",
|
14
|
+
"version": "1.35.3"
|
15
|
+
},
|
2
16
|
{
|
3
17
|
"children": {
|
4
18
|
"improvements": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.35.
|
3
|
+
"version": "1.35.4",
|
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",
|
@@ -24,7 +24,7 @@ describe('getServerConfig', () => {
|
|
24
24
|
describe('index url', () => {
|
25
25
|
it('should return default URLs when no environment variables are set', () => {
|
26
26
|
const config = getAppConfig();
|
27
|
-
expect(config.AGENTS_INDEX_URL).toBe('https://
|
27
|
+
expect(config.AGENTS_INDEX_URL).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
28
28
|
expect(config.PLUGINS_INDEX_URL).toBe('https://chat-plugins.lobehub.com');
|
29
29
|
});
|
30
30
|
|
@@ -41,7 +41,7 @@ describe('getServerConfig', () => {
|
|
41
41
|
process.env.PLUGINS_INDEX_URL = '';
|
42
42
|
|
43
43
|
const config = getAppConfig();
|
44
|
-
expect(config.AGENTS_INDEX_URL).toBe('https://
|
44
|
+
expect(config.AGENTS_INDEX_URL).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
45
45
|
expect(config.PLUGINS_INDEX_URL).toBe('https://chat-plugins.lobehub.com');
|
46
46
|
});
|
47
47
|
});
|
package/src/config/app.ts
CHANGED
@@ -23,6 +23,11 @@ if (typeof window === 'undefined' && isServerMode && !APP_URL) {
|
|
23
23
|
throw new Error('`APP_URL` is required in server mode');
|
24
24
|
}
|
25
25
|
|
26
|
+
const ASSISTANT_INDEX_URL =
|
27
|
+
'https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public';
|
28
|
+
|
29
|
+
const PLUGINS_INDEX_URL = 'https://chat-plugins.lobehub.com';
|
30
|
+
|
26
31
|
export const getAppConfig = () => {
|
27
32
|
const ACCESS_CODES = process.env.ACCESS_CODE?.split(',').filter(Boolean) || [];
|
28
33
|
|
@@ -60,14 +65,14 @@ export const getAppConfig = () => {
|
|
60
65
|
|
61
66
|
AGENTS_INDEX_URL: !!process.env.AGENTS_INDEX_URL
|
62
67
|
? process.env.AGENTS_INDEX_URL
|
63
|
-
:
|
68
|
+
: ASSISTANT_INDEX_URL,
|
64
69
|
|
65
70
|
DEFAULT_AGENT_CONFIG: process.env.DEFAULT_AGENT_CONFIG || '',
|
66
71
|
SYSTEM_AGENT: process.env.SYSTEM_AGENT,
|
67
72
|
|
68
73
|
PLUGINS_INDEX_URL: !!process.env.PLUGINS_INDEX_URL
|
69
74
|
? process.env.PLUGINS_INDEX_URL
|
70
|
-
:
|
75
|
+
: PLUGINS_INDEX_URL,
|
71
76
|
|
72
77
|
PLUGIN_SETTINGS: process.env.PLUGIN_SETTINGS,
|
73
78
|
|
@@ -46,6 +46,21 @@ const OpenAI: ModelProviderCard = {
|
|
46
46
|
tokens: 128_000,
|
47
47
|
vision: true,
|
48
48
|
},
|
49
|
+
{
|
50
|
+
description:
|
51
|
+
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
|
52
|
+
displayName: 'GPT-4o 1120',
|
53
|
+
enabled: true,
|
54
|
+
functionCall: true,
|
55
|
+
id: 'gpt-4o-2024-11-20',
|
56
|
+
pricing: {
|
57
|
+
input: 2.5,
|
58
|
+
output: 10,
|
59
|
+
},
|
60
|
+
releasedAt: '2024-11-20',
|
61
|
+
tokens: 128_000,
|
62
|
+
vision: true,
|
63
|
+
},
|
49
64
|
{
|
50
65
|
description:
|
51
66
|
'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
|
@@ -70,6 +85,7 @@ const OpenAI: ModelProviderCard = {
|
|
70
85
|
input: 2.5,
|
71
86
|
output: 10,
|
72
87
|
},
|
88
|
+
releasedAt: '2024-08-06',
|
73
89
|
tokens: 128_000,
|
74
90
|
vision: true,
|
75
91
|
},
|
@@ -83,6 +99,7 @@ const OpenAI: ModelProviderCard = {
|
|
83
99
|
input: 5,
|
84
100
|
output: 15,
|
85
101
|
},
|
102
|
+
releasedAt: '2024-05-13',
|
86
103
|
tokens: 128_000,
|
87
104
|
vision: true,
|
88
105
|
},
|
@@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest';
|
|
3
3
|
|
4
4
|
import { AssistantStore } from './index';
|
5
5
|
|
6
|
-
const baseURL = 'https://
|
6
|
+
const baseURL = 'https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public';
|
7
7
|
describe('AssistantStore', () => {
|
8
8
|
it('should return the default index URL when no language is provided', () => {
|
9
9
|
const agentMarket = new AssistantStore();
|
@@ -14,19 +14,19 @@ describe('AssistantStore', () => {
|
|
14
14
|
it('should return the index URL for a not supported language', () => {
|
15
15
|
const agentMarket = new AssistantStore();
|
16
16
|
const url = agentMarket.getAgentIndexUrl('xxx' as any);
|
17
|
-
expect(url).toBe('https://
|
17
|
+
expect(url).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
18
18
|
});
|
19
19
|
|
20
20
|
it('should return the zh-CN URL for zh locale', () => {
|
21
21
|
const agentMarket = new AssistantStore();
|
22
22
|
const url = agentMarket.getAgentIndexUrl('zh' as any);
|
23
|
-
expect(url).toBe('https://
|
23
|
+
expect(url).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public/index.zh-CN.json');
|
24
24
|
});
|
25
25
|
|
26
26
|
it('should return the default URL for en locale', () => {
|
27
27
|
const agentMarket = new AssistantStore();
|
28
28
|
const url = agentMarket.getAgentIndexUrl('en' as any);
|
29
|
-
expect(url).toBe('https://
|
29
|
+
expect(url).toBe('https://registry.npmmirror.com/@lobehub/agents-index/v1/files/public');
|
30
30
|
});
|
31
31
|
|
32
32
|
it('should return the base URL if the provided language is not supported', () => {
|