@lobehub/chat 0.139.1 → 0.139.2

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 (84) hide show
  1. package/.github/workflows/release.yml +2 -0
  2. package/.github/workflows/test.yml +3 -1
  3. package/CHANGELOG.md +33 -0
  4. package/README.md +8 -8
  5. package/README.zh-CN.md +16 -17
  6. package/docs/self-hosting/advanced/analytics.mdx +0 -2
  7. package/docs/self-hosting/advanced/analytics.zh-CN.mdx +0 -2
  8. package/docs/self-hosting/advanced/authentication.mdx +4 -4
  9. package/docs/self-hosting/advanced/authentication.zh-CN.mdx +4 -4
  10. package/docs/self-hosting/advanced/sso-providers/auth0.mdx +11 -11
  11. package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +11 -11
  12. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +9 -6
  13. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +34 -34
  14. package/docs/self-hosting/advanced/upstream-sync.mdx +5 -3
  15. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +5 -3
  16. package/docs/self-hosting/environment-variables/basic.mdx +0 -2
  17. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +0 -2
  18. package/docs/self-hosting/environment-variables.mdx +0 -2
  19. package/docs/self-hosting/environment-variables.zh-CN.mdx +3 -4
  20. package/docs/self-hosting/examples/azure-openai.mdx +2 -4
  21. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +2 -4
  22. package/docs/self-hosting/platform/docker-compose.mdx +7 -3
  23. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +7 -3
  24. package/docs/self-hosting/platform/docker.mdx +9 -5
  25. package/docs/self-hosting/platform/docker.zh-CN.mdx +9 -5
  26. package/docs/self-hosting/platform/netlify.mdx +12 -14
  27. package/docs/self-hosting/platform/netlify.zh-CN.mdx +12 -14
  28. package/docs/self-hosting/platform/repocloud.mdx +0 -2
  29. package/docs/self-hosting/platform/repocloud.zh-CN.mdx +0 -2
  30. package/docs/self-hosting/platform/sealos.mdx +0 -2
  31. package/docs/self-hosting/platform/sealos.zh-CN.mdx +0 -2
  32. package/docs/self-hosting/platform/vercel.mdx +0 -2
  33. package/docs/self-hosting/platform/vercel.zh-CN.mdx +0 -2
  34. package/docs/self-hosting/platform/zeabur.mdx +0 -2
  35. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +0 -2
  36. package/docs/usage/agents/concepts.mdx +5 -5
  37. package/docs/usage/agents/concepts.zh-CN.mdx +2 -2
  38. package/docs/usage/agents/custom-agent.mdx +13 -8
  39. package/docs/usage/agents/custom-agent.zh-CN.mdx +12 -6
  40. package/docs/usage/agents/model.mdx +2 -4
  41. package/docs/usage/agents/model.zh-CN.mdx +2 -4
  42. package/docs/usage/agents/prompt.mdx +2 -4
  43. package/docs/usage/agents/prompt.zh-CN.mdx +2 -4
  44. package/docs/usage/agents/topics.mdx +1 -1
  45. package/docs/usage/agents/topics.zh-CN.mdx +1 -1
  46. package/docs/usage/features/agent-market.mdx +4 -18
  47. package/docs/usage/features/agent-market.zh-CN.mdx +3 -18
  48. package/docs/usage/features/local-llm.mdx +1 -3
  49. package/docs/usage/features/local-llm.zh-CN.mdx +1 -3
  50. package/docs/usage/features/more.mdx +0 -2
  51. package/docs/usage/features/more.zh-CN.mdx +0 -2
  52. package/docs/usage/features/multi-ai-providers.mdx +2 -4
  53. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +2 -4
  54. package/docs/usage/features/plugin-system.mdx +3 -13
  55. package/docs/usage/features/plugin-system.zh-CN.mdx +3 -13
  56. package/docs/usage/features/pwa.mdx +1 -3
  57. package/docs/usage/features/pwa.zh-CN.mdx +1 -3
  58. package/docs/usage/features/text-to-image.mdx +1 -0
  59. package/docs/usage/features/text-to-image.zh-CN.mdx +1 -0
  60. package/docs/usage/features/theme.mdx +2 -4
  61. package/docs/usage/features/theme.zh-CN.mdx +2 -4
  62. package/docs/usage/features/tts.mdx +7 -2
  63. package/docs/usage/features/tts.zh-CN.mdx +7 -4
  64. package/docs/usage/features/vision.mdx +1 -0
  65. package/docs/usage/features/vision.zh-CN.mdx +1 -0
  66. package/docs/usage/plugins/basic-usage.mdx +6 -6
  67. package/docs/usage/plugins/basic-usage.zh-CN.mdx +6 -6
  68. package/docs/usage/plugins/custom-plugin.mdx +5 -1
  69. package/docs/usage/plugins/custom-plugin.zh-CN.mdx +5 -1
  70. package/docs/usage/plugins/development.mdx +32 -32
  71. package/docs/usage/plugins/development.zh-CN.mdx +32 -32
  72. package/docs/usage/plugins/store.mdx +3 -3
  73. package/docs/usage/plugins/store.zh-CN.mdx +3 -3
  74. package/docs/usage/providers/ollama/gemma.mdx +3 -5
  75. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +2 -4
  76. package/docs/usage/providers/ollama.mdx +11 -9
  77. package/docs/usage/providers/ollama.zh-CN.mdx +10 -11
  78. package/docs/usage/start.mdx +1 -0
  79. package/docs/usage/start.zh-CN.mdx +1 -0
  80. package/package.json +3 -2
  81. package/src/app/chat/(mobile)/features/ChatInput/index.tsx +1 -0
  82. package/src/features/MobileTabBar/index.tsx +2 -1
  83. package/vercel.json +1 -1
  84. package/.husky/commit-msg +0 -1
