@lobehub/chat 0.76.2 → 0.77.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.
Files changed (46) hide show
  1. package/.bunfig.toml +3 -0
  2. package/.github/workflows/release.yml +6 -13
  3. package/.github/workflows/sync.yml +1 -1
  4. package/.github/workflows/test.yml +5 -12
  5. package/CHANGELOG.md +25 -0
  6. package/README.md +51 -28
  7. package/README.zh-CN.md +55 -28
  8. package/bun.lockb +0 -0
  9. package/docs/Deploy-with-Azure-OpenAI.md +49 -0
  10. package/docs/{deploy-with-azure-openai.zh-CN.md → Deploy-with-Azure-OpenAI.zh-CN.md} +8 -0
  11. package/docs/Home.md +38 -13
  12. package/docs/{Plugin-Development.en-US.md → Plugin-Development.md} +45 -13
  13. package/docs/Plugin-Development.zh-CN.md +67 -35
  14. package/docs/{Upstream-Sync.en-US.md → Upstream-Sync.md} +4 -3
  15. package/docs/Upstream-Sync.zh-CN.md +4 -3
  16. package/docs/_Sidebar.md +20 -13
  17. package/locales/en_US/common.json +17 -17
  18. package/locales/en_US/market.json +9 -5
  19. package/locales/en_US/setting.json +8 -7
  20. package/locales/en_US/welcome.json +3 -3
  21. package/locales/ru_RU/market.json +6 -2
  22. package/locales/ru_RU/setting.json +2 -1
  23. package/locales/zh_CN/common.json +1 -1
  24. package/locales/zh_CN/empty.json +1 -1
  25. package/locales/zh_CN/error.json +1 -1
  26. package/locales/zh_CN/market.json +6 -2
  27. package/locales/zh_CN/plugin.json +1 -1
  28. package/locales/zh_CN/setting.json +2 -1
  29. package/locales/zh_CN/welcome.json +1 -1
  30. package/package.json +1 -1
  31. package/renovate.json +13 -0
  32. package/src/features/AgentSetting/AgentConfig/index.tsx +2 -10
  33. package/src/locales/default/market.ts +4 -0
  34. package/src/locales/resources/en_US.ts +1 -1
  35. package/src/locales/resources/index.ts +6 -6
  36. package/src/locales/resources/ru_RU.ts +1 -1
  37. package/src/locales/resources/zh_CN.ts +1 -1
  38. package/src/pages/chat/features/Conversation/ChatList/index.tsx +4 -4
  39. package/src/pages/market/features/AgentCard/index.tsx +24 -5
  40. package/src/pages/market/features/AgentCard/style.ts +8 -1
  41. package/src/pages/market/features/SideBar/Mobile.tsx +1 -1
  42. package/src/pages/market/layout.mobile.tsx +3 -0
  43. package/src/pages/market/layout.tsx +4 -0
  44. package/src/pages/settings/index.page.tsx +1 -8
  45. package/vercel.json +2 -2
  46. package/.github/workflows/contributor-help.yml +0 -27
package/.bunfig.toml ADDED
@@ -0,0 +1,3 @@
1
+ [install.lockfile]
2
+
3
+ save = false
@@ -11,27 +11,20 @@ jobs:
11
11
  steps:
12
12
  - uses: actions/checkout@v3
13
13
 
14
- - name: Install pnpm
15
- uses: pnpm/action-setup@v2
16
- with:
17
- version: 8
18
-
19
- - name: Setup Node.js environment
20
- uses: actions/setup-node@v3
21
- with:
22
- node-version: '18'
14
+ - name: Install bun
15
+ uses: oven-sh/setup-bun@v1
23
16
 
24
17
  - name: Install deps
25
- run: pnpm install
18
+ run: bun i
26
19
 
27
20
  - name: Lint
28
- run: pnpm run lint
21
+ run: bun run lint
29
22
 
30
23
  - name: Test
31
- run: pnpm run test
24
+ run: bun run test
32
25
 
33
26
  - name: release
34
- run: pnpm run release
27
+ run: bun run release
35
28
  env:
36
29
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
37
30
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -5,7 +5,7 @@ permissions:
5
5
 
6
6
  on:
7
7
  schedule:
8
- - cron: "0 0 * * *" # every day
8
+ - cron: "0 * * * *" # every hour
9
9
  workflow_dispatch:
