@lobehub/chat 1.5.5 → 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 CHANGED
@@ -23,7 +23,7 @@ module.exports = defineConfig({
23
23
  'vi-VN',
24
24
  ],
25
25
  temperature: 0,
26
- modelName: 'gpt-3.5-turbo-0125',
26
+ modelName: 'gpt-4o-mini',
27
27
  splitToken: 2048,
28
28
  experimental: {
29
29
  jsonMode: true,
package/.seorc.cjs CHANGED
@@ -2,7 +2,7 @@ const { defineConfig } = require('@lobehub/seo-cli');
2
2
 
3
3
  module.exports = defineConfig({
4
4
  entry: ['./docs/**/*.mdx'],
5
- modelName: 'gpt-3.5-turbo-0125',
5
+ modelName: 'gpt-4o-mini',
6
6
  experimental: {
7
7
  jsonMode: true,
8
8
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
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
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.5.5](https://github.com/lobehub/lobe-chat/compare/v1.5.4...v1.5.5)
6
31
 
7
32
  <sup>Released on **2024-07-19**</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 | Description |
230
- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
231
- | [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` |
232
- | [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` |
233
- | [Space](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **automateyournetwork** on **2024-05-12**</sup> | Space data including NASA.<br/>`space` `nasa` |
234
- | [Search1API](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **fatwang2** on **2024-05-06**</sup> | Search aggregation service, specifically designed for LLMs<br/>`web` `search` |
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>**298**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
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
- | [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **savvytrader** on **2024-06-27**</sup> | 实时股票、加密货币和其他投资数据。<br/>`股票` `分析` |
225
- | [社交搜索](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-06-02**</sup> | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。<br/>`社交` `推特` `x` `搜索` |
226
- | [空间](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **automateyournetwork** on **2024-05-12**</sup> | 包括 NASA 的空间数据。<br/>`空间` `nasa` |
227
- | [Search1API](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **fatwang2** on **2024-05-06**</sup> | 搜索聚合服务,专为 LLMs 设计<br/>`web` `search` |
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>**298**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
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.5.5",
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",
@@ -4,48 +4,40 @@ import { ModelProviderCard } from '@/types/llm';
4
4
  const OpenAI: ModelProviderCard = {
5
5
  chatModels: [
6
6
  {
7
- description: 'GPT 3.5 Turbo,适用于各种文本生成和理解任务',
8
- displayName: 'GPT-3.5 Turbo',
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-3.5-turbo',
12
- tokens: 16_385,
11
+ id: 'gpt-4o-mini',
12
+ maxOutput: 16_385,
13
+ tokens: 128_000,
14
+ vision: true,
13
15
  },
14
16
  {
15
- displayName: 'GPT-3.5 Turbo (0125)',
17
+ description: 'Currently points to gpt-4o-2024-05-13',
18
+ displayName: 'GPT-4o',
19
+ enabled: true,
16
20
  functionCall: true,
17
- id: 'gpt-3.5-turbo-0125',
18
- tokens: 16_385,
21
+ id: 'gpt-4o',
22
+ tokens: 128_000,
23
+ vision: true,
19
24
  },
20
25
  {
21
- displayName: 'GPT-3.5 Turbo (1106)',
26
+ description: 'GPT-4 Turbo with Vision',
27
+ displayName: 'GPT-4 Turbo',
28
+ enabled: true,
22
29
  functionCall: true,
23
- id: 'gpt-3.5-turbo-1106',
24
- tokens: 16_385,
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
- displayName: 'GPT-3.5 Turbo 16K (0613)',
46
- id: 'gpt-3.5-turbo-16k-0613',
47
- legacy: true,
48
- tokens: 16_385,
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-4 Turbo with Vision',
110
- displayName: 'GPT-4 Turbo',
111
- enabled: true,
101
+ description: 'GPT 3.5 Turbo,适用于各种文本生成和理解任务',
102
+ displayName: 'GPT-3.5 Turbo',
112
103
  functionCall: true,
113
- id: 'gpt-4-turbo',
114
- tokens: 128_000,
115
- vision: true,
104
+ id: 'gpt-3.5-turbo',
105
+ tokens: 16_385,
116
106
  },
117
107
  {
118
- description: 'GPT-4 Turbo 视觉版 (240409)',
119
- displayName: 'GPT-4 Turbo Vision (240409)',
108
+ displayName: 'GPT-3.5 Turbo (0125)',
120
109
  functionCall: true,
121
- id: 'gpt-4-turbo-2024-04-09',
122
- tokens: 128_000,
123
- vision: true,
110
+ id: 'gpt-3.5-turbo-0125',
111
+ tokens: 16_385,
124
112
  },
125
113
  {
126
- description: 'Currently points to gpt-4o-2024-05-13',
127
- displayName: 'GPT-4o',
128
- enabled: true,
114
+ displayName: 'GPT-3.5 Turbo (1106)',
129
115
  functionCall: true,
130
- id: 'gpt-4o',
131
- tokens: 128_000,
132
- vision: true,
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-3.5-turbo',
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: 'gpt-3.5-turbo',
25
+ model: DEFAULT_MODEL,
25
26
  params: {
26
27
  frequency_penalty: 0,
27
28
  presence_penalty: 0,
@@ -111,6 +111,6 @@ export const DEFAULT_LLM_CONFIG: UserModelProviderConfig = {
111
111
  },
112
112
  };
113
113
 
114
- export const DEFAULT_MODEL = 'gpt-3.5-turbo';
114
+ export const DEFAULT_MODEL = 'gpt-4o-mini';
115
115
 
116
116
  export const DEFAULT_PROVIDER = ModelProvider.OpenAI;
@@ -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('gpt-3.5-turbo'),
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(),
@@ -5,7 +5,6 @@ exports[`LobeOpenAI > models > should get models 1`] = `
5
5
  {
6
6
  "description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务",
7
7
  "displayName": "GPT-3.5 Turbo",
8
- "enabled": true,
9
8
  "functionCall": true,
10
9
  "id": "gpt-3.5-turbo",
11
10
  "tokens": 16385,
@@ -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": true,
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-3.5-turbo', 'gpt-4-turbo', 'gpt-4o']);
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-3.5-turbo','gpt-4-turbo']
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);
@@ -20,7 +20,7 @@ export interface LobeAgentConfig {
20
20
  fewShots?: FewShots;
21
21
  /**
22
22
  * 角色所使用的语言模型
23
- * @default gpt-3.5-turbo
23
+ * @default gpt-4o-mini
24
24
  */
25
25
  model: string;
26
26
  /**