@@ -14,56 +14,56 @@ A LobeChat plugin consists of the following components:
14
14
 
15
15
  This section will introduce how to add and use a custom plugin in LobeChat.
16
16
 
17
- ### **`1`** Create and Launch Plugin Project
17
+ <Steps>
18
+ ### Create and Launch Plugin Project
18
19
 
19
- You need to first create a plugin project locally, you can use the template we have prepared [lobe-chat-plugin-template][lobe-chat-plugin-template-url]
20
+ You need to first create a plugin project locally, you can use the template we have prepared [lobe-chat-plugin-template][lobe-chat-plugin-template-url]
20
21
 
21
- ```bash
22
- $ git clone https://github.com/lobehub/chat-plugin-template.git
23
- $ cd chat-plugin-template
24
- $ npm i
25
- $ npm run dev
26
- ```
27
-
28
- When you see `ready started server on 0.0.0.0:3400, url: http://localhost:3400`, it means the plugin service has been successfully launched locally.
22
+ ```bash
23
+ $ git clone https://github.com/lobehub/chat-plugin-template.git
24
+ $ cd chat-plugin-template
25
+ $ npm i
26
+ $ npm run dev
27
+ ```
29
28
 
30
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259526-9ef25272-4312-429b-93bc-a95515727ed3.png)
29
+ When you see `ready started server on 0.0.0.0:3400, url: http://localhost:3400`, it means the plugin service has been successfully launched locally.
31
30
 
32
- ### **`2`** Add Local Plugin in LobeChat Role Settings
31
+ <Image alt="Create and Launch Plugin Project" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259526-9ef25272-4312-429b-93bc-a95515727ed3.png" />
33
32
 
34
- Next, go to LobeChat, create a new assistant, and go to its session settings page:
33
+ ### Add Local Plugin in LobeChat Role Settings
35
34
 
36
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259643-1a9cc34a-76f3-4ccf-928b-129654670efd.png)
35
+ Next, go to LobeChat, create a new assistant, and go to its session settings page:
37
36
 
38
- Click the <kbd>Add</kbd> button on the right of the plugin list to open the custom plugin adding popup:
37
+ <Image alt="Add Local Plugin in LobeChat Role Settings S1" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259643-1a9cc34a-76f3-4ccf-928b-129654670efd.png" />
39
38
 
40
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259748-2ef6a244-39bb-483c-b359-f156ffcbe1a4.png)
39
+ Click the <kbd>Add</kbd> button on the right of the plugin list to open the custom plugin adding popup:
41
40
 
42
- Fill in the **Plugin Description File Url** with `http://localhost:3400/manifest-dev.json`, which is the manifest address of the plugin we started locally.
41
+ <Image alt="Add Local Plugin in LobeChat Role Settings S2" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259748-2ef6a244-39bb-483c-b359-f156ffcbe1a4.png" />
43
42
 
44
- At this point, you should see that the identifier of the plugin has been automatically recognized as `chat-plugin-template`. Next, you need to fill in the remaining form fields (only the title is required), and then click the <kbd>Save</kbd> button to complete the custom plugin addition.
43
+ Fill in the **Plugin Description File Url** with `http://localhost:3400/manifest-dev.json`, which is the manifest address of the plugin we started locally.
45
44
 
46
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259964-59f4906d-ae2e-4ec0-8b43-db36871d0869.png)
45
+ At this point, you should see that the identifier of the plugin has been automatically recognized as `chat-plugin-template`. Next, you need to fill in the remaining form fields (only the title is required), and then click the <kbd>Save</kbd> button to complete the custom plugin addition.
47
46
 