10
10
 
11
11
  jobs:
@@ -7,24 +7,17 @@ jobs:
7
7
  steps:
8
8
  - uses: actions/checkout@v3
9
9
 
10
- - name: Install pnpm
11
- uses: pnpm/action-setup@v2
12
- with:
13
- version: 8
14
-
15
- - name: Setup Node.js environment
16
- uses: actions/setup-node@v3
17
- with:
18
- node-version: '18'
10
+ - name: Install bun
11
+ uses: oven-sh/setup-bun@v1
19
12
 
20
13
  - name: Install deps
21
- run: pnpm install
14
+ run: bun i
22
15
 
23
16
  - name: lint
24
- run: pnpm run lint
17
+ run: bun run lint
25
18
 
26
19
  - name: Test and coverage
27
- run: pnpm run test:coverage
20
+ run: bun run test:coverage
28
21
 
29
22
  - name: Upload coverage to Codecov
30
23
  uses: codecov/codecov-action@v3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 0.77.0](https://github.com/lobehub/lobe-chat/compare/v0.76.2...v0.77.0)
6
+
7
+ <sup>Released on **2023-09-14**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: Update localization files and add translations for different languages.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: Update localization files and add translations for different languages ([0157f92](https://github.com/lobehub/lobe-chat/commit/0157f92))
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 0.76.2](https://github.com/lobehub/lobe-chat/compare/v0.76.1...v0.76.2)
6
31
 
7
32
  <sup>Released on **2023-09-11**</sup>
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-performance chatbot framework. <br/> It supports one-click free deployment of your private ChatGPT/LLM web application.
12
12
 
13
- **English** · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
13
+ **English** · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Wiki][wiki-url] · [Report Bug][issues-url] · [Request Feature][issues-url]
14
14
 
15
15
  <!-- SHIELD GROUP -->
16
16
 
@@ -26,7 +26,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
26
26
 
27
27
  [![Deploy with Vercel][deploy-button-image]][deploy-url]
28
28
 
29
- ![](https://gw.alipayobjects.com/zos/kitchen/3uH7fYVvfO/lobechat.webp)
29
+ ![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)
30
30
 
31
31
  </div>
32
32
 
@@ -39,6 +39,8 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
39
39
 
40
40
  - [✨ Features](#-features)
41
41
 
42
+ - [📸 Snapshot](#-snapshot)
43
+
42
44
  - [🛳 Self Hosting](#-self-hosting)
43
45
 
44
46
  - [Keep Updated](#keep-updated)
@@ -90,6 +92,42 @@ Please be aware that LobeChat is currently under active development,feedback i
90
92
 
91
93
  </div>
92
94
 
95
+ ## 📸 Snapshot
96
+
97
+ ![](https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp)
98
+
99
+ **Progress Web App**
100
+
101
+ Utilize the Progressive Web Application ([PWA](https://support.google.com/chrome/answer/9658361)) technology to achieve a seamless LobeChat experience on your computer or mobile device.
102
+
103
+ > **Note**\
104
+ > If you are unfamiliar with the installation process of PWA, you can add LobeChat as your desktop application (also applicable to mobile devices) by following these steps:
105
+ >
106
+ > - Launch the Chrome or Edge browser on your computer
107
+ > - Visit the LobeChat webpage
108
+ > - In the upper right corner of the address bar, click on the <kbd>Install</kbd> icon
109
+ > - Follow the instructions on the screen to complete the PWA installation
110
+
111
+ ![](https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp)
112
+
113
+ **Theme Mode Selection**
114
+
115
+ LobeChat provides two theme modes, light and dark, along with color customization options. By default, the theme follows the system settings, but you can also manually switch in the settings.
116
+
117
+ ![](https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp)
118
+
119
+ **Mobile Device Adaptation**
120
+
121
+ We have designed a series of adaptations for mobile devices to enhance user experience. We are currently iterating the version for mobile experience, and we welcome any suggestions or ideas you might have.
122
+
123
+ > 🚧 Additional snapshots and demonstrations are being progressively added...
124
+
125
+ <div align="right">
126
+
127
+ [![][back-to-top]](#readme-top)
128
+
129
+ </div>
130
+
93
131
  ## 🛳 Self Hosting
94
132
 
95
133
  LobeChat provides a [self-hosted version][deploy-url] with Vercel. This allows you to build your own chatbot within a few minutes, without any prior knowledge. If you want to deploy this service yourself, you can follow these steps:
@@ -112,7 +150,7 @@ LobeChat provides a [self-hosted version][deploy-url] with Vercel. This allows y
112
150
 
113
151
  ### Keep Updated
114
152
 
115
- If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available". This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to accurately detect updates. We suggest you redeploy using the following steps, [Maintaining Updates with LobeChat Self-Deployment](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.en-US).
153
+ If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available". This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to accurately detect updates. We suggest you redeploy using the following steps, [📘 Maintaining Updates with LobeChat Self-Deployment](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync).
116
154
 
117
155
  <div align="right">
118
156
 
@@ -136,10 +174,14 @@ If you have deployed your own project following the one-click deployment steps i
136
174
 
137
175
  ## 🧩 Plugins
138
176
 
139
- Plugins provide a means to extend the [Function Calling][fc-url] capabilities of LobeChat. They can be used to introduce new function calls, and even new ways to render message results.
177
+ Plugins provide a means to extend the [Function Calling][fc-url] capabilities of LobeChat. They can be used to introduce new function calls, and even new ways to render message results. If you are interested in plugin development, please refer to our [📘 Plugin Development Guide](https://github.com/lobehub/lobe-chat/wiki/Plugin-Development) in the Wiki.
140
178
 
141
179
  > **Note**\
142
- > The plugin system is currently undergoing significant development. You can expect to see it in <https://github.com/lobehub/lobe-chat/issues/97>.
180
+ > The plugin system is currently undergoing major development. You can learn more in the following issues:
181
+ >
182
+ > - [x] [**Plugin Phase 1**](https://github.com/lobehub/lobe-chat/issues/73): Implement separation of the plugin from the main body, split the plugin into an independent repository for maintenance, and realize dynamic loading of the plugin.
183
+ > - [x] [**Plugin Phase 2**](https://github.com/lobehub/lobe-chat/issues/97): The security and stability of the plugin's use, more accurately presenting abnormal states, the maintainability of the plugin architecture and developer-friendly.
184
+ > - [ ] [**Plugin Phase 3**](https://github.com/lobehub/lobe-chat/issues/149): Higher-level and more comprehensive customization capabilities, support for plugin authentication and examples.
143
185
 
144
186
  - [@lobehub/lobe-chat-plugins][lobe-chat-plugins]: This is the plugin index for LobeChat. It accesses index.json from this repository to display a list of available plugins for LobeChat to the user.
145
187
  - [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.
@@ -186,27 +228,7 @@ Contributions of all types are more than welcome, if you are interested in contr
186
228
  [![][submit-agents-shield]][submit-agents-url]
187
229
  [![][submit-plugin-shield]][submit-plugin-url]
188
230
 
189
- <!-- CONTRIBUTION GROUP -->
190
-
191
- > 📊 Total: <kbd>**5**</kbd>
192
-
193
- <a href="https://github.com/arvinxx" title="arvinxx">
194
- <img src="https://avatars.githubusercontent.com/u/28616219?v=4" width="50" />
195
- </a>
196
- <a href="https://github.com/canisminor1990" title="canisminor1990">
197
- <img src="https://avatars.githubusercontent.com/u/17870709?v=4" width="50" />
198
- </a>
199
- <a href="https://github.com/apps/dependabot" title="dependabot[bot]">
200
- <img src="https://avatars.githubusercontent.com/in/29110?v=4" width="50" />
201
- </a>
202
- <a href="https://github.com/actions-user" title="actions-user">
203
- <img src="https://avatars.githubusercontent.com/u/65916846?v=4" width="50" />
204
- </a>
205
- <a href="https://github.com/bropines" title="bropines">
206
- <img src="https://avatars.githubusercontent.com/u/57861007?v=4" width="50" />
207
- </a>
208
-
209
- <!-- CONTRIBUTION END -->
231
+ [![][contributors-contrib]][contributors-url]
210
232
 
211
233
  <div align="right">
212
234
 
@@ -228,8 +250,7 @@ Contributions of all types are more than welcome, if you are interested in contr
228
250
 
229
251
  ---
230
252
 
231
- <details>
232
- <summary><h4>📝 License</h4></summary>
253
+ <details><summary><h4>📝 License</h4></summary>
233
254
 
234
255
  [![][fossa-license-shield]][fossa-license-url]
235
256
 
@@ -250,6 +271,7 @@ This project is [MIT](./LICENSE) licensed.
250
271
  [ci-release-url]: https://github.com/lobehub/lobe-chat/actions?query=workflow%3ARelease%20CI
251
272
  [ci-test-shield]: https://github.com/lobehub/lobe-chat/workflows/Test%20CI/badge.svg
252
273
  [ci-test-url]: https://github.com/lobehub/lobe-chat/actions/workflows/test.yml
274
+ [contributors-contrib]: https://contrib.rocks/image?repo=lobehub/lobe-chat
253
275
  [contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-chat.svg?style=flat
254
276
  [contributors-url]: https://github.com/lobehub/lobe-chat/graphs/contributors
255
277
  [deploy-button-image]: https://vercel.com/button
@@ -292,3 +314,4 @@ This project is [MIT](./LICENSE) licensed.
292
314
  [submit-agents-url]: https://github.com/lobehub/lobe-chat-agents
293
315
  [submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
294
316
  [submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
317
+ [wiki-url]: https://github.com/lobehub/lobe-chat/wiki
package/README.zh-CN.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性能聊天机器人框架。<br/> 它支持一键免费部署私人 ChatGPT/LLM 网页应用程序。
12
12
 
13
- [English](./README.md) · **简体中文** · [更新日志](./CHANGELOG.md) · [报告问题][issues-url] · [请求功能][issues-url]
13
+ [English](./README.md) · **简体中文** · [更新日志](./CHANGELOG.md) · [文档][wiki-url] · [报告问题][issues-url] · [请求功能][issues-url]
14
14
 
15
15
  <!-- SHIELD GROUP -->
16
16
 
@@ -26,7 +26,7 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性
26
26
 
27
27
  [![Deploy with Vercel][deploy-button-image]][deploy-url]
28
28
 
29
- ![](https://gw.alipayobjects.com/zos/kitchen/3uH7fYVvfO/lobechat.webp)
29
+ ![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)
30
30
 
31
31
  </div>
32
32
 
@@ -39,6 +39,8 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性
39
39
 
40
40
  - [✨ 功能特性](#-功能特性)
41
41
 
42
+ - [📸 快照预览](#-快照预览)
43
+
42
44
  - [🛳 开箱即用](#-开箱即用)
43
45
 
44
46
  - [保持更新](#保持更新)
@@ -90,6 +92,46 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性
90
92
 
91
93
  </div>
92
94
 
95
+ ## 📸 快照预览
96
+
97
+ ![](https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp)
98
+
99
+ **PWA 渐进式 Web 应用**
100
+
101
+ 利用渐进式 Web 应用 [PWA](https://support.google.com/chrome/answer/9658361) 技术,您可在电脑或移动设备上实现流畅的 LobeChat 体验。
102
+
103
+ > **Note**\
104
+ > 若您未熟悉 PWA 的安装过程,您可以按照以下步骤将 LobeChat 添加为您的桌面应用(也适用于移动设备):
105
+ >
106
+ > - 在电脑上运行 Chrome 或 Edge 浏览器
107
+ > - 访问 LobeChat 网页
108
+ > - 在地址栏的右上角,单击 <kbd>安装</kbd> 图标
109
+ > - 根据屏幕上的指示完成 PWA 的安装
110
+
111
+ <br/>
112
+
113
+ ![](https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp)
114
+
115
+ **主题模式选择**
116
+
117
+ LobeChat 提供了亮色和暗色两种主题模式以及颜色定制选项,默认情况下,主题会跟随系统设置,您也可以在设置中手动切换。
118
+
119
+ <br/>
120
+
121
+ ![](https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp)
122
+
123
+ **移动设备适配**
124
+
125
+ 我们针对移动设备进行了一系列适配设计以提升用户体验。目前我们正在对移动端的体验进行版本迭代,如果您有任何建议或想法,我们非常欢迎您提供反馈。
126
+
127
+ > 🚧 更多快照和演示正在陆续添加中...
128
+
129
+ <div align="right">
130
+
131
+ [![][back-to-top]](#readme-top)
132
+
133
+ </div>
134
+
93
135
  ## 🛳 开箱即用
94
136
 
95
137
  LobeChat 提供了 Vercel 的 [自托管版本][deploy-url]。这使你可以在几分钟内构建自己的聊天机器人,无需任何基础知识。如果想自己部署该服务,可以按照以下步骤进行操作:
@@ -112,7 +154,7 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-url]。这使你可以在
112
154
 
113
155
  ### 保持更新
114
156
 
115
- 如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示“有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。我们建议按照 [LobeChat 自部署保持更新](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN) 步骤重新部署。
157
+ 如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示“有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。我们建议按照 [📘 LobeChat 自部署保持更新](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN) 步骤重新部署。
116
158
 
117
159
  <div align="right">
118
160
 
@@ -136,10 +178,14 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-url]。这使你可以在
136
178
 
137
179
  ## 🧩 插件体系
138
180
 
139
- 插件提供了扩展 LobeChat [Function Calling][fc-url] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。
181
+ 插件提供了扩展 LobeChat [Function Calling][fc-url] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 插件开发指引](https://github.com/lobehub/lobe-chat/wiki/Plugin-Development.zh-CN) 。
140
182
 
141
183
  > **Note**\
142
- > 插件系统目前正在进行重大开发。您可以在 <https://github.com/lobehub/lobe-chat/issues/97> 中了解更多信息。
184
+ > 插件系统目前正在进行重大开发。您可以在以下 Issues 中了解更多信息:
185
+ >
186
+ > - [x] [**插件一期**](https://github.com/lobehub/lobe-chat/issues/73): 实现插件与主体分离,将插件拆分为独立仓库维护,并实现插件的动态加载
187
+ > - [x] [**插件二期**](https://github.com/lobehub/lobe-chat/issues/97): 插件的安全性与使用的稳定性,更加精准地呈现异常状态,插件架构的可维护性与开发者友好
188
+ > - [ ] [**插件三期**](https://github.com/lobehub/lobe-chat/issues/149):更高阶与完善的自定义能力,支持插件鉴权与示例
143
189
 
144
190
  - [@lobehub/lobe-chat-plugins][lobe-chat-plugins]:这是 LobeChat 的插件索引。它从该仓库的 index.json 中获取插件列表并显示给用户。
145
191
  - [@lobehub/chat-plugin-sdk][chat-plugin-sdk]:LobeChat 插件 SDK 可帮助您创建出色的 Lobe Chat 插件。
@@ -186,27 +232,7 @@ $ pnpm dev
186
232
  [![][submit-agents-shield]][submit-agents-url]
187
233
  [![][submit-plugin-shield]][submit-plugin-url]
188
234
 
189
- <!-- CONTRIBUTION GROUP -->
190
-
191
- > 📊 Total: <kbd>**5**</kbd>
192
-
193
- <a href="https://github.com/arvinxx" title="arvinxx">
194
- <img src="https://avatars.githubusercontent.com/u/28616219?v=4" width="50" />
195
- </a>
196
- <a href="https://github.com/canisminor1990" title="canisminor1990">
197
- <img src="https://avatars.githubusercontent.com/u/17870709?v=4" width="50" />
198
- </a>
199
- <a href="https://github.com/apps/dependabot" title="dependabot[bot]">
200
- <img src="https://avatars.githubusercontent.com/in/29110?v=4" width="50" />
201
- </a>
202
- <a href="https://github.com/actions-user" title="actions-user">
203
- <img src="https://avatars.githubusercontent.com/u/65916846?v=4" width="50" />
204
- </a>
205
- <a href="https://github.com/bropines" title="bropines">
206
- <img src="https://avatars.githubusercontent.com/u/57861007?v=4" width="50" />
207
- </a>
208
-
209
- <!-- CONTRIBUTION END -->
235
+ [![][contributors-contrib]][contributors-url]
210
236
 
211
237
  <div align="right">
212
238
 
@@ -228,8 +254,7 @@ $ pnpm dev
228
254
 
229
255
  ---
230
256
 
231
- <details>
232
- <summary><h4>📝 License</h4></summary>
257
+ <details><summary><h4>📝 License</h4></summary>
233
258
 
234
259
  [![][fossa-license-shield]][fossa-license-url]
235
260
 
@@ -250,6 +275,7 @@ This project is [MIT](./LICENSE) licensed.
250
275
  [ci-release-url]: https://github.com/lobehub/lobe-chat/actions?query=workflow%3ARelease%20CI
251
276
  [ci-test-shield]: https://github.com/lobehub/lobe-chat/workflows/Test%20CI/badge.svg
252
277
  [ci-test-url]: https://github.com/lobehub/lobe-chat/actions/workflows/test.yml
278
+ [contributors-contrib]: https://contrib.rocks/image?repo=lobehub/lobe-chat
253
279
  [contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-chat.svg?style=flat
254
280
  [contributors-url]: https://github.com/lobehub/lobe-chat/graphs/contributors
255
281
  [deploy-button-image]: https://vercel.com/button
@@ -292,3 +318,4 @@ This project is [MIT](./LICENSE) licensed.
292
318
  [submit-agents-url]: https://github.com/lobehub/lobe-chat-agents
293
319
  [submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
294
320
  [submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
321
+ [wiki-url]: https://github.com/lobehub/lobe-chat/wiki
package/bun.lockb ADDED
Binary file
@@ -0,0 +1,49 @@
1
+ # Deploying with Azure OpenAI
2
+
3
+ LobeChat supports using \[Azure OpenAI]\[azure-openai-url] as the model service provider for OpenAI. This document will guide you through the configuration of Azure OpenAI.
4
+
5
+ #### TOC
6
+
7
+ - [Usage Limitations](#usage-limitations)
8
+ - [Configuration in the Interface](#configuration-in-the-interface)
9
+ - [Configuration at Deployment](#configuration-at-deployment)
10
+
11
+ ## Usage Limitations
12
+
13
+ Considering development costs (\[#178]\[rfc]), the current version of LobeChat does not fully conform to Azure OpenAI's implementation model. Instead, it adopts a solution based on `openai` that is compatible with Azure OpenAI. This brings about the following limitations:
14
+
15
+ - You can only choose one between OpenAI and Azure OpenAI. Once you enable Azure OpenAI, you will not be able to use OpenAI as the model service provider.
16
+ - LobeChat requires deployment names to be the same as the model names in order to function properly. For example, the deployment name for the `gpt-35-turbo` model must be `gpt-35-turbo`, otherwise LobeChat will not be able to match the model correctly.
17
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267082091-d89d53d3-1c8c-40ca-ba15-0a9af2a79264.png)
18
+ - Due to the complexity of integrating the Azure OpenAI SDK, it is currently impossible to query the model list of configured resources.
19
+
20
+ ## Configuration in the Interface
21
+
22
+ Click on "Operation" - "Settings" in the bottom left corner, switch to the "Language Model" tab and enable the "Azure OpenAI" switch to start using Azure OpenAI.
23
+
24
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png)
25
+
26
+ You can fill in the corresponding configuration items as needed:
27
+
28
+ - **APIKey**: The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
29
+ - **API Address**: Azure API address, which can be found in the "Keys and Endpoints" section when checking resources from the Azure portal.
30
+ - **Azure Api Version**: The API version of Azure, which follows the YYYY-MM-DD format, refer to the \[latest version]\[azure-api-verion-url].
31
+
32
+ After completing the above field configuration, click on "Check". If the prompt says "Check Passed", it means the configuration was successful.
33
+
34
+ <br/>
35
+
36
+ ## Configuration at Deployment
37
+
38
+ If you want the deployed version to be directly configured with Azure OpenAI for end users to use immediately, you need to configure the following environment variables at deployment:
39
+
40
+ | Environment Variable | Required | Description | Default Value | Example |
41
+ | -------------------- | -------- | --------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------- |
42
+ | `USE_AZURE_OPENAI` | Yes | Set this value to `1` to enable Azure OpenAI configuration | - | `1` |
43
+ | `AZURE_API_KEY` | Yes | This is the API key you applied for on the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` |
44
+ | `OPENAI_PROXY_URL` | Yes | Azure API address, can be found in the "Keys and Endpoints" section | - | `https://docs-test-001.openai.azure.com` |
45
+ | `AZURE_API_VERSION` | No | Azure's API version, follows the YYYY-MM-DD format | 2023-08-01-preview | `2023-05-15`, refer to \[latest version]\[azure-api-verion-url] |
46
+ | `ACCESS_CODE` | No | Add a password to access this service, the password should be 6 digits or letters | - | `awCT74` or `e3@09!` |
47
+
48
+ > **Note**\
49
+ > When you enable `USE_AZURE_OPENAI` on the server side, users will not be able to modify and use the OpenAI key in the front-end configuration.
@@ -2,6 +2,12 @@
2
2
 
3
3
  LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型服务商,本文将介绍如何配置 Azure OpenAI。
4
4
 
5
+ #### TOC
6
+
7
+ - [使用限制](#使用限制)
8
+ - [在界面中配置](#在界面中配置)
9
+ - [在部署时配置](#在部署时配置)
10
+
5
11
  ## 使用限制
6
12
 
7
13
  从研发成本考虑([#178][rfc]),目前阶段的 LobeChat 并没有 100% 完全符合 Azure OpenAI 的实现模型,采用了以 `openai` 为基座,兼容 Azure OpeAI 的解决方案。因此会带来以下局限性:
@@ -25,6 +31,8 @@ LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型
25
31
 
26
32
  完成上述字段配置后,点击「检查」,如果提示「检查通过」,则说明配置成功。
27
33
 
34
+ <br/>
35
+
28
36
  ## 在部署时配置
29
37
 
30
38
  如果你希望部署的版本直接配置好 Azure OpenAI,让终端用户直接使用,那么你需要在部署时配置以下环境变量:
package/docs/Home.md CHANGED
@@ -6,27 +6,52 @@
6
6
 
7
7
  <h1>Lobe Chat Wiki</h1>
8
8
 
9
- LobeChat is a open-source, extensible (Function Calling), high-performance chatbot framework. <br/> It supports one-click free deployment of your private ChatGPT/LLM web application.
9
+ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-performance chatbot framework. <br/> It supports one-click free deployment of your private ChatGPT/LLM web application.
10
10
 
11
11
  </div>
12
12
 
13
13
  ![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
14
14
 
15
- <br/>
16
-
17
15
  ### 🤯 LobeChat
18
16
 
19
- - [Upstream Sync](Upstream-Sync.en-US)
20
- - [English](Upstream-Sync.en-US)
21
- - [简体中文](Upstream-Sync.zh-CN)
17
+ - [Maintaining Updates with LobeChat Self-Deployment](Upstream-Sync) | [自部署保持更新](Upstream-Sync.zh-CN)
18
+ - [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [自部署保持更新](Deploy-with-Azure-OpenAI.zh-CN)
19
+
20
+ ---
21
+
22
+ ### 🤖 Agents
23
+
24
+ - [Agent Index and Submit][agent-index] | [助手索引与提交][agent-index-cn]
25
+
26
+ ---
27
+
28
+ ### 🧩 Plugins
29
+
30
+ - [Plugin Index and Submit][plugin-index] | [插件索引与提交][plugin-index-cn]
31
+ - [Plugin Development](Plugin-Development) | [插件开发](Plugin-Development.zh-CN)
32
+ - [Plugin SDK Docs][plugin-sdk] | [插件 SDK 文档][plugin-skd-cn]
33
+
34
+ ---
35
+
36
+ <details><summary><h4>📝 License</h4></summary>
37
+
38
+ [![][fossa-license-shield]][fossa-license-url]
22
39
 
23
- ## 🤖 Agents
40
+ </details>
24
41
 
25
- - [Agent Index](https://github.com/lobehub/lobe-chat-agents)
42
+ Copyright © 2023 [LobeHub][profile-url]. <br />
43
+ This project is [MIT][license-url] licensed.
26
44
 
27
- ## 🧩 Plugins
45
+ <!-- LINK GROUP -->
28
46
 
29
- - [Plugin Index](https://github.com/lobehub/lobe-chat-plugins)
30
- - [Plugin Development](Plugin-Development.en-US)
31
- - [English](Plugin-Development.en-US)
32
- - [简体中文](Plugin-Development.zh-CN)
47
+ [agent-index]: https://github.com/lobehub/lobe-chat-agents
48
+ [agent-index-cn]: https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md
49
+ [fc-url]: https://sspai.com/post/81986
50
+ [fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
51
+ [fossa-license-url]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
52
+ [license-url]: https://github.com/lobehub/lobe-chat/blob/main/LICENSE
53
+ [plugin-index]: https://github.com/lobehub/lobe-chat-plugins
54
+ [plugin-index-cn]: https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md
55
+ [plugin-sdk]: https://chat-plugin-sdk.lobehub.com
56
+ [plugin-skd-cn]: https://chat-plugin-sdk.lobehub.com
57
+ [profile-url]: https://github.com/lobehub