@lobehub/chat 0.122.6 → 0.122.8

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +14 -14
  3. package/README.zh-CN.md +9 -9
  4. package/docs/Deployment/Docker-Deployment.md +1 -1
  5. package/docs/Deployment/Docker-Deployment.zh-CN.md +1 -1
  6. package/docs/Deployment/Environment-Variable.md +2 -2
  7. package/docs/Deployment/Environment-Variable.zh-CN.md +2 -2
  8. package/locales/ar/market.json +2 -0
  9. package/locales/de-DE/market.json +2 -0
  10. package/locales/en-US/market.json +2 -0
  11. package/locales/es-ES/market.json +2 -0
  12. package/locales/fr-FR/market.json +2 -0
  13. package/locales/it-IT/market.json +2 -0
  14. package/locales/ja-JP/market.json +2 -0
  15. package/locales/ko-KR/market.json +2 -0
  16. package/locales/nl-NL/market.json +2 -0
  17. package/locales/pl-PL/market.json +2 -0
  18. package/locales/pt-BR/market.json +2 -0
  19. package/locales/ru-RU/market.json +2 -0
  20. package/locales/tr-TR/market.json +2 -0
  21. package/locales/vi-VN/market.json +2 -0
  22. package/locales/zh-CN/market.json +2 -0
  23. package/locales/zh-TW/market.json +2 -0
  24. package/package.json +1 -1
  25. package/src/app/market/features/AgentDetailContent/AgentInfo/Header.tsx +13 -1
  26. package/src/app/market/features/AgentDetailContent/AgentInfo/Loading.tsx +1 -0
  27. package/src/database/core/migrations/migrateSettingsToUser/fixtures/input.json +1 -1
  28. package/src/database/core/migrations/migrateSettingsToUser/fixtures/output.json +1 -1
  29. package/src/locales/default/market.ts +2 -0
  30. package/src/store/global/slices/settings/selectors/__snapshots__/modelProvider.test.ts.snap +4 -4
  31. package/src/store/global/slices/settings/selectors/modelProvider.test.ts +4 -4
  32. package/src/store/session/slices/session/action.test.ts +24 -0
  33. package/src/store/session/slices/session/action.ts +8 -9
  34. package/src/types/llm.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.122.8](https://github.com/lobehub/lobe-chat/compare/v0.122.7...v0.122.8)
6
+
7
+ <sup>Released on **2024-02-03**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Allow user to add agent without redirection.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Allow user to add agent without redirection, closes [#1199](https://github.com/lobehub/lobe-chat/issues/1199) ([6577ca1](https://github.com/lobehub/lobe-chat/commit/6577ca1))
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
+
30
+ ### [Version 0.122.7](https://github.com/lobehub/lobe-chat/compare/v0.122.6...v0.122.7)
31
+
32
+ <sup>Released on **2024-02-02**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Update the gpt-4-1106-preview model to gpt-4-0125-preview.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Update the gpt-4-1106-preview model to gpt-4-0125-preview, closes [#1210](https://github.com/lobehub/lobe-chat/issues/1210) ([fe623e1](https://github.com/lobehub/lobe-chat/commit/fe623e1))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.122.6](https://github.com/lobehub/lobe-chat/compare/v0.122.5...v0.122.6)
6
56
 
7
57
  <sup>Released on **2024-01-31**</sup>
package/README.md CHANGED
@@ -186,14 +186,14 @@ e-commerce platform data access, and various third-party services.
186
186
 
187
187
  <!-- PLUGIN LIST -->
188
188
 
189
- | Recent Submits | Description |
190
- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
191
- | [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | Get realtime crypto price, BTC, ETH, BNB, and the latest insights.The latest coin news and airdrop opportunities.<br/>`crypto` `btc` `eth` `bnb` |
192
- | [Bilibili](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Dive into Bilibili's vast content with features like keyword video search, replay access, interactive danmaku, trending video recommendations, and hot-search insights, all at your fingertips.<br/>`video` `bilibili` `search` |
193
- | [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Obtain game information and user reviews from Steam.<br/>`steam` `game` |
194
- | [Current Time Assistant](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-01-26**</sup> | A plugin to provide current time information<br/>`time` |
189
+ | Recent Submits | Description |
190
+ | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
191
+ | [Social Search](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-02-02**</sup> | The Social Search provides access to tweets, users, followers, images, media and more.<br/>`social` `twitter` `x` `search` |
192
+ | [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | Get realtime crypto price, BTC, ETH, BNB, and the latest insights.The latest coin news and airdrop opportunities.<br/>`crypto` `btc` `eth` `bnb` |
193
+ | [Bilibili](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Dive into Bilibili's vast content with features like keyword video search, replay access, interactive danmaku, trending video recommendations, and hot-search insights, all at your fingertips.<br/>`video` `bilibili` `search` |
194
+ | [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Obtain game information and user reviews from Steam.<br/>`steam` `game` |
195
195
 
196
- > 📊 Total plugins: [<kbd>**60**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
196
+ > 📊 Total plugins: [<kbd>**61**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
197
197
 
198
198
  <!-- PLUGIN LIST -->
199
199
 
@@ -225,14 +225,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
225
225
 
226
226
  <!-- AGENT LIST -->
227
227
 
228
- | Recent Submits | Description |
229
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
230
- | [SagePathfinder](https://chat-preview.lobehub.com/market?agent=sage-pathfinder)<br/><sup>By **[Ajasra](https://github.com/Ajasra)** on **2024-01-31**</sup> | Expert in personal growth coaching with a focus on stoicism, deep reflection, and strategic questioning.<br/>`personal-growth` `coaching` `reflection` `goal-setting` `well-being` |
231
- | [English Proficiency Coach](https://chat-preview.lobehub.com/market?agent=english-c-2-level)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | C2 Level English Conversation Partner<br/>`english-proficiency` `conversation-partner` `language-coaching` |
232
- | [Entrepreneurship and Competitiveness Expert](https://chat-preview.lobehub.com/market?agent=entrepreneurship-and-competitiveness-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | Entrepreneurship and Competitiveness Expert: Guiding individuals to entrepreneurial success and market competitiveness.<br/>`entrepreneurship` `competitiveness` `consulting` `mentoring` `advising` |
233
- | [Mathematical Research Advisor](https://chat-preview.lobehub.com/market?agent=mathematical-research-advisor)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | Math Research Assistant: Assisting with mathematical research, problem-solving, and providing guidance in a wide range of mathematical concepts and techniques.<br/>`mathematics` `research` `assistance` `problem-solving` `communication` |
228
+ | Recent Submits | Description |
229
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
230
+ | [SagePathfinder](https://chat-preview.lobehub.com/market?agent=sage-pathfinder)<br/><sup>By **[Ajasra](https://github.com/Ajasra)** on **2024-01-31**</sup> | Expert in personal growth coaching with a focus on stoicism, deep reflection, and strategic questioning.<br/>`personal-growth` `coaching` `reflection` `goal-setting` `well-being` |
231
+ | [Variable Naming Master](https://chat-preview.lobehub.com/market?agent=variable-naming-assistant)<br/><sup>By **[undefinedZNN](https://github.com/undefinedZNN)** on **2024-01-31**</sup> | Master the art of programming variable naming, providing multiple suggestions and explaining their usage scenarios.<br/>`variable-naming` `programming` `suggestions` |
232
+ | [C1 Level English Language Facilitator](https://chat-preview.lobehub.com/market?agent=c-1-level-english)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | English Conversation Partner for C1 Level<br/>`english-conversation` `c-1-level` `language-proficiency` `language-coaching` |
233
+ | [A2 English Conversation Facilitator](https://chat-preview.lobehub.com/market?agent=english-a-2-level)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | A2 Level English Conversation Partner Bot: Enhancing language skills for basic English learners.<br/>`english-conversation` `language-learning` `teaching` |
234
234
 
235
- > 📊 Total agents: [<kbd>**143**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
235
+ > 📊 Total agents: [<kbd>**147**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
236
236
 
237
237
  <!-- AGENT LIST -->
238
238
 
package/README.zh-CN.md CHANGED
@@ -172,12 +172,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
172
172
 
173
173
  | 最近新增 | 插件描述 |
174
174
  | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
175
+ | [社交搜索](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-02-02**</sup> | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。<br/>`社交` `推特` `x` `搜索` |
175
176
  | [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | 获取实时加密货币价格,BTC,ETH,BNB 和最新见解。最新的币新闻和空投机会。<br/>`加密货币` `btc` `eth` `bnb` |
176
177
  | [哔哩哔哩](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 通过关键词视频搜索、回放访问、互动弹幕、热门视频推荐和热搜洞察等功能,深入体验哔哩哔哩丰富的内容,尽在您的指尖。<br/>`视频` `哔哩哔哩` `搜索` |
177
178
  | [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 从 Steam 获取游戏信息和用户评论。<br/>`steam` `game` |
178
- | [当前时间助手](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-01-26**</sup> | 提供当前时间信息的插件<br/>`时间` |
179
179
 
180
- > 📊 Total plugins: [<kbd>**60**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
180
+ > 📊 Total plugins: [<kbd>**61**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
181
181
 
182
182
  <!-- PLUGIN LIST -->
183
183
 
@@ -205,14 +205,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
205
205
 
206
206
  <!-- AGENT LIST -->
207
207
 
208
- | 最近新增 | 助手说明 |
209
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
210
- | [SagePathfinder](https://chat-preview.lobehub.com/market?agent=sage-pathfinder)<br/><sup>By **[Ajasra](https://github.com/Ajasra)** on **2024-01-31**</sup> | 专注于斯多葛主义、深度反思和战略性提问的个人成长教练专家。<br/>`个人成长` `教练` `反思` `目标设定` `幸福感` |
211
- | [英语熟练度教练](https://chat-preview.lobehub.com/market?agent=english-c-2-level)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | C2 级别英语会话伙伴<br/>`英语熟练度` `会话伙伴` `语言辅导` |
212
- | [创业和竞争力专家](https://chat-preview.lobehub.com/market?agent=entrepreneurship-and-competitiveness-expert)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | 创业和竞争力专家:指导个人实现创业成功和市场竞争力。<br/>`创业` `竞争力` `咨询` `指导` `建议` |
213
- | [数学研究顾问](https://chat-preview.lobehub.com/market?agent=mathematical-research-advisor)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | 数学研究助理:协助进行数学研究、解决问题,并在各种数学概念和技术方面提供指导。<br/>`数学` `研究` `协助` `问题解决` `沟通` |
208
+ | 最近新增 | 助手说明 |
209
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
210
+ | [SagePathfinder](https://chat-preview.lobehub.com/market?agent=sage-pathfinder)<br/><sup>By **[Ajasra](https://github.com/Ajasra)** on **2024-01-31**</sup> | 专注于斯多葛主义、深度反思和战略性提问的个人成长教练专家。<br/>`个人成长` `教练` `反思` `目标设定` `幸福感` |
211
+ | [变量命名大师](https://chat-preview.lobehub.com/market?agent=variable-naming-assistant)<br/><sup>By **[undefinedZNN](https://github.com/undefinedZNN)** on **2024-01-31**</sup> | 精通编程变量命名,提供多个建议并解释使用场景。<br/>`变量命名` `编程` `建议` |
212
+ | [C1 Level English Language Facilitator](https://chat-preview.lobehub.com/market?agent=c-1-level-english)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | English Conversation Partner for C1 Level<br/>`english-conversation` `c-1-level` `language-proficiency` `language-coaching` |
213
+ | [A2 英语会话辅导员](https://chat-preview.lobehub.com/market?agent=english-a-2-level)<br/><sup>By **[MYSeaIT](https://github.com/MYSeaIT)** on **2024-01-30**</sup> | A2 级别英语会话伙伴机器人:提升基础英语学习者的语言能力。<br/>`英语会话` `语言学习` `教学` |
214
214
 
215
- > 📊 Total agents: [<kbd>**143**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
215
+ > 📊 Total agents: [<kbd>**147**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
216
216
 
217
217
  <!-- AGENT LIST -->
218
218
 
@@ -81,7 +81,7 @@ First, create a `lobe.env` configuration file with various environment variables
81
81
  OPENAI_API_KEY=sk-xxxx
82
82
  OPENAI_PROXY_URL=https://api-proxy.com/v1
83
83
  ACCESS_CODE=arthals2333
84
- CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-1106-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
84
+ CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
85
85
  ```
86
86
 
87
87
  Then, you can use the following script to automatically update:
@@ -81,7 +81,7 @@ $ docker run -d -p 3210:3210 \
81
81
  OPENAI_API_KEY=sk-xxxx
82
82
  OPENAI_PROXY_URL=https://api-proxy.com/v1
83
83
  ACCESS_CODE=arthals2333
84
- CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-1106-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
84
+ CUSTOM_MODELS=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision
85
85
  ```
86
86
 
87
87
  然后,你可以使用以下脚本来自动更新:
@@ -37,9 +37,9 @@ LobeChat provides additional configuration options during deployment, which can
37
37
  - Type: Optional
38
38
  - Description: Used to control the model list. Use `+` to add a model, `-` to hide a model, and `model_name=display_name` to customize the display name of a model, separated by commas.
39
39
  - Default: `-`
40
- - Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbo`
40
+ - Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
41
41
 
42
- The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name `gpt-4-1106-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled.
42
+ The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled.
43
43
 
44
44
  ## OpenAI
45
45
 
@@ -37,9 +37,9 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
37
37
  - 类型:可选
38
38
  - 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。
39
39
  - 默认值:`-`
40
- - 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbo`
40
+ - 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
41
41
 
42
- 上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-1106-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。
42
+ 上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。
43
43
 
44
44
  ## OpenAI
45
45
 
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "إضافة وكيل",
3
+ "addAgentAndConverse": "إضافة وكيل وبدء المحادثة",
4
+ "addAgentSuccess": "تمت الإضافة بنجاح",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "في نافذة الدردشة، انتقل إلى صفحة إعدادات الوكيل التي ترغب في تقديمها من الزاوية اليمنى العلوية.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Helfer hinzufügen",
3
+ "addAgentAndConverse": "Assistent hinzufügen und Konversation starten",
4
+ "addAgentSuccess": "Erfolgreich hinzugefügt",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Gehen Sie im Chatfenster über das Einstellungssymbol oben rechts zur Seite, auf der Sie die Einstellungen für Ihren Helfer einreichen können.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Add Agent",
3
+ "addAgentAndConverse": "Add Agent and Converse",
4
+ "addAgentSuccess": "Successfully Added",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Enter the settings page you want to submit to the assistant by clicking on the settings icon in the upper right corner of the chat window.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Añadir asistente",
3
+ "addAgentAndConverse": "Agregar agente y conversar",
4
+ "addAgentSuccess": "Agente agregado con éxito",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "En la ventana de chat, accede a la página de configuración del asistente a través del icono de ajustes en la esquina superior derecha.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Ajouter un assistant",
3
+ "addAgentAndConverse": "Ajouter un agent et converser",
4
+ "addAgentSuccess": "Ajout réussi",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Accédez à la page de configuration de l'assistant que vous souhaitez soumettre en cliquant sur l'icône Paramètres en haut à droite de la fenêtre de conversation.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Aggiungi assistente",
3
+ "addAgentAndConverse": "Aggiungi assistente e avvia la conversazione",
4
+ "addAgentSuccess": "Aggiunta riuscita",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Nella finestra di chat, accedi alle impostazioni nell'angolo in alto a destra per accedere alla pagina di configurazione dell'assistente che desideri inviare;",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "エージェントを追加する",
3
+ "addAgentAndConverse": "エージェントを追加して会話する",
4
+ "addAgentSuccess": "追加に成功しました",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "セッションウィンドウで右上隅の設定にアクセスして、アシスタントの設定ページに移動します。",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "보조 프로그램 추가",
3
+ "addAgentAndConverse": "에이전트 추가 및 대화",
4
+ "addAgentSuccess": "추가 성공",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "세션 창에서 오른쪽 상단 설정으로 이동하여 도우미를 제출할 설정 페이지로 이동합니다.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Voeg een assistent toe",
3
+ "addAgentAndConverse": "Voeg een assistent toe en start een gesprek",
4
+ "addAgentSuccess": "Succesvol toegevoegd",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Ga naar de instellingen in de rechterbovenhoek van het chatvenster om naar de pagina te gaan waar je de assistent kunt toevoegen.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Dodaj asystenta",
3
+ "addAgentAndConverse": "Dodaj asystenta i rozpocznij rozmowę",
4
+ "addAgentSuccess": "Dodano pomyślnie",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Przejdź do strony ustawień, klikając prawy górny róg okna rozmowy, aby przejść do strony ustawień asystenta, którego chcesz złożyć.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Adicionar assistente",
3
+ "addAgentAndConverse": "Adicionar assistente e conversar",
4
+ "addAgentSuccess": "Adição bem-sucedida",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Na janela de conversa, acesse a página de configurações que você deseja enviar para o assistente através do ícone no canto superior direito;",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Добавить агента",
3
+ "addAgentAndConverse": "Добавить агента и начать разговор",
4
+ "addAgentSuccess": "Агент успешно добавлен",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Перейдите на страницу настроек, нажав на значок в правом верхнем углу окна сеанса.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Asistan Ekle",
3
+ "addAgentAndConverse": "Asistan Ekle ve Konuşma Başlat",
4
+ "addAgentSuccess": "Ekleme Başarılı",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Sohbet penceresinin sağ üst köşesindeki ayarlar simgesine tıklayarak asistana göndermek istediğiniz ayarlar sayfasına girin.",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "Thêm trợ lý",
3
+ "addAgentAndConverse": "Thêm trợ lý và trò chuyện",
4
+ "addAgentSuccess": "Thêm thành công",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "Trong cửa sổ trò chuyện, nhấp vào cài đặt ở góc trên bên phải để vào trang cài đặt trợ lý bạn muốn gửi;",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "添加助手",
3
+ "addAgentAndConverse": "添加助手并会话",
4
+ "addAgentSuccess": "添加成功",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "在会话窗口中通过右上角设置进入你想提交助手的设置页面;",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "addAgent": "新增助理",
3
+ "addAgentAndConverse": "新增助理並開始對話",
4
+ "addAgentSuccess": "新增成功",
3
5
  "guide": {
4
6
  "func1": {
5
7
  "desc1": "在會話視窗中通過右上角設置進入你想提交助手的設置頁面;",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.122.6",
3
+ "version": "0.122.8",
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",
@@ -1,5 +1,5 @@
1
1
  import { Avatar, Tag } from '@lobehub/ui';
2
- import { Button, Typography } from 'antd';
2
+ import { App, Button, Typography } from 'antd';
3
3
  import { startCase } from 'lodash-es';
4
4
  import { memo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -20,6 +20,7 @@ const Header = memo(() => {
20
20
  const createSession = useSessionStore((s) => s.createSession);
21
21
  const switchSideBar = useGlobalStore((s) => s.switchSideBar);
22
22
  const agentItem = useMarketStore(agentMarketSelectors.currentAgentItem);
23
+ const { message } = App.useApp();
23
24
 
24
25
  const { meta, createAt, author, homepage, config } = agentItem;
25
26
  const { avatar, title, description, tags, backgroundColor } = meta;
@@ -58,6 +59,17 @@ const Header = memo(() => {
58
59
  switchSideBar(SidebarTabKey.Chat);
59
60
  }}
60
61
  type={'primary'}
62
+ >
63
+ {t('addAgentAndConverse')}
64
+ </Button>
65
+ <Button
66
+ block
67
+ onClick={() => {
68
+ if (!agentItem) return;
69
+
70
+ createSession({ config, meta }, false);
71
+ message.success(t('addAgentSuccess'));
72
+ }}
61
73
  >
62
74
  {t('addAgent')}
63
75
  </Button>
@@ -31,6 +31,7 @@ const Loading = memo(() => {
31
31
  }}
32
32
  />
33
33
  <Skeleton.Button active block />
34
+ <Skeleton.Button active block />
34
35
  <Skeleton
35
36
  active
36
37
  className={styles.loading}
@@ -36,7 +36,7 @@
36
36
  "gpt-3.5-turbo-16k",
37
37
  "gpt-4",
38
38
  "gpt-4-32k",
39
- "gpt-4-1106-preview",
39
+ "gpt-4-0125-preview",
40
40
  "gpt-4-vision-preview"
41
41
  ],
42
42
  "customModelName": "+glm-4,+glm-4v",
@@ -39,7 +39,7 @@
39
39
  "gpt-3.5-turbo-16k",
40
40
  "gpt-4",
41
41
  "gpt-4-32k",
42
- "gpt-4-1106-preview",
42
+ "gpt-4-0125-preview",
43
43
  "gpt-4-vision-preview"
44
44
  ],
45
45
  "customModelName": "+glm-4,+glm-4v",
@@ -1,5 +1,7 @@
1
1
  export default {
2
2
  addAgent: '添加助手',
3
+ addAgentAndConverse: '添加助手并会话',
4
+ addAgentSuccess: '添加成功',
3
5
  guide: {
4
6
  func1: {
5
7
  desc1: '在会话窗口中通过右上角设置进入你想提交助手的设置页面;',
@@ -12,7 +12,7 @@ exports[`modelProviderSelectors > CUSTOM_MODELS > custom deletion, addition, and
12
12
  },
13
13
  {
14
14
  "displayName": "gpt-4-32k",
15
- "name": "gpt-4-1106-preview",
15
+ "name": "gpt-4-0125-preview",
16
16
  },
17
17
  ]
18
18
  `;
@@ -45,7 +45,7 @@ exports[`modelProviderSelectors > CUSTOM_MODELS > duplicate naming model 1`] = `
45
45
  },
46
46
  {
47
47
  "displayName": "gpt-4-32k",
48
- "name": "gpt-4-1106-preview",
48
+ "name": "gpt-4-0125-preview",
49
49
  },
50
50
  ]
51
51
  `;
@@ -73,8 +73,8 @@ exports[`modelProviderSelectors > CUSTOM_MODELS > only add the model 1`] = `
73
73
  "name": "gpt-4-32k",
74
74
  },
75
75
  {
76
- "displayName": "gpt-4-1106-preview",
77
- "name": "gpt-4-1106-preview",
76
+ "displayName": "gpt-4-0125-preview",
77
+ "name": "gpt-4-0125-preview",
78
78
  },
79
79
  {
80
80
  "displayName": "gpt-4-vision-preview",
@@ -7,7 +7,7 @@ describe('modelProviderSelectors', () => {
7
7
  const s = {
8
8
  serverConfig: {
9
9
  customModelName:
10
- '-all,+llama,+claude-2,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbo,gpt-4-1106-preview=gpt-4-32k',
10
+ '-all,+llama,+claude-2,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo,gpt-4-0125-preview=gpt-4-32k',
11
11
  },
12
12
  settings: {
13
13
  languageModel: {
@@ -27,7 +27,7 @@ describe('modelProviderSelectors', () => {
27
27
  settings: {
28
28
  languageModel: {
29
29
  openAI: {
30
- customModelName: 'gpt-4-1106-preview=gpt-4-turbo,gpt-4-1106-preview=gpt-4-32k',
30
+ customModelName: 'gpt-4-0125-preview=gpt-4-turbo,gpt-4-0125-preview=gpt-4-32k',
31
31
  },
32
32
  },
33
33
  },
@@ -70,8 +70,8 @@ describe('modelProviderSelectors', () => {
70
70
  name: 'gpt-4-32k',
71
71
  },
72
72
  {
73
- displayName: 'gpt-4-1106-preview',
74
- name: 'gpt-4-1106-preview',
73
+ displayName: 'gpt-4-0125-preview',
74
+ name: 'gpt-4-0125-preview',
75
75
  },
76
76
  {
77
77
  displayName: 'gpt-4-vision-preview',
@@ -76,6 +76,30 @@ describe('SessionAction', () => {
76
76
  SESSION_CHAT_URL(newSessionId, result.current.isMobile),
77
77
  );
78
78
  });
79
+
80
+ it('should create a new session but not switch to it if isSwitchSession is false', async () => {
81
+ const { result } = renderHook(() => useSessionStore());
82
+ const newSessionId = 'new-session-id';
83
+ vi.mocked(sessionService.createNewSession).mockResolvedValue(newSessionId);
84
+
85
+ let createdSessionId;
86
+
87
+ await act(async () => {
88
+ createdSessionId = await result.current.createSession(
89
+ { config: { displayMode: 'docs' } },
90
+ false,
91
+ );
92
+ });
93
+
94
+ const call = vi.mocked(sessionService.createNewSession).mock.calls[0];
95
+ expect(call[0]).toEqual(LobeSessionType.Agent);
96
+ expect(call[1]).toMatchObject({ config: { displayMode: 'docs' } });
97
+
98
+ expect(createdSessionId).toBe(newSessionId);
99
+ expect(mockRouterPush).not.toHaveBeenCalledWith(
100
+ SESSION_CHAT_URL(newSessionId, result.current.isMobile),
101
+ );
102
+ });
79
103
  });
80
104
 
81
105
  describe('duplicateSession', () => {
@@ -10,12 +10,7 @@ import { sessionService } from '@/services/session';
10
10
  import { useGlobalStore } from '@/store/global';
11
11
  import { settingsSelectors } from '@/store/global/selectors';
12
12
  import { SessionStore } from '@/store/session';
13
- import {
14
- ChatSessionList,
15
- LobeAgentSession,
16
- LobeSessionType,
17
- LobeSessions,
18
- } from '@/types/session';
13
+ import { ChatSessionList, LobeAgentSession, LobeSessionType, LobeSessions } from '@/types/session';
19
14
  import { merge } from '@/utils/merge';
20
15
  import { setNamespace } from '@/utils/storeDebug';
21
16
 
@@ -42,7 +37,10 @@ export interface SessionAction {
42
37
  * @param agent
43
38
  * @returns sessionId
44
39
  */
45
- createSession: (session?: DeepPartial<LobeAgentSession>) => Promise<string>;
40
+ createSession: (
41
+ session?: DeepPartial<LobeAgentSession>,
42
+ isSwitchSession?: boolean,
43
+ ) => Promise<string>;
46
44
  duplicateSession: (id: string) => Promise<void>;
47
45
  /**
48
46
  * Pins or unpins a session.
@@ -86,7 +84,7 @@ export const createSessionSlice: StateCreator<
86
84
  get().refreshSessions();
87
85
  },
88
86
 
89
- createSession: async (agent) => {
87
+ createSession: async (agent, isSwitchSession = true) => {
90
88
  const { switchSession, refreshSessions } = get();
91
89
 
92
90
  // 合并 settings 里的 defaultAgent
@@ -100,7 +98,8 @@ export const createSessionSlice: StateCreator<
100
98
  const id = await sessionService.createNewSession(LobeSessionType.Agent, newSession);
101
99
  await refreshSessions();
102
100
 
103
- switchSession(id);
101
+ // 创建后是否跳转到对应会话,默认跳转
102
+ if (isSwitchSession) switchSession(id);
104
103
 
105
104
  return id;
106
105
  },
package/src/types/llm.ts CHANGED
@@ -13,7 +13,7 @@ export enum LanguageModel {
13
13
  */
14
14
  GPT4 = 'gpt-4',
15
15
  GPT4_32K = 'gpt-4-32k',
16
- GPT4_PREVIEW = 'gpt-4-1106-preview',
16
+ GPT4_PREVIEW = 'gpt-4-0125-preview',
17
17
  GPT4_VISION_PREVIEW = 'gpt-4-vision-preview',
18
18
  }
19
19