48
- After adding, you can see the newly added plugin in the plugin list. If you need to modify the plugin configuration, you can click the <kbd>Settings</kbd> button on the far right to make changes.
47
+ <Image alt="Add Local Plugin in LobeChat Role Settings S3" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259964-59f4906d-ae2e-4ec0-8b43-db36871d0869.png" />
49
48
 
50
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260093-a0363c74-0b5b-48dd-b103-2db6b4a8262e.png)
49
+ After adding, you can see the newly added plugin in the plugin list. If you need to modify the plugin configuration, you can click the <kbd>Settings</kbd> button on the far right to make changes.
51
50
 
52
- ### **`3`** Test Plugin Function in Session
51
+ <Image alt="Add Local Plugin in LobeChat Role Settings S4" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260093-a0363c74-0b5b-48dd-b103-2db6b4a8262e.png" />
53
52
 
54
- Next, we need to test whether the plugin's function is working properly.
53
+ ### Test Plugin Function in Session
55
54
 
56
- Click the <kbd>Back</kbd> button to return to the session area, and then send a message to the assistant: "What should I wear?" At this point, the assistant will try to ask you about your gender and current mood.
55
+ Next, we need to test whether the plugin's function is working properly.
57
56
 
58
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260291-f0aa0e7c-0ffb-486c-a834-08e73d49896f.png)
57
+ Click the <kbd>Back</kbd> button to return to the session area, and then send a message to the assistant: "What should I wear?" At this point, the assistant will try to ask you about your gender and current mood.
59
58
 
60
- After answering, the assistant will initiate the plugin call, retrieve recommended clothing data from the server based on your gender and mood, and push it to you. Finally, it will provide a text summary based on this information.
59
+ <Image alt="Test Plugin Function in Session S1" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260291-f0aa0e7c-0ffb-486c-a834-08e73d49896f.png" />
61
60
 
62
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260461-c22ae797-2809-464b-96fc-d0c020f4807b.png)
61
+ After answering, the assistant will initiate the plugin call, retrieve recommended clothing data from the server based on your gender and mood, and push it to you. Finally, it will provide a text summary based on this information.
63
62
 
64
- After completing these operations, you have understood the basic process of adding custom plugins and using them in LobeChat.
63
+ <Image alt="Test Plugin Function in Session S2" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260461-c22ae797-2809-464b-96fc-d0c020f4807b.png" />
65
64
 
66
- <br />
65
+ After completing these operations, you have understood the basic process of adding custom plugins and using them in LobeChat.
66
+ </Steps>
67
67
 
68
68
  ## Local Plugin Development
69
69
 
@@ -192,17 +192,17 @@ export default createLobeChatPluginGateway();
192
192
 
193
193
  The custom UI interface for plugins is optional. For example, the official plugin [Web Content Extraction](https://github.com/lobehub/chat-plugin-web-crawler) does not have a corresponding user interface.
194
194
 
195
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263241-0e765fdc-3463-4c36-a398-aef177a30df9.png)
195
+ <Image alt="Plugin UI Interface S1" height={483} src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263241-0e765fdc-3463-4c36-a398-aef177a30df9.png" />
196
196
 
197
197
  If you want to display richer information in plugin messages or include some interactive operations, you can customize a user interface for the plugin. For example, the following image shows the user interface for the [Search Engine](https://github.com/lobehub/chat-plugin-search-engine) plugin.
198
198
 
199
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263427-9bdc03d5-aa61-4f62-a2ce-88683f3308d8.png)
199
+ <Image alt="Plugin UI Interface S2" height={483} src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263427-9bdc03d5-aa61-4f62-a2ce-88683f3308d8.png" />
200
200
 
201
201
  #### Implementation of Plugin UI Interface
202
202
 
203
203
  LobeChat implements the loading of plugin UI through `iframe` and uses `postMessage` to communicate with the plugin. Therefore, the implementation of the plugin UI is consistent with regular web development. You can use any frontend framework and development language you are familiar with.
204
204
 
205
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263653-4ea87abc-249a-49f3-a241-7ed93ddb1ddf.png)
205
+ <Image alt="Implementation of Plugin UI Interface" height={483} src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263653-4ea87abc-249a-49f3-a241-7ed93ddb1ddf.png" />
206
206
 
