@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.
- package/CHANGELOG.md +50 -0
- package/README.md +14 -14
- package/README.zh-CN.md +9 -9
- package/docs/Deployment/Docker-Deployment.md +1 -1
- package/docs/Deployment/Docker-Deployment.zh-CN.md +1 -1
- package/docs/Deployment/Environment-Variable.md +2 -2
- package/docs/Deployment/Environment-Variable.zh-CN.md +2 -2
- package/locales/ar/market.json +2 -0
- package/locales/de-DE/market.json +2 -0
- package/locales/en-US/market.json +2 -0
- package/locales/es-ES/market.json +2 -0
- package/locales/fr-FR/market.json +2 -0
- package/locales/it-IT/market.json +2 -0
- package/locales/ja-JP/market.json +2 -0
- package/locales/ko-KR/market.json +2 -0
- package/locales/nl-NL/market.json +2 -0
- package/locales/pl-PL/market.json +2 -0
- package/locales/pt-BR/market.json +2 -0
- package/locales/ru-RU/market.json +2 -0
- package/locales/tr-TR/market.json +2 -0
- package/locales/vi-VN/market.json +2 -0
- package/locales/zh-CN/market.json +2 -0
- package/locales/zh-TW/market.json +2 -0
- package/package.json +1 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/Header.tsx +13 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/Loading.tsx +1 -0
- package/src/database/core/migrations/migrateSettingsToUser/fixtures/input.json +1 -1
- package/src/database/core/migrations/migrateSettingsToUser/fixtures/output.json +1 -1
- package/src/locales/default/market.ts +2 -0
- package/src/store/global/slices/settings/selectors/__snapshots__/modelProvider.test.ts.snap +4 -4
- package/src/store/global/slices/settings/selectors/modelProvider.test.ts +4 -4
- package/src/store/session/slices/session/action.test.ts +24 -0
- package/src/store/session/slices/session/action.ts +8 -9
- 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
|
+
[](#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
|
+
[](#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
|
|
190
|
-
|
|
|
191
|
-
| [
|
|
192
|
-
| [
|
|
193
|
-
| [
|
|
194
|
-
| [
|
|
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>**
|
|
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
|
|
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>
|
|
231
|
-
| [
|
|
232
|
-
| [
|
|
233
|
-
| [
|
|
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>**
|
|
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>**
|
|
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>
|
|
211
|
-
| [
|
|
212
|
-
| [
|
|
213
|
-
| [
|
|
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>**
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
package/locales/ar/market.json
CHANGED
|
@@ -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": "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": "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;",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.122.
|
|
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>
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
77
|
-
"name": "gpt-4-
|
|
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-
|
|
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-
|
|
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-
|
|
74
|
-
name: 'gpt-4-
|
|
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: (
|
|
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
|
-
|
|
101
|
+
// 创建后是否跳转到对应会话,默认跳转
|
|
102
|
+
if (isSwitchSession) switchSession(id);
|
|
104
103
|
|
|
105
104
|
return id;
|
|
106
105
|
},
|