@lobehub/chat 1.5.4 → 1.6.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.
- package/.i18nrc.js +1 -1
- package/.seorc.cjs +1 -1
- package/CHANGELOG.md +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/package.json +1 -1
- package/src/config/modelProviders/ollama.ts +11 -1
- package/src/config/modelProviders/openai.ts +59 -50
- package/src/const/settings/agent.ts +2 -1
- package/src/const/settings/llm.ts +1 -1
- package/src/database/client/schemas/session.ts +2 -1
- package/src/libs/agent-runtime/openai/__snapshots__/index.test.ts.snap +0 -1
- package/src/libs/agent-runtime/openrouter/__snapshots__/index.test.ts.snap +1 -1
- package/src/locales/default/setting.ts +0 -6
- package/src/store/user/slices/modelList/selectors/modelProvider.test.ts +1 -1
- package/src/store/user/slices/modelList/selectors/modelProvider.ts +1 -1
- package/src/types/agent/index.ts +1 -1
package/.i18nrc.js
CHANGED
package/.seorc.cjs
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 1.6.0](https://github.com/lobehub/lobe-chat/compare/v1.5.5...v1.6.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-07-19**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Add `gpt-4o-mini` in OpenAI Provider and set it as the default model.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Add `gpt-4o-mini` in OpenAI Provider and set it as the default model, closes [#3256](https://github.com/lobehub/lobe-chat/issues/3256) ([a84d807](https://github.com/lobehub/lobe-chat/commit/a84d807))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 1.5.5](https://github.com/lobehub/lobe-chat/compare/v1.5.4...v1.5.5)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-07-19**</sup>
|
|
33
|
+
|
|
34
|
+
#### 💄 Styles
|
|
35
|
+
|
|
36
|
+
- **misc**: Added Gemma2 instead of outdated Gemma.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Styles
|
|
44
|
+
|
|
45
|
+
- **misc**: Added Gemma2 instead of outdated Gemma, closes [#3231](https://github.com/lobehub/lobe-chat/issues/3231) ([03173b7](https://github.com/lobehub/lobe-chat/commit/03173b7))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 1.5.4](https://github.com/lobehub/lobe-chat/compare/v1.5.3...v1.5.4)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-07-17**</sup>
|
package/README.md
CHANGED
|
@@ -226,12 +226,12 @@ In addition, these plugins are not limited to news aggregation, but can also ext
|
|
|
226
226
|
|
|
227
227
|
<!-- PLUGIN LIST -->
|
|
228
228
|
|
|
229
|
-
| Recent Submits
|
|
230
|
-
|
|
|
231
|
-
| [
|
|
232
|
-
| [
|
|
233
|
-
| [
|
|
234
|
-
| [
|
|
229
|
+
| Recent Submits | Description |
|
|
230
|
+
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
231
|
+
| [Shopping tools](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **shoppingtools** on **2024-07-19**</sup> | Search for products on eBay & AliExpress, find eBay events & coupons. Get prompt examples.<br/>`shopping` `e-bay` `ali-express` `coupons` |
|
|
232
|
+
| [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **savvytrader** on **2024-06-27**</sup> | Realtime stock, crypto and other investment data.<br/>`stock` `analyze` |
|
|
233
|
+
| [Social Search](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-06-02**</sup> | The Social Search provides access to tweets, users, followers, images, media and more.<br/>`social` `twitter` `x` `search` |
|
|
234
|
+
| [Space](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **automateyournetwork** on **2024-05-12**</sup> | Space data including NASA.<br/>`space` `nasa` |
|
|
235
235
|
|
|
236
236
|
> 📊 Total plugins: [<kbd>**52**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
237
237
|
|
|
@@ -268,11 +268,11 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
268
268
|
| Recent Submits | Description |
|
|
269
269
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
270
270
|
| [Convert SQL Table Structure to Dao and Mapper](https://chat-preview.lobehub.com/market?agent=my-batis-generator)<br/><sup>By **[MeYoung](https://github.com/MeYoung)** on **2024-07-17**</sup> | Generate entity class and MyBatis Mapper based on a table structure<br/>`sql` `sql` `mybatis` |
|
|
271
|
+
| [Auto Extraction Data](https://chat-preview.lobehub.com/market?agent=the-20-autoextract)<br/><sup>By **[vkhoilq](https://github.com/vkhoilq)** on **2024-07-17**</sup> | The20 Auto Extraction Data<br/>`the-20` `autoextract` |
|
|
271
272
|
| [Foreign Trade High EQ Response](https://chat-preview.lobehub.com/market?agent=reply-agent)<br/><sup>By **[zhushen12580](https://github.com/zhushen12580)** on **2024-07-13**</sup> | My goal is to provide professional responses with high emotional intelligence to help solve various foreign trade-related issues.<br/>`polishing` `high-eq` `response` |
|
|
272
273
|
| [Ducky Programming Assistant](https://chat-preview.lobehub.com/market?agent=rubber-duck-programming)<br/><sup>By **[JiyuShao](https://github.com/JiyuShao)** on **2024-07-10**</sup> | Ducky Programming Assistant<br/>`programming` |
|
|
273
|
-
| [B1 Level German Conversation Partner](https://chat-preview.lobehub.com/market?agent=deutsche-b-1)<br/><sup>By **[tayhe](https://github.com/tayhe)** on **2024-07-08**</sup> | Provides fluent German conversation partners for B1 level learners<br/>`language-exchange` `learning-support` `education` `german-learning` |
|
|
274
274
|
|
|
275
|
-
> 📊 Total agents: [<kbd>**
|
|
275
|
+
> 📊 Total agents: [<kbd>**299**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
276
276
|
|
|
277
277
|
<!-- AGENT LIST -->
|
|
278
278
|
|
package/README.zh-CN.md
CHANGED
|
@@ -219,12 +219,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
219
219
|
|
|
220
220
|
<!-- PLUGIN LIST -->
|
|
221
221
|
|
|
222
|
-
| 最近新增 | 插件描述
|
|
223
|
-
| ---------------------------------------------------------------------------------------------------------------------- |
|
|
224
|
-
| [
|
|
225
|
-
| [
|
|
226
|
-
| [
|
|
227
|
-
| [
|
|
222
|
+
| 最近新增 | 插件描述 |
|
|
223
|
+
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
224
|
+
| [购物工具](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **shoppingtools** on **2024-07-19**</sup> | 在 eBay 和 AliExpress 上搜索产品,查找 eBay 活动和优惠券。获取快速示例。<br/>`购物` `e-bay` `ali-express` `优惠券` |
|
|
225
|
+
| [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **savvytrader** on **2024-06-27**</sup> | 实时股票、加密货币和其他投资数据。<br/>`股票` `分析` |
|
|
226
|
+
| [社交搜索](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-06-02**</sup> | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。<br/>`社交` `推特` `x` `搜索` |
|
|
227
|
+
| [空间](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **automateyournetwork** on **2024-05-12**</sup> | 包括 NASA 的空间数据。<br/>`空间` `nasa` |
|
|
228
228
|
|
|
229
229
|
> 📊 Total plugins: [<kbd>**52**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
230
230
|
|
|
@@ -257,11 +257,11 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
257
257
|
| 最近新增 | 助手说明 |
|
|
258
258
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
259
259
|
| [SQL 表结构转 Dao 和 Mapper](https://chat-preview.lobehub.com/market?agent=my-batis-generator)<br/><sup>By **[MeYoung](https://github.com/MeYoung)** on **2024-07-17**</sup> | 给与一个表结构,生成表的实体和 MyBatis 的 Mapper<br/>`sql` `sql` `mybatis` |
|
|
260
|
+
| [自动提取数据](https://chat-preview.lobehub.com/market?agent=the-20-autoextract)<br/><sup>By **[vkhoilq](https://github.com/vkhoilq)** on **2024-07-17**</sup> | The20 自动提取数据<br/>`the-20` `autoextract` |
|
|
260
261
|
| [外贸高情商回复](https://chat-preview.lobehub.com/market?agent=reply-agent)<br/><sup>By **[zhushen12580](https://github.com/zhushen12580)** on **2024-07-13**</sup> | 我的目标是提供具有高情商的专业回复,帮助解决各种外贸相关的问题。<br/>`润色` `高情商` `回复` |
|
|
261
262
|
| [小黄鸭编程助手](https://chat-preview.lobehub.com/market?agent=rubber-duck-programming)<br/><sup>By **[JiyuShao](https://github.com/JiyuShao)** on **2024-07-10**</sup> | 小黄鸭编程助手<br/>`programming` |
|
|
262
|
-
| [B1 级德语会话伙伴](https://chat-preview.lobehub.com/market?agent=deutsche-b-1)<br/><sup>By **[tayhe](https://github.com/tayhe)** on **2024-07-08**</sup> | 为 B1 级学习者提供流利的德语会话伙伴<br/>`语言交流` `学习支持` `教育` `德语学习` |
|
|
263
263
|
|
|
264
|
-
> 📊 Total agents: [<kbd>**
|
|
264
|
+
> 📊 Total agents: [<kbd>**299**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
265
265
|
|
|
266
266
|
<!-- AGENT LIST -->
|
|
267
267
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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",
|
|
@@ -58,8 +58,18 @@ const Ollama: ModelProviderCard = {
|
|
|
58
58
|
tokens: 131_072, // https://huggingface.co/CohereForAI/c4ai-command-r-plus/blob/main/config.json
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
displayName: '
|
|
61
|
+
displayName: 'Gemma2 9B',
|
|
62
62
|
enabled: true,
|
|
63
|
+
id: 'gemma2',
|
|
64
|
+
tokens: 8192, // https://huggingface.co/blog/zh/gemma2
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Gemma2 27B',
|
|
68
|
+
id: 'gemma2:27b',
|
|
69
|
+
tokens: 8192,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Gemma 7B',
|
|
63
73
|
id: 'gemma',
|
|
64
74
|
tokens: 8192, // https://huggingface.co/google/gemma-7b-it/discussions/73#65e9678c0cda621164a95bad
|
|
65
75
|
},
|
|
@@ -4,48 +4,40 @@ import { ModelProviderCard } from '@/types/llm';
|
|
|
4
4
|
const OpenAI: ModelProviderCard = {
|
|
5
5
|
chatModels: [
|
|
6
6
|
{
|
|
7
|
-
description: '
|
|
8
|
-
displayName: 'GPT-
|
|
7
|
+
description: 'Currently points to gpt-4o-mini-2024-07-18',
|
|
8
|
+
displayName: 'GPT-4o mini',
|
|
9
9
|
enabled: true,
|
|
10
10
|
functionCall: true,
|
|
11
|
-
id: 'gpt-
|
|
12
|
-
|
|
11
|
+
id: 'gpt-4o-mini',
|
|
12
|
+
maxOutput: 16_385,
|
|
13
|
+
tokens: 128_000,
|
|
14
|
+
vision: true,
|
|
13
15
|
},
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
description: 'Currently points to gpt-4o-2024-05-13',
|
|
18
|
+
displayName: 'GPT-4o',
|
|
19
|
+
enabled: true,
|
|
16
20
|
functionCall: true,
|
|
17
|
-
id: 'gpt-
|
|
18
|
-
tokens:
|
|
21
|
+
id: 'gpt-4o',
|
|
22
|
+
tokens: 128_000,
|
|
23
|
+
vision: true,
|
|
19
24
|
},
|
|
20
25
|
{
|
|
21
|
-
|
|
26
|
+
description: 'GPT-4 Turbo with Vision',
|
|
27
|
+
displayName: 'GPT-4 Turbo',
|
|
28
|
+
enabled: true,
|
|
22
29
|
functionCall: true,
|
|
23
|
-
id: 'gpt-
|
|
24
|
-
tokens:
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
displayName: 'GPT-3.5 Turbo Instruct',
|
|
28
|
-
id: 'gpt-3.5-turbo-instruct',
|
|
29
|
-
tokens: 4096,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
description: 'Currently points to gpt-3.5-turbo-16k-0613',
|
|
33
|
-
displayName: 'GPT-3.5 Turbo 16K',
|
|
34
|
-
id: 'gpt-3.5-turbo-16k',
|
|
35
|
-
legacy: true,
|
|
36
|
-
tokens: 16_385,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
displayName: 'GPT-3.5 Turbo (0613)',
|
|
40
|
-
id: 'gpt-3.5-turbo-0613',
|
|
41
|
-
legacy: true,
|
|
42
|
-
tokens: 4096,
|
|
30
|
+
id: 'gpt-4-turbo',
|
|
31
|
+
tokens: 128_000,
|
|
32
|
+
vision: true,
|
|
43
33
|
},
|
|
44
34
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
description: 'GPT-4 Turbo 视觉版 (240409)',
|
|
36
|
+
displayName: 'GPT-4 Turbo Vision (240409)',
|
|
37
|
+
functionCall: true,
|
|
38
|
+
id: 'gpt-4-turbo-2024-04-09',
|
|
39
|
+
tokens: 128_000,
|
|
40
|
+
vision: true,
|
|
49
41
|
},
|
|
50
42
|
{
|
|
51
43
|
description: 'Currently points to gpt-4-0125-preview',
|
|
@@ -106,33 +98,50 @@ const OpenAI: ModelProviderCard = {
|
|
|
106
98
|
tokens: 32_768,
|
|
107
99
|
},
|
|
108
100
|
{
|
|
109
|
-
description: 'GPT
|
|
110
|
-
displayName: 'GPT-
|
|
111
|
-
enabled: true,
|
|
101
|
+
description: 'GPT 3.5 Turbo,适用于各种文本生成和理解任务',
|
|
102
|
+
displayName: 'GPT-3.5 Turbo',
|
|
112
103
|
functionCall: true,
|
|
113
|
-
id: 'gpt-
|
|
114
|
-
tokens:
|
|
115
|
-
vision: true,
|
|
104
|
+
id: 'gpt-3.5-turbo',
|
|
105
|
+
tokens: 16_385,
|
|
116
106
|
},
|
|
117
107
|
{
|
|
118
|
-
|
|
119
|
-
displayName: 'GPT-4 Turbo Vision (240409)',
|
|
108
|
+
displayName: 'GPT-3.5 Turbo (0125)',
|
|
120
109
|
functionCall: true,
|
|
121
|
-
id: 'gpt-
|
|
122
|
-
tokens:
|
|
123
|
-
vision: true,
|
|
110
|
+
id: 'gpt-3.5-turbo-0125',
|
|
111
|
+
tokens: 16_385,
|
|
124
112
|
},
|
|
125
113
|
{
|
|
126
|
-
|
|
127
|
-
displayName: 'GPT-4o',
|
|
128
|
-
enabled: true,
|
|
114
|
+
displayName: 'GPT-3.5 Turbo (1106)',
|
|
129
115
|
functionCall: true,
|
|
130
|
-
id: 'gpt-
|
|
131
|
-
tokens:
|
|
132
|
-
|
|
116
|
+
id: 'gpt-3.5-turbo-1106',
|
|
117
|
+
tokens: 16_385,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
displayName: 'GPT-3.5 Turbo Instruct',
|
|
121
|
+
id: 'gpt-3.5-turbo-instruct',
|
|
122
|
+
tokens: 4096,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
description: 'Currently points to gpt-3.5-turbo-16k-0613',
|
|
126
|
+
displayName: 'GPT-3.5 Turbo 16K',
|
|
127
|
+
id: 'gpt-3.5-turbo-16k',
|
|
128
|
+
legacy: true,
|
|
129
|
+
tokens: 16_385,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
displayName: 'GPT-3.5 Turbo (0613)',
|
|
133
|
+
id: 'gpt-3.5-turbo-0613',
|
|
134
|
+
legacy: true,
|
|
135
|
+
tokens: 4096,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
displayName: 'GPT-3.5 Turbo 16K (0613)',
|
|
139
|
+
id: 'gpt-3.5-turbo-16k-0613',
|
|
140
|
+
legacy: true,
|
|
141
|
+
tokens: 16_385,
|
|
133
142
|
},
|
|
134
143
|
],
|
|
135
|
-
checkModel: 'gpt-
|
|
144
|
+
checkModel: 'gpt-4o-mini',
|
|
136
145
|
enabled: true,
|
|
137
146
|
id: 'openai',
|
|
138
147
|
modelList: { showModelFetcher: true },
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_AGENT_META } from '@/const/meta';
|
|
2
|
+
import { DEFAULT_MODEL } from '@/const/settings/llm';
|
|
2
3
|
import { ModelProvider } from '@/libs/agent-runtime';
|
|
3
4
|
import { LobeAgentChatConfig, LobeAgentConfig, LobeAgentTTSConfig } from '@/types/agent';
|
|
4
5
|
import { UserDefaultAgent } from '@/types/user/settings';
|
|
@@ -21,7 +22,7 @@ export const DEFAULT_AGENT_CHAT_CONFIG: LobeAgentChatConfig = {
|
|
|
21
22
|
|
|
22
23
|
export const DEFAULT_AGENT_CONFIG: LobeAgentConfig = {
|
|
23
24
|
chatConfig: DEFAULT_AGENT_CHAT_CONFIG,
|
|
24
|
-
model:
|
|
25
|
+
model: DEFAULT_MODEL,
|
|
25
26
|
params: {
|
|
26
27
|
frequency_penalty: 0,
|
|
27
28
|
presence_penalty: 0,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
import { DEFAULT_MODEL } from '@/const/settings';
|
|
3
4
|
import { AgentChatConfigSchema } from '@/types/agent';
|
|
4
5
|
import { LobeMetaDataSchema } from '@/types/meta';
|
|
5
6
|
|
|
@@ -26,7 +27,7 @@ const ttsSchema = z.object({
|
|
|
26
27
|
export const AgentSchema = z.object({
|
|
27
28
|
chatConfig: AgentChatConfigSchema,
|
|
28
29
|
fewShots: fewShotsSchema.optional(),
|
|
29
|
-
model: z.string().default(
|
|
30
|
+
model: z.string().default(DEFAULT_MODEL),
|
|
30
31
|
params: z.object({
|
|
31
32
|
frequency_penalty: z.number().default(0).optional(),
|
|
32
33
|
max_tokens: z.number().optional(),
|
|
@@ -33,7 +33,7 @@ This project is led by [qnguyen3](https://twitter.com/stablequan) and [teknium](
|
|
|
33
33
|
|
|
34
34
|
Updated by OpenAI to point to the [latest version of GPT-3.5](/models?q=openai/gpt-3.5). Training data up to Sep 2021.",
|
|
35
35
|
"displayName": "OpenAI: GPT-3.5 Turbo",
|
|
36
|
-
"enabled":
|
|
36
|
+
"enabled": false,
|
|
37
37
|
"functionCall": false,
|
|
38
38
|
"id": "openai/gpt-3.5-turbo",
|
|
39
39
|
"maxTokens": 4096,
|
|
@@ -213,12 +213,6 @@ export default {
|
|
|
213
213
|
},
|
|
214
214
|
model: {
|
|
215
215
|
desc: '{{provider}} 模型',
|
|
216
|
-
list: {
|
|
217
|
-
'gpt-3.5-turbo': 'GPT 3.5',
|
|
218
|
-
'gpt-3.5-turbo-16k': 'GPT 3.5 (16K)',
|
|
219
|
-
'gpt-4': 'GPT 4',
|
|
220
|
-
'gpt-4-32k': 'GPT 4 (32K)',
|
|
221
|
-
},
|
|
222
216
|
title: '模型',
|
|
223
217
|
},
|
|
224
218
|
presencePenalty: {
|
|
@@ -49,7 +49,7 @@ describe('modelProviderSelectors', () => {
|
|
|
49
49
|
const s = merge(initialState, {}) as unknown as UserStore;
|
|
50
50
|
|
|
51
51
|
const result = modelProviderSelectors.getDefaultEnabledModelsById('openai')(s);
|
|
52
|
-
expect(result).toEqual(['gpt-
|
|
52
|
+
expect(result).toEqual(['gpt-4o-mini', 'gpt-4o', 'gpt-4-turbo']);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
it('should return undefined for a non-existing provider', () => {
|
|
@@ -49,7 +49,7 @@ export const getDefaultModeProviderById = (provider: string) => (s: UserStore) =
|
|
|
49
49
|
/**
|
|
50
50
|
* get the default enabled models for a provider
|
|
51
51
|
* it's a default enabled model list by Lobe Chat
|
|
52
|
-
* e.g. openai is ['gpt-
|
|
52
|
+
* e.g. openai is ['gpt-4o-mini','gpt-4o','gpt-4-turbo']
|
|
53
53
|
*/
|
|
54
54
|
const getDefaultEnabledModelsById = (provider: string) => (s: UserStore) => {
|
|
55
55
|
const modelProvider = getDefaultModeProviderById(provider)(s);
|