207
207
  In the template we provide, we use React + Next.js + [antd](https://ant.design/) as the frontend interface framework. You can find the implementation of the user interface in [`src/pages/index.tsx`](https://github.com/lobehub/chat-plugin-template/blob/main/src/pages/index.tsx).
208
208
 
@@ -14,56 +14,56 @@
14
14
 
15
15
  本节将会介绍如何在 LobeChat 中添加和使用一个自定义插件。
16
16
 
17
- ### **`1`** 创建并启动插件项目
17
+ <Steps>
18
+ ### 创建并启动插件项目
18
19
 
19
- 你需要先在本地创建一个插件项目,可以使用我们准备好的模板 [lobe-chat-plugin-template][lobe-chat-plugin-template-url]
20
+ 你需要先在本地创建一个插件项目,可以使用我们准备好的模板 [lobe-chat-plugin-template][lobe-chat-plugin-template-url]
20
21
 
21
- ```bash
22
- $ git clone https://github.com/lobehub/chat-plugin-template.git
23
- $ cd chat-plugin-template
24
- $ npm i
25
- $ npm run dev
26
- ```
27
-
28
- 当出现`ready started server on 0.0.0.0:3400, url: http://localhost:3400` 时,说明插件服务已经在本地启动成功。
22
+ ```bash
23
+ $ git clone https://github.com/lobehub/chat-plugin-template.git
24
+ $ cd chat-plugin-template
25
+ $ npm i
26
+ $ npm run dev
27
+ ```
29
28
 
30
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259526-9ef25272-4312-429b-93bc-a95515727ed3.png)
29
+ 当出现`ready started server on 0.0.0.0:3400, url: http://localhost:3400` 时,说明插件服务已经在本地启动成功。
31
30
 
32
- ### **`2`** LobeChat 角色设置中添加本地插件
31
+ <Image alt="创建并启动插件项目" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259526-9ef25272-4312-429b-93bc-a95515727ed3.png" />
33
32
 
34
- 接下来进入到 LobeChat 中,创建一个新的助手,并进入它的会话设置页:
33
+ ### LobeChat 角色设置中添加本地插件
35
34
 
36
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259643-1a9cc34a-76f3-4ccf-928b-129654670efd.png)
35
+ 接下来进入到 LobeChat 中,创建一个新的助手,并进入它的会话设置页:
37
36
 
38
- 点击插件列表右侧的 <kbd>添加</kbd> 按钮,打开自定义插件添加弹窗:
37
+ <Image alt="在 LobeChat 角色设置中添加本地插件 S1" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259643-1a9cc34a-76f3-4ccf-928b-129654670efd.png" />
39
38
 
40
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259748-2ef6a244-39bb-483c-b359-f156ffcbe1a4.png)
39
+ 点击插件列表右侧的 <kbd>添加</kbd> 按钮,打开自定义插件添加弹窗:
41
40
 
42
- **插件描述文件 Url** 地址 中填入 `http://localhost:3400/manifest-dev.json` ,这是我们本地启动的插件描述清单地址。
41
+ <Image alt="LobeChat 角色设置中添加本地插件 S2" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259748-2ef6a244-39bb-483c-b359-f156ffcbe1a4.png" />
43
42
 
44
- 此时,你应该可以看到看到插件的标识符一栏已经被自动识别为 `chat-plugin-template`。接下来你需要填写剩下的表单字段(只有标题必填),然后点击 <kbd>保存</kbd> 按钮,即可完成自定义插件添加。
43
+ **插件描述文件 Url** 地址 中填入 `http://localhost:3400/manifest-dev.json` ,这是我们本地启动的插件描述清单地址。
45
44
 
46
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259964-59f4906d-ae2e-4ec0-8b43-db36871d0869.png)
45
+ 此时,你应该可以看到看到插件的标识符一栏已经被自动识别为 `chat-plugin-template`。接下来你需要填写剩下的表单字段(只有标题必填),然后点击 <kbd>保存</kbd> 按钮,即可完成自定义插件添加。
47
46
 
48
- 完成添加后,在插件列表中就能看到刚刚添加的插件,如果需要修改插件的配置,可以点击最右侧的 <kbd>设置</kbd> 按钮进行修改。
47
+ <Image alt="在 LobeChat 角色设置中添加本地插件 S3" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259964-59f4906d-ae2e-4ec0-8b43-db36871d0869.png" />
49
48
 
50
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260093-a0363c74-0b5b-48dd-b103-2db6b4a8262e.png)
49
+ 完成添加后,在插件列表中就能看到刚刚添加的插件,如果需要修改插件的配置,可以点击最右侧的 <kbd>设置</kbd> 按钮进行修改。
51
50
 
52
- ### **`3`** 会话测试插件功能
51
+ <Image alt="在 LobeChat 角色设置中添加本地插件 S4" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260093-a0363c74-0b5b-48dd-b103-2db6b4a8262e.png" />
53
52
 
54
- 接来下我们需要测试这个插件的功能是否正常。
53
+ ### 会话测试插件功能
55
54
 
56
- 点击 <kbd>返回</kbd> 按钮回到会话区,然后向助手发送消息:「我应该穿什么? 」此时助手将会尝试向你询问,了解你的性别与当前的心情。
55
+ 接来下我们需要测试这个插件的功能是否正常。
57
56
 
58
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260291-f0aa0e7c-0ffb-486c-a834-08e73d49896f.png)
57
+ 点击 <kbd>返回</kbd> 按钮回到会话区,然后向助手发送消息:「我应该穿什么? 」此时助手将会尝试向你询问,了解你的性别与当前的心情。
59
58
 
60
- 当回答完毕后,助手将会发起插件的调用,根据你的性别、心情,从服务端获取推荐的衣服数据,并推送给你。最后基于这些信息做一轮文本总结。
59
+ <Image alt="会话测试插件功能 S1" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260291-f0aa0e7c-0ffb-486c-a834-08e73d49896f.png" />
61
60
 
62
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260461-c22ae797-2809-464b-96fc-d0c020f4807b.png)
61
+ 当回答完毕后,助手将会发起插件的调用,根据你的性别、心情,从服务端获取推荐的衣服数据,并推送给你。最后基于这些信息做一轮文本总结。
63
62
 
64
- 当完成这些操作后,你已经了解了添加自定义插件,并在 LobeChat 中使用的基础流程。
63
+ <Image alt="会话测试插件功能 S2" height={483} inStep src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260461-c22ae797-2809-464b-96fc-d0c020f4807b.png" />
65
64
 
66
- <br />
65
+ 当完成这些操作后,你已经了解了添加自定义插件,并在 LobeChat 中使用的基础流程。
66
+ </Steps>
67
67
 
68
68
  ## 本地插件开发
69
69
 
@@ -192,17 +192,17 @@ export default createLobeChatPluginGateway();
192
192
 
193
193
  自定义插件的 UI 界面是一个可选项。例如 官方插件 [「🧩 / 🕸 网页内容提取」](https://github.com/lobehub/chat-plugin-web-crawler),没有实现相应的用户界面。
194
194
 
195
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263241-0e765fdc-3463-4c36-a398-aef177a30df9.png)
195
+ <Image alt="插件 UI 界面 S1" height={483} src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263241-0e765fdc-3463-4c36-a398-aef177a30df9.png" />
196
196
 
197
197
  如果你希望在插件消息中展示更加丰富的信息,或者包含一些富交互操作,你可以为插件定制一个用户界面。例如下图则为[「搜索引擎」](https://github.com/lobehub/chat-plugin-search-engine)插件的用户界面。
198
198
 
199
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263427-9bdc03d5-aa61-4f62-a2ce-88683f3308d8.png)
199
+ <Image alt="插件 UI 界面 S2" height={483} src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263427-9bdc03d5-aa61-4f62-a2ce-88683f3308d8.png" />
200
200
 
201
201
  #### 插件 UI 界面实现
202
202
 
203
203
  LobeChat 通过 `iframe` 实现插件 ui 的加载,使用 `postMessage` 实现主体与插件的通信。因此, 插件 UI 的实现方式与普通的网页开发一致,你可以使用任何你熟悉的前端框架与开发语言。
204
204
 
205
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263653-4ea87abc-249a-49f3-a241-7ed93ddb1ddf.png)
205
+ <Image alt="插件 UI 界面实现" height={483} src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265263653-4ea87abc-249a-49f3-a241-7ed93ddb1ddf.png" />
206
206
 
207
207
  在我们提供的模板中使用了 React + Next.js + [antd](https://ant.design/) 作为前端界面框架,你可以在 [`src/pages/index.tsx`](https://github.com/lobehub/chat-plugin-template/blob/main/src/pages/index.tsx) 中找到用户界面的实现。
208
208
 
@@ -1,9 +1,9 @@
1
1
  # Plugin Store
2
2
 
3
- You can access the plugin store by going to "Extension Tools" -> "Plugin Store" in the session toolbar.
3
+ You can access the plugin store by going to `Extension Tools` -> `Plugin Store` in the session toolbar.
4
4
 
5
- ![](https://github.com/lobehub/lobe-chat/assets/28616219/ab4e60d0-1293-49ac-8798-cb29b3b789e6)
5
+ <Image alt="Plugin Store S1" height={472} src="https://github.com/lobehub/lobe-chat/assets/28616219/ab4e60d0-1293-49ac-8798-cb29b3b789e6" />
6
6
 
7
7
  In the plugin store, you can directly install and use plugins in LobeChat.
8
8
 
9
- ![](https://github.com/lobehub/lobe-chat/assets/28616219/d7a5d821-116f-4be6-8a1a-38d81a5ea0ea)
9
+ <Image alt="Plugin Store S2" height={472} src="https://github.com/lobehub/lobe-chat/assets/28616219/d7a5d821-116f-4be6-8a1a-38d81a5ea0ea" />
@@ -1,9 +1,9 @@
1
1
  # 插件商店
2
2
 
3
- 你可以在会话工具条中的 「扩展工具」 -> 「插件商店」,进入插件商店。
3
+ 你可以在会话工具条中的 `扩展工具` -> `插件商店`,进入插件商店。
4
4
 
5
- ![](https://github.com/lobehub/lobe-chat/assets/28616219/ab4e60d0-1293-49ac-8798-cb29b3b789e6)
5
+ <Image alt="插件商店 S1" height={472} src="https://github.com/lobehub/lobe-chat/assets/28616219/ab4e60d0-1293-49ac-8798-cb29b3b789e6" />
6
6
 
7
7
  插件商店中会在 LobeChat 中可以直接安装并使用的插件。
8
8
 
9
- ![](https://github.com/lobehub/lobe-chat/assets/28616219/d7a5d821-116f-4be6-8a1a-38d81a5ea0ea)
9
+ <Image alt="插件商店 S2" height={472} src="https://github.com/lobehub/lobe-chat/assets/28616219/d7a5d821-116f-4be6-8a1a-38d81a5ea0ea" />
@@ -3,11 +3,9 @@ title: Using Google Gemma Model
3
3
  image: https://github.com/lobehub/lobe-chat/assets/28616219/817f5655-4f9e-414b-af9f-9ccc5410a06d
4
4
  ---
5
5
 
6
- import { Callout, Steps } from 'nextra/components';
7
-
8
6
  # Using Google Gemma Model
9
7
 
10
- <Image alt={'Using Gemma in LobeChat'} cover rounded src={'https://github.com/lobehub/lobe-chat/assets/28616219/e636cb41-5b7f-4949-a236-1cc1633bd223'} />
8
+ <Image alt={'Using Gemma in LobeChat'} cover src={'https://github.com/lobehub/lobe-chat/assets/28616219/e636cb41-5b7f-4949-a236-1cc1633bd223'} />
11
9
 
12
10
  [Gemma](https://blog.google/technology/developers/gemma-open-models/) is an open-source large language model (LLM) from Google, designed to provide a more general and flexible model for various natural language processing tasks. Now, with the integration of LobeChat and [Ollama](https://ollama.com/), you can easily use Google Gemma in LobeChat.
13
11
 
@@ -26,13 +24,13 @@ This document will guide you on how to use Google Gemma in LobeChat:
26
24
  ollama pull gemma
27
25
  ```
28
26
 
29
- <Image alt={'Pulling Gemma model using Ollama'} height={473} src={'https://github.com/lobehub/lobe-chat/assets/28616219/7049a811-a08b-45d3-8491-970f579c2ebd'} width={791} />
27
+ <Image alt={'Pulling Gemma model using Ollama'} height={473} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/7049a811-a08b-45d3-8491-970f579c2ebd'} width={791} />
30
28
 
31
29
  ### Select Gemma model
32
30
 
33
31
  In the session page, open the model panel and then select the Gemma model.
34
32
 
35
- <Image alt={'Selecting Gemma model in the model selection panel'} bordered height={629} src={'https://github.com/lobehub/lobe-chat/assets/28616219/c91d0c18-a21f-41f6-b5cc-94d29faeb797'} width={791} />
33
+ <Image alt={'Selecting Gemma model in the model selection panel'} height={629} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c91d0c18-a21f-41f6-b5cc-94d29faeb797'} width={791} />
36
34
 
37
35
  <Callout type={'info'}>
38
36
  If you do not see the Ollama provider in the model selection panel, please refer to [Integrating
@@ -3,8 +3,6 @@ title: 使用 Google Gemma 模型
3
3
  image: https://github.com/lobehub/lobe-chat/assets/28616219/817f5655-4f9e-414b-af9f-9ccc5410a06d
4
4
  ---
5
5
 
6
- import { Callout, Steps } from 'nextra/components';
7
-
8
6
  # 使用 Google Gemma 模型
9
7
 
10
8
  <Image alt={'在 LobeChat 中使用 Gemma'} cover rounded src={'https://github.com/lobehub/lobe-chat/assets/28616219/e636cb41-5b7f-4949-a236-1cc1633bd223'} />
@@ -26,13 +24,13 @@ import { Callout, Steps } from 'nextra/components';
26
24
  ollama pull gemma
27
25
  ```
28
26
 
29
- <Image alt={'使用 Ollama 拉取 Gemma 模型'} height={473} src={'https://github.com/lobehub/lobe-chat/assets/28616219/7049a811-a08b-45d3-8491-970f579c2ebd'} width={791} />
27
+ <Image alt={'使用 Ollama 拉取 Gemma 模型'} height={473} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/7049a811-a08b-45d3-8491-970f579c2ebd'} width={791} />
30
28
 
31
29
  ### 选择 Gemma 模型
32
30
 
33
31
  在会话页面中,选择模型面板打开,然后选择 Gemma 模型。
34
32
 
35
- <Image alt={'模型选择面板中选择 Gemma 模型'} bordered height={629} src={'https://github.com/lobehub/lobe-chat/assets/28616219/69414c79-642e-4323-9641-bfa43a74fcc8'} width={791} />
33
+ <Image alt={'模型选择面板中选择 Gemma 模型'} height={629} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/69414c79-642e-4323-9641-bfa43a74fcc8'} width={791} />
36
34
 
37
35
  <Callout type={'info'}>
38
36
  如果你没有在模型选择面板中看到 Ollama 服务商,请查阅 [与 Ollama
@@ -5,7 +5,7 @@ image: https://github.com/lobehub/lobe-chat/assets/28616219/bb5b3611-3aa8-4ec7-a
5
5
 
6
6
  # Using Ollama in LobeChat
7
7
 
8
- <Image alt={'Using Ollama in LobeChat'} cover src={'https://github.com/lobehub/lobe-chat/assets/28616219/a2a091b8-ac45-4679-b5e0-21d711e17fef'} />
8
+ <Image alt={'Using Ollama in LobeChat'} borderless cover src={'https://github.com/lobehub/lobe-chat/assets/28616219/a2a091b8-ac45-4679-b5e0-21d711e17fef'} />
9
9
 
10
10
  Ollama is a powerful framework for running large language models (LLMs) locally, supporting various language models including Llama 2, Mistral, and more. Now, LobeChat supports integration with Ollama, meaning you can easily use the language models provided by Ollama to enhance your application within LobeChat.
11
11
 
@@ -50,19 +50,21 @@ This document will guide you on how to use Ollama in LobeChat:
50
50
  ```
51
51
 
52
52
  Ollama supports various models, and you can view the available model list in the [Ollama Library](https://ollama.com/library) and choose the appropriate model based on your needs.
53
- </Steps>
54
53
 
55
- Next, you can start conversing with the local LLM using LobeChat.
54
+ ### Use LLM in LobeChat
55
+
56
+ Next, you can start conversing with the local LLM using LobeChat.
56
57
 
57
- <Video height={468} src="https://github.com/lobehub/lobe-chat/assets/28616219/063788c8-9fef-4c6b-b837-96668ad6bc41" width={832} />
58
+ <Video height={524} inStep src="https://github.com/lobehub/lobe-chat/assets/28616219/063788c8-9fef-4c6b-b837-96668ad6bc41" />
58
59
 
59
- <Callout type={'info'}>
60
- You can visit [Integrating with Ollama](/en/self-hosting/examples/ollama) to learn how to deploy
61
- LobeChat to meet the integration requirements with Ollama.
62
- </Callout>
60
+ <Callout type={'info'}>
61
+ You can visit [Integrating with Ollama](/en/self-hosting/examples/ollama) to learn how to deploy
62
+ LobeChat to meet the integration requirements with Ollama.
63
+ </Callout>
64
+ </Steps>
63
65
 
64
66
  ## Custom Configuration
65
67
 
66
68
  You can find Ollama's configuration options in `Settings` -> `Language Model`, where you can configure Ollama's proxy, model name, and more.
67
69
 
68
- <Image alt={'Ollama Service Provider Settings'} height={274} src={'https://github.com/lobehub/lobe-chat/assets/28616219/da0db930-78ce-4262-b648-2b9e43c565c3'} width={832} />
70
+ <Image alt={'Ollama Service Provider Settings'} height={274} src={'https://github.com/lobehub/lobe-chat/assets/28616219/da0db930-78ce-4262-b648-2b9e43c565c3'} />
@@ -3,11 +3,9 @@ title: 在 LobeChat 中使用 Ollama
3
3
  image: https://github.com/lobehub/lobe-chat/assets/28616219/bb5b3611-3aa8-4ec7-a6dc-f35a13b34d81
4
4
  ---
5
5
 
6
- import { Callout, Steps, Tabs } from 'nextra/components';
7
-
8
6
  # 在 LobeChat 中使用 Ollama
9
7
 
10
- <Image alt={'在 LobeChat 中使用 Ollama'} cover src={'https://github.com/lobehub/lobe-chat/assets/28616219/a2a091b8-ac45-4679-b5e0-21d711e17fef'} />
8
+ <Image alt={'在 LobeChat 中使用 Ollama'} borderless cover src={'https://github.com/lobehub/lobe-chat/assets/28616219/a2a091b8-ac45-4679-b5e0-21d711e17fef'} />
11
9
 
12
10
  Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支持多种语言模型,包括 Llama 2, Mistral 等。现在,LobeChat 已经支持与 Ollama 的集成,这意味着你可以在 LobeChat 中轻松使用 Ollama 提供的语言模型来增强你的应用。
13
11
 
@@ -51,19 +49,20 @@ Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支
51
49
  ```
52
50
 
53
51
  Ollama 支持多种模型,你可以在 [Ollama Library](https://ollama.com/library) 中查看可用的模型列表,并根据需求选择合适的模型。
54
- </Steps>
55
52
 
56
- 接下来,你就可以使用 LobeChat 与本地 LLM 对话了。
53
+ ### LobeChat 中使用本地模型
57
54
 
58
- <Video height={468} src="https://github.com/lobehub/lobe-chat/assets/28616219/95828c11-0ae5-4dfa-84ed-854124e927a6" width={832} />
55
+ 接下来,你就可以使用 LobeChat 与本地 LLM 对话了。
59
56
 
60
- <Callout type={'info'}>
61
- 你可以前往 [与 Ollama 集成](/zh/self-hosting/examples/ollama) 了解如何部署 LobeChat ,以满足与
62
- Ollama 的集成需求。
63
- </Callout>
57
+ <Video height={524} inStep src="https://github.com/lobehub/lobe-chat/assets/28616219/95828c11-0ae5-4dfa-84ed-854124e927a6" />
58
+
59
+ <Callout type={'info'}>
60
+ 你可以前往 [与 Ollama 集成](/zh/self-hosting/examples/ollama) 了解如何部署 LobeChat ,以满足与 Ollama 的集成需求。
61
+ </Callout>
62
+ </Steps>
64
63
 
65
64
  ## 自定义配置
66
65
 
67
66
  你可以在 `设置` -> `语言模型` 中找到 Ollama 的配置选项,你可以在这里配置 Ollama 的代理、模型名称等。
68
67
 
69
- <Image alt={'Ollama 服务商设置'} height={274} src={'https://github.com/lobehub/lobe-chat/assets/28616219/da0db930-78ce-4262-b648-2b9e43c565c3'} width={832} />
68
+ <Image alt={'Ollama 服务商设置'} height={274} src={'https://github.com/lobehub/lobe-chat/assets/28616219/da0db930-78ce-4262-b648-2b9e43c565c3'} />
@@ -9,6 +9,7 @@ image: https://github.com/lobehub/lobe-chat/assets/28616219/9be1a584-8b66-4bc4-a
9
9
  alt={
10
10
  'Vision Model / TTS & STT / Local LLMs / Multi AI Providers / Agent Market / Plugin System / Personal'
11
11
  }
12
+ borderless
12
13
  height={426}
13
14
  margin={12}
14
15
  src={'https://github.com/lobehub/lobe-chat/assets/28616219/8b04c3c9-3d71-4fb4-bd9b-a4f415c5876d'}
@@ -7,6 +7,7 @@ image: https://github.com/lobehub/lobe-chat/assets/28616219/9be1a584-8b66-4bc4-a
7
7
 
8
8
  <Image
9
9
  alt={'视觉感知 / 语音会话 / 多 AI 服务商 / 本地LLM / 助手市场 / 插件系统 / 私人定制'}
10
+ borderless
10
11
  height={426}
11
12
  margin={12}
12
13
  src={'https://github.com/lobehub/lobe-chat/assets/28616219/8b04c3c9-3d71-4fb4-bd9b-a4f415c5876d'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.139.1",
3
+ "version": "0.139.2",
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",
@@ -90,7 +90,8 @@
90
90
  "@lobehub/chat-plugins-gateway": "latest",
91
91
  "@lobehub/icons": "latest",
92
92
  "@lobehub/tts": "latest",
93
- "@lobehub/ui": "^1.133.3",
93
+ "@lobehub/ui": "^1.135.4",
94
+ "@theguild/remark-mermaid": "^0.0.6",
94
95
  "@vercel/analytics": "^1",
95
96
  "ahooks": "^3",
96
97
  "ai": "^3.0.0",
@@ -23,6 +23,7 @@ const ChatInputMobileLayout = memo(() => {
23
23
  onSend={onSend}
24
24
  placeholder={t('sendPlaceholder')}
25
25
  ref={ref}
26
+ safeArea
26
27
  setExpand={setExpand}
27
28
  style={{
28
29
  background: `linear-gradient(to bottom, ${theme.colorFillQuaternary}, transparent)`,
@@ -56,5 +56,6 @@ export default memo<Props>(({ className, tabBarKey }) => {
56
56
  ],
57
57
  [t],
58
58
  );
59
- return <MobileTabBar activeKey={tabBarKey} className={className} items={items} />;
59
+
60
+ return <MobileTabBar activeKey={tabBarKey} className={className} items={items} safeArea />;
60
61
  });
package/vercel.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "installCommand": "bun install"
2
+ "installCommand": "npx bun@1.0.30 install"
3
3
  }
package/.husky/commit-msg DELETED
@@ -1 +0,0 @@
1
- npx --no -- commitlint --edit ${1}