@lobehub/chat 0.79.3 → 0.79.5
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 +13 -7
- package/README.zh-CN.md +13 -7
- package/docs/Deploy-with-Azure-OpenAI.md +14 -10
- package/docs/Environment-Variable.md +109 -0
- package/docs/Environment-Variable.zh-CN.md +109 -0
- package/docs/Home.md +1 -0
- package/docs/_Sidebar.md +1 -0
- package/locales/en_US/common.json +1 -1
- package/locales/ru_RU/common.json +1 -1
- package/locales/zh_CN/common.json +1 -1
- package/locales/zh_TW/common.json +1 -1
- package/next.config.mjs +8 -6
- package/package.json +5 -6
- package/src/{pages → app}/chat/features/Header/Desktop.tsx +2 -1
- package/src/{pages → app}/chat/features/Header/Mobile.tsx +3 -2
- package/src/{pages → app}/chat/index.tsx +1 -1
- package/src/{pages → app}/chat/mobile/index.tsx +1 -1
- package/src/app/chat/{page.page.tsx → mobile/page.tsx} +1 -1
- package/src/app/{page.page.tsx → chat/page.tsx} +1 -1
- package/src/{pages/chat/setting → app/chat/settings}/features/Header/Desktop.tsx +3 -1
- package/src/{pages/chat/setting → app/chat/settings}/features/Header/Mobile.tsx +3 -1
- package/src/{pages/chat/setting → app/chat/settings}/index.tsx +1 -1
- package/src/{pages/chat/setting/layout.tsx → app/chat/settings/layout.pc.tsx} +1 -1
- package/src/app/{market/page.page.tsx → chat/settings/page.tsx} +1 -1
- package/src/{pages → app}/home/index.tsx +1 -1
- package/src/app/{layout.page.tsx → layout.tsx} +1 -1
- package/src/{pages → app}/market/features/SideBar/AgentInfo/index.tsx +1 -1
- package/src/{pages → app}/market/index.tsx +1 -1
- package/src/{pages → app}/market/layout.mobile.tsx +1 -1
- package/src/app/{welcome/page.page.tsx → market/page.tsx} +1 -1
- package/src/app/page.tsx +7 -0
- package/src/{pages → app}/settings/index.tsx +1 -1
- package/src/app/settings/page.tsx +7 -0
- package/src/{pages → app}/welcome/index.tsx +1 -1
- package/src/app/welcome/page.tsx +7 -0
- package/src/components/Analytics/index.tsx +7 -0
- package/src/features/MobileTabBar/index.tsx +1 -1
- package/src/locales/default/common.ts +1 -1
- package/src/store/session/slices/session/initialState.ts +1 -1
- package/src/utils/url.test.ts +51 -0
- package/src/utils/url.ts +23 -0
- package/.github/dependabot.yml +0 -17
- package/src/app/chat/mobile/page.page.tsx +0 -7
- package/src/app/chat/settings/page.page.tsx +0 -7
- package/src/app/settings/page.page.tsx +0 -7
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/ApiKeyForm.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/ErrorActionContainer.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/InvalidAccess.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/OpenAiBizError.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/Plugin/PluginError.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Error/style.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/MessageExtra.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/OTPInput.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/FunctionCall.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/IFrameRender/hooks.ts +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/IFrameRender/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/IFrameRender/utils.ts +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/PluginMessage.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/PluginResultRender.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/SystemJsRender/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/SystemJsRender/utils.ts +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/Plugins/style.ts +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/SkeletonList.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ChatList/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/ActionBar/ActionLeft.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/ActionBar/ActionRight.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/ActionBar/Token.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/Desktop.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/Footer/SaveTopic.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/Footer/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/Mobile.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/Input/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ScrollAnchor/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Conversation/ScrollAnchor/useAtBottom.ts +0 -0
- /package/src/{pages → app}/chat/features/Conversation/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Header/PluginTag/PluginStatus.tsx +0 -0
- /package/src/{pages → app}/chat/features/Header/PluginTag/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Header/ShareButton/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Header/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/CollapseGroup/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/Desktop.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/Header/Desktop.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/Header/Mobile.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/Header/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/Inbox/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/List/AddButton.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/List/Item/Actions.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/List/Item/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/List/SkeletonList.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/List/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/Mobile.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionList/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/SessionSearchBar/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Desktop.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Mobile.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/SystemRole/Header.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/SystemRole/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/SystemRole/style.ts +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Topic/DefaultContent.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Topic/SkeletonList.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Topic/TopicContent.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Topic/TopicItem.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/Topic/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/TopicSearchBar/index.tsx +0 -0
- /package/src/{pages → app}/chat/features/Sidebar/index.tsx +0 -0
- /package/src/{pages → app}/chat/layout.mobile.tsx +0 -0
- /package/src/{pages/chat/layout.tsx → app/chat/layout.pc.tsx} +0 -0
- /package/src/{pages/chat/setting → app/chat/settings}/features/Header/index.tsx +0 -0
- /package/src/{pages/chat/setting → app/chat/settings}/layout.mobile.tsx +0 -0
- /package/src/{pages → app}/home/Loading.tsx +0 -0
- /package/src/{pages → app}/market/features/AgentCard/AgentCardBanner.tsx +0 -0
- /package/src/{pages → app}/market/features/AgentCard/AgentCardItem.tsx +0 -0
- /package/src/{pages → app}/market/features/AgentCard/Loading.tsx +0 -0
- /package/src/{pages → app}/market/features/AgentCard/index.tsx +0 -0
- /package/src/{pages → app}/market/features/AgentCard/style.ts +0 -0
- /package/src/{pages → app}/market/features/AgentSearchBar/index.tsx +0 -0
- /package/src/{pages → app}/market/features/Header/Desktop.tsx +0 -0
- /package/src/{pages → app}/market/features/Header/Mobile.tsx +0 -0
- /package/src/{pages → app}/market/features/Header/index.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/AgentInfo/Comment.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/AgentInfo/Header.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/AgentInfo/Loading.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/AgentInfo/TokenTag.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/AgentInfo/style.ts +0 -0
- /package/src/{pages → app}/market/features/SideBar/Desktop.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/Mobile.tsx +0 -0
- /package/src/{pages → app}/market/features/SideBar/index.tsx +0 -0
- /package/src/{pages → app}/market/features/TagList/index.tsx +0 -0
- /package/src/{pages/market/layout.tsx → app/market/layout.pc.tsx} +0 -0
- /package/src/{pages → app}/settings/features/Banner/index.tsx +0 -0
- /package/src/{pages → app}/settings/features/Header/Desktop.tsx +0 -0
- /package/src/{pages → app}/settings/features/Header/Mobile.tsx +0 -0
- /package/src/{pages → app}/settings/features/Header/index.tsx +0 -0
- /package/src/{pages → app}/settings/features/Settings/Agent.tsx +0 -0
- /package/src/{pages → app}/settings/features/Settings/Common.tsx +0 -0
- /package/src/{pages → app}/settings/features/Settings/LLM/Checker.tsx +0 -0
- /package/src/{pages → app}/settings/features/Settings/LLM/ModelList.tsx +0 -0
- /package/src/{pages → app}/settings/features/Settings/LLM/getModelList.ts +0 -0
- /package/src/{pages → app}/settings/features/Settings/LLM/index.tsx +0 -0
- /package/src/{pages → app}/settings/features/Settings/index.tsx +0 -0
- /package/src/{pages → app}/settings/features/ThemeSwatches/ThemeSwatchesNeutral.tsx +0 -0
- /package/src/{pages → app}/settings/features/ThemeSwatches/ThemeSwatchesPrimary.tsx +0 -0
- /package/src/{pages → app}/settings/features/ThemeSwatches/index.ts +0 -0
- /package/src/{pages → app}/settings/layout.mobile.tsx +0 -0
- /package/src/{pages/settings/layout.tsx → app/settings/layout.pc.tsx} +0 -0
- /package/src/{pages → app}/welcome/features/Banner/AgentCard.tsx +0 -0
- /package/src/{pages → app}/welcome/features/Banner/AgentTemplate.tsx +0 -0
- /package/src/{pages → app}/welcome/features/Banner/Hero.tsx +0 -0
- /package/src/{pages → app}/welcome/features/Banner/index.tsx +0 -0
- /package/src/{pages → app}/welcome/features/Banner/style.ts +0 -0
- /package/src/{pages → app}/welcome/features/Footer/index.tsx +0 -0
- /package/src/{pages → app}/welcome/layout.mobile.tsx +0 -0
- /package/src/{pages/welcome/layout.tsx → app/welcome/layout.pc.tsx} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.79.5](https://github.com/lobehub/lobe-chat/compare/v0.79.4...v0.79.5)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-09-26**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix URI error.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix URI error ([282a0c8](https://github.com/lobehub/lobe-chat/commit/282a0c8))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.79.4](https://github.com/lobehub/lobe-chat/compare/v0.79.3...v0.79.4)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-09-26**</sup>
|
|
33
|
+
|
|
34
|
+
#### ♻ Code Refactoring
|
|
35
|
+
|
|
36
|
+
- **misc**: Move dir from page to app and remove .page suffix.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### Code refactoring
|
|
44
|
+
|
|
45
|
+
- **misc**: Move dir from page to app and remove .page suffix, closes [#236](https://github.com/lobehub/lobe-chat/issues/236) ([2907303](https://github.com/lobehub/lobe-chat/commit/2907303))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.79.3](https://github.com/lobehub/lobe-chat/compare/v0.79.2...v0.79.3)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-09-25**</sup>
|
package/README.md
CHANGED
|
@@ -157,10 +157,14 @@ LobeChat provides a [self-hosted version][deploy-link] with Vercel. This allows
|
|
|
157
157
|
- After deployment, you can start using it;
|
|
158
158
|
- Bind a custom domain (optional): The DNS of the domain assigned by Vercel is polluted in some areas, binding a custom domain can connect directly.
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
<div align="right">
|
|
161
|
+
|
|
162
|
+
[![][deploy-button-image]][deploy-link]
|
|
163
|
+
|
|
164
|
+
</div>
|
|
161
165
|
|
|
162
166
|
> **Note**\
|
|
163
|
-
> This project provides some additional configuration items, set with environment variables:
|
|
167
|
+
> This project provides some additional configuration items, set with environment variables, The complete list of environment variables can be found in the [📘 Environment Variables](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable) :
|
|
164
168
|
|
|
165
169
|
| Environment Variable | Required | Description | Example |
|
|
166
170
|
| -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
@@ -196,6 +200,11 @@ If you have deployed your own project following the one-click deployment steps i
|
|
|
196
200
|
|
|
197
201
|
Plugins provide a means to extend the [Function Calling][fc-link] 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.
|
|
198
202
|
|
|
203
|
+
- [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.
|
|
204
|
+
- [chat-plugin-template][chat-plugin-template]: This is the plugin template for LobeChat plugin development.
|
|
205
|
+
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.
|
|
206
|
+
- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]: The LobeChat Plugins Gateway is a backend service that serves as a gateway for LobeChat plugins. We deploy this service using Vercel. The primary API POST /api/v1/runner is deployed as an Edge Function.
|
|
207
|
+
|
|
199
208
|
> **Note**\
|
|
200
209
|
> The plugin system is currently undergoing major development. You can learn more in the following issues:
|
|
201
210
|
>
|
|
@@ -203,10 +212,6 @@ Plugins provide a means to extend the [Function Calling][fc-link] capabilities o
|
|
|
203
212
|
> - [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.
|
|
204
213
|
> - [ ] [**Plugin Phase 3**](https://github.com/lobehub/lobe-chat/issues/149): Higher-level and more comprehensive customization capabilities, support for plugin authentication and examples.
|
|
205
214
|
|
|
206
|
-
- [@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.
|
|
207
|
-
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.
|
|
208
|
-
- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]: The LobeChat Plugins Gateway is a backend service that serves as a gateway for LobeChat plugins. We deploy this service using Vercel. The primary API POST /api/v1/runner is deployed as an Edge Function.
|
|
209
|
-
|
|
210
215
|
| Official Plugin | Description |
|
|
211
216
|
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
212
217
|
| [SearchEngine][chat-plugin-search-engine] | This plugin allows for the use of the SerpApi search engine. |
|
|
@@ -289,6 +294,7 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
289
294
|
[chat-plugin-realtime-weather]: https://github.com/lobehub/chat-plugin-realtime-weather
|
|
290
295
|
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
|
|
291
296
|
[chat-plugin-search-engine]: https://github.com/lobehub/chat-plugin-search-engine
|
|
297
|
+
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
|
|
292
298
|
[chat-plugin-web-crawler]: https://github.com/lobehub/chat-plugin-web-crawler
|
|
293
299
|
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
|
|
294
300
|
[codespaces-link]: https://codespaces.new/lobehub/lobe-chat
|
|
@@ -304,7 +310,7 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
304
310
|
[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
|
|
305
311
|
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
|
|
306
312
|
[github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-chat/release.yml
|
|
307
|
-
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
313
|
+
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
308
314
|
[github-action-test-link]: https://github.com/actions/workflows/lobehub/lobe-chat/test.yml
|
|
309
315
|
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
310
316
|
[github-contributors-link]: https://github.com/lobehub/lobe-chat/graphs/contributors
|
package/README.zh-CN.md
CHANGED
|
@@ -159,10 +159,14 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以
|
|
|
159
159
|
- 部署完毕后,即可开始使用;
|
|
160
160
|
- 绑定自定义域名(可选):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
<div align="right">
|
|
163
|
+
|
|
164
|
+
[![][deploy-button-image]][deploy-link]
|
|
165
|
+
|
|
166
|
+
</div>
|
|
163
167
|
|
|
164
168
|
> **Note**\
|
|
165
|
-
>
|
|
169
|
+
> 本项目提供了一些额外的配置项,使用环境变量进行设置,完整环境变量可见 [📘环境变量](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable.zh-CN):
|
|
166
170
|
|
|
167
171
|
| 环境变量 | 类型 | 描述 | 示例 |
|
|
168
172
|
| ------------------ | ---- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
@@ -198,6 +202,11 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以
|
|
|
198
202
|
|
|
199
203
|
插件提供了扩展 LobeChat [Function Calling][fc-link] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 插件开发指引](https://github.com/lobehub/lobe-chat/wiki/Plugin-Development.zh-CN) 。
|
|
200
204
|
|
|
205
|
+
- [lobe-chat-plugins][lobe-chat-plugins]:这是 LobeChat 的插件索引。它从该仓库的 index.json 中获取插件列表并显示给用户。
|
|
206
|
+
- [chat-plugin-template][chat-plugin-template]: Chat Plugin 插件开发模版,你可以通过项目模版快速新建插件项目。
|
|
207
|
+
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]:LobeChat 插件 SDK 可帮助您创建出色的 Lobe Chat 插件。
|
|
208
|
+
- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]:LobeChat 插件网关是一个后端服务,作为 LobeChat 插件的网关。我们使用 Vercel 部署此服务。主要的 API POST /api/v1/runner 被部署为 Edge Function。
|
|
209
|
+
|
|
201
210
|
> **Note**\
|
|
202
211
|
> 插件系统目前正在进行重大开发。您可以在以下 Issues 中了解更多信息:
|
|
203
212
|
>
|
|
@@ -205,10 +214,6 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以
|
|
|
205
214
|
> - [x] [**插件二期**](https://github.com/lobehub/lobe-chat/issues/97): 插件的安全性与使用的稳定性,更加精准地呈现异常状态,插件架构的可维护性与开发者友好
|
|
206
215
|
> - [ ] [**插件三期**](https://github.com/lobehub/lobe-chat/issues/149):更高阶与完善的自定义能力,支持插件鉴权与示例
|
|
207
216
|
|
|
208
|
-
- [@lobehub/lobe-chat-plugins][lobe-chat-plugins]:这是 LobeChat 的插件索引。它从该仓库的 index.json 中获取插件列表并显示给用户。
|
|
209
|
-
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]:LobeChat 插件 SDK 可帮助您创建出色的 Lobe Chat 插件。
|
|
210
|
-
- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]:LobeChat 插件网关是一个后端服务,作为 LobeChat 插件的网关。我们使用 Vercel 部署此服务。主要的 API POST /api/v1/runner 被部署为 Edge Function。
|
|
211
|
-
|
|
212
217
|
| 官方插件 | 描述 |
|
|
213
218
|
| ---------------------------------------- | ---------------------------------------------------------------------------- |
|
|
214
219
|
| [搜索引擎][chat-plugin-search-engine] | 此插件允许使用 SerpApi 搜索引擎。 |
|
|
@@ -291,6 +296,7 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
291
296
|
[chat-plugin-realtime-weather]: https://github.com/lobehub/chat-plugin-realtime-weather
|
|
292
297
|
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
|
|
293
298
|
[chat-plugin-search-engine]: https://github.com/lobehub/chat-plugin-search-engine
|
|
299
|
+
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
|
|
294
300
|
[chat-plugin-web-crawler]: https://github.com/lobehub/chat-plugin-web-crawler
|
|
295
301
|
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
|
|
296
302
|
[codespaces-link]: https://codespaces.new/lobehub/lobe-chat
|
|
@@ -306,7 +312,7 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
306
312
|
[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
|
|
307
313
|
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
|
|
308
314
|
[github-action-release-link]: https://github.com/lobehub/lobe-chat/actions/workflows/release.yml
|
|
309
|
-
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
315
|
+
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
310
316
|
[github-action-test-link]: https://github.com/lobehub/lobe-chat/actions/workflows/test.yml
|
|
311
317
|
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
312
318
|
[github-contributors-link]: https://github.com/lobehub/lobe-chat/graphs/contributors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deploying with Azure OpenAI
|
|
2
2
|
|
|
3
|
-
LobeChat supports using
|
|
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
4
|
|
|
5
5
|
#### TOC
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ LobeChat supports using \[Azure OpenAI]\[azure-openai-url] as the model service
|
|
|
10
10
|
|
|
11
11
|
## Usage Limitations
|
|
12
12
|
|
|
13
|
-
Considering development costs (
|
|
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
14
|
|
|
15
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
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.
|
|
@@ -27,7 +27,7 @@ You can fill in the corresponding configuration items as needed:
|
|
|
27
27
|
|
|
28
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
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
|
|
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
31
|
|
|
32
32
|
After completing the above field configuration, click on "Check". If the prompt says "Check Passed", it means the configuration was successful.
|
|
33
33
|
|
|
@@ -37,13 +37,17 @@ After completing the above field configuration, click on "Check". If the prompt
|
|
|
37
37
|
|
|
38
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
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
|
|
46
|
-
| `ACCESS_CODE` | No | Add a password to access this service, the password should be 6 digits or letters | - | `awCT74` or `e3@09!`
|
|
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
47
|
|
|
48
48
|
> **Note**\
|
|
49
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.
|
|
50
|
+
|
|
51
|
+
[azure-api-verion-url]: https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions
|
|
52
|
+
[azure-openai-url]: https://learn.microsoft.com/zh-cn/azure/ai-services/openai/concepts/models
|
|
53
|
+
[rfc]: https://github.com/lobehub/lobe-chat/discussions/178
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# LobeChat Environment Variables
|
|
2
|
+
|
|
3
|
+
LobeChat provides additional configuration options during deployment, which can be set using environment variables
|
|
4
|
+
|
|
5
|
+
#### TOC
|
|
6
|
+
|
|
7
|
+
- [General Variables](#general-variables)
|
|
8
|
+
- [`ACCESS_CODE`](#access_code)
|
|
9
|
+
- [OpenAI](#openai)
|
|
10
|
+
- [`OPENAI_API_KEY`](#openai_api_key)
|
|
11
|
+
- [`OPENAI_PROXY_URL`](#openai_proxy_url)
|
|
12
|
+
- [Azure OpenAI](#azure-openai)
|
|
13
|
+
- [`USE_AZURE_OPENAI`](#use_azure_openai)
|
|
14
|
+
- [`AZURE_API_KEY`](#azure_api_key)
|
|
15
|
+
- [`AZURE_API_VERSION`](#azure_api_version)
|
|
16
|
+
- [Plugin Service](#plugin-service)
|
|
17
|
+
- [`PLUGINS_INDEX_URL`](#plugins_index_url)
|
|
18
|
+
- [Agent Service](#agent-service)
|
|
19
|
+
- [`AGENTS_INDEX_URL`](#agents_index_url)
|
|
20
|
+
- [Development Environment](#development-environment)
|
|
21
|
+
- [`DEV_API_END_PORT_URL`](#dev_api_end_port_url)
|
|
22
|
+
|
|
23
|
+
## General Variables
|
|
24
|
+
|
|
25
|
+
### `ACCESS_CODE`
|
|
26
|
+
|
|
27
|
+
- Type: Optional
|
|
28
|
+
- Description: Add a password to access the LobeChat service, the password should be 6 digits or letters
|
|
29
|
+
- Default Value: -
|
|
30
|
+
- Example: `awCT74` or `e3@09!`
|
|
31
|
+
|
|
32
|
+
<br/>
|
|
33
|
+
|
|
34
|
+
## OpenAI
|
|
35
|
+
|
|
36
|
+
### `OPENAI_API_KEY`
|
|
37
|
+
|
|
38
|
+
- Type: Required
|
|
39
|
+
- Description: This is the API key you apply for on the OpenAI account page, you can go [here][openai-api-page] to view
|
|
40
|
+
- Default Value: -
|
|
41
|
+
- Example: `sk-xxxxxx...xxxxxx`
|
|
42
|
+
|
|
43
|
+
### `OPENAI_PROXY_URL`
|
|
44
|
+
|
|
45
|
+
- Type: Optional
|
|
46
|
+
- Description: If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL
|
|
47
|
+
- Default Value: `https://api.openai.com`
|
|
48
|
+
- Example: `https://api.chatanywhere.cn`
|
|
49
|
+
|
|
50
|
+
<br/>
|
|
51
|
+
|
|
52
|
+
## Azure OpenAI
|
|
53
|
+
|
|
54
|
+
If you need to use Azure OpenAI to provide model services, you can refer to the [Deploy with Azure OpenAI](./Deploy-with-Azure-OpenAI.zh-CN.md) section for detailed steps. Here are the environment variables related to Azure OpenAI.
|
|
55
|
+
|
|
56
|
+
### `USE_AZURE_OPENAI`
|
|
57
|
+
|
|
58
|
+
- Type: Optional
|
|
59
|
+
- Description: Set this value to `1` to enable Azure OpenAI configuration
|
|
60
|
+
- Default Value: -
|
|
61
|
+
- Example: `1`
|
|
62
|
+
|
|
63
|
+
### `AZURE_API_KEY`
|
|
64
|
+
|
|
65
|
+
- Type: Optional
|
|
66
|
+
- Description: This is the API key you apply for on the Azure OpenAI account page
|
|
67
|
+
- Default Value: -
|
|
68
|
+
- Example: `c55168be3874490ef0565d9779ecd5a6`
|
|
69
|
+
|
|
70
|
+
### `AZURE_API_VERSION`
|
|
71
|
+
|
|
72
|
+
- Type: Optional
|
|
73
|
+
- Description: Azure's API version, following the YYYY-MM-DD format
|
|
74
|
+
- Default Value: `2023-08-01-preview`
|
|
75
|
+
- Example: `2023-05-15`, refer to [latest version][azure-api-verion-url]
|
|
76
|
+
|
|
77
|
+
<br/>
|
|
78
|
+
|
|
79
|
+
## Plugin Service
|
|
80
|
+
|
|
81
|
+
### `PLUGINS_INDEX_URL`
|
|
82
|
+
|
|
83
|
+
- Type: Optional
|
|
84
|
+
- Description: The index address of the LobeChat plugin market. If you have deployed the plugin market service yourself, you can use this variable to override the default plugin market address
|
|
85
|
+
- Default Value: `https://chat-plugins.lobehub.com`
|
|
86
|
+
|
|
87
|
+
<br/>
|
|
88
|
+
|
|
89
|
+
## Agent Service
|
|
90
|
+
|
|
91
|
+
### `AGENTS_INDEX_URL`
|
|
92
|
+
|
|
93
|
+
- Type: Optional
|
|
94
|
+
- Description: The index address of the LobeChat role market. If you have deployed the role market service yourself, you can use this variable to override the default plugin market address
|
|
95
|
+
- Default Value: `https://chat-agents.lobehub.com`
|
|
96
|
+
|
|
97
|
+
<br/>
|
|
98
|
+
|
|
99
|
+
## Development Environment
|
|
100
|
+
|
|
101
|
+
### `DEV_API_END_PORT_URL`
|
|
102
|
+
|
|
103
|
+
- Type: Optional
|
|
104
|
+
- Description: Define the proxy address of the LobeChat server request forwarding. Using this variable can conveniently forward requests to the line during development. See [configuration code](https://github.com/lobehub/lobe-chat/blob/main/next.config.mjs#L29-L38)
|
|
105
|
+
- Default Value: -
|
|
106
|
+
- Example: `https://chat-preview.lobehub.com`
|
|
107
|
+
|
|
108
|
+
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
109
|
+
[openai-api-page]: https://platform.openai.com/account/api-keys
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# LobeChat 环境变量
|
|
2
|
+
|
|
3
|
+
LobeChat 在部署时提供了一些额外的配置项,使用环境变量进行设置
|
|
4
|
+
|
|
5
|
+
#### TOC
|
|
6
|
+
|
|
7
|
+
- [通用变量](#通用变量)
|
|
8
|
+
- [`ACCESS_CODE`](#access_code)
|
|
9
|
+
- [OpenAI](#openai)
|
|
10
|
+
- [`OPENAI_API_KEY`](#openai_api_key)
|
|
11
|
+
- [`OPENAI_PROXY_URL`](#openai_proxy_url)
|
|
12
|
+
- [Azure OpenAI](#azure-openai)
|
|
13
|
+
- [`USE_AZURE_OPENAI`](#use_azure_openai)
|
|
14
|
+
- [`AZURE_API_KEY`](#azure_api_key)
|
|
15
|
+
- [`AZURE_API_VERSION`](#azure_api_version)
|
|
16
|
+
- [插件服务](#插件服务)
|
|
17
|
+
- [`PLUGINS_INDEX_URL`](#plugins_index_url)
|
|
18
|
+
- [角色服务](#角色服务)
|
|
19
|
+
- [`AGENTS_INDEX_URL`](#agents_index_url)
|
|
20
|
+
- [开发环境](#开发环境)
|
|
21
|
+
- [`DEV_API_END_PORT_URL`](#dev_api_end_port_url)
|
|
22
|
+
|
|
23
|
+
## 通用变量
|
|
24
|
+
|
|
25
|
+
### `ACCESS_CODE`
|
|
26
|
+
|
|
27
|
+
- 类型:可选
|
|
28
|
+
- 描述:添加访问 LobeChat 服务的密码,密码应为 6 位数字或字母
|
|
29
|
+
- 默认值:-
|
|
30
|
+
- 示例:`awCT74` 或 `e3@09!`
|
|
31
|
+
|
|
32
|
+
<br/>
|
|
33
|
+
|
|
34
|
+
## OpenAI
|
|
35
|
+
|
|
36
|
+
### `OPENAI_API_KEY`
|
|
37
|
+
|
|
38
|
+
- 类型:必选
|
|
39
|
+
- 描述:这是你在 OpenAI 账户页面申请的 API 密钥,可以前往[这里][openai-api-page]查看
|
|
40
|
+
- 默认值:-
|
|
41
|
+
- 示例:`sk-xxxxxx...xxxxxx`
|
|
42
|
+
|
|
43
|
+
### `OPENAI_PROXY_URL`
|
|
44
|
+
|
|
45
|
+
- 类型:可选
|
|
46
|
+
- 描述:如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL
|
|
47
|
+
- 默认值:`https://api.openai.com`
|
|
48
|
+
- 示例:`https://api.chatanywhere.cn`
|
|
49
|
+
|
|
50
|
+
<br/>
|
|
51
|
+
|
|
52
|
+
## Azure OpenAI
|
|
53
|
+
|
|
54
|
+
如果你需要使用 Azure OpenAI 来提供模型服务,可以查阅 [使用 Azure OpenAI 部署](./Deploy-with-Azure-OpenAI.zh-CN.md) 章节查看详细步骤,这里将列举和 Azure OpenAI 相关的环境变量。
|
|
55
|
+
|
|
56
|
+
### `USE_AZURE_OPENAI`
|
|
57
|
+
|
|
58
|
+
- 类型:可选
|
|
59
|
+
- 描述:设置该值为 `1` 开启 Azure OpenAI 配置
|
|
60
|
+
- 默认值:-
|
|
61
|
+
- 示例:`1`
|
|
62
|
+
|
|
63
|
+
### `AZURE_API_KEY`
|
|
64
|
+
|
|
65
|
+
- 类型:可选
|
|
66
|
+
- 描述:这是你在 Azure OpenAI 账户页面申请的 API 密钥
|
|
67
|
+
- 默认值:-
|
|
68
|
+
- 示例:`c55168be3874490ef0565d9779ecd5a6`
|
|
69
|
+
|
|
70
|
+
### `AZURE_API_VERSION`
|
|
71
|
+
|
|
72
|
+
- 类型:可选
|
|
73
|
+
- 描述:Azure 的 API 版本,遵循 YYYY-MM-DD 格式
|
|
74
|
+
- 默认值:`2023-08-01-preview`
|
|
75
|
+
- 示例:`2023-05-15`,查阅[最新版本][azure-api-verion-url]
|
|
76
|
+
|
|
77
|
+
<br/>
|
|
78
|
+
|
|
79
|
+
## 插件服务
|
|
80
|
+
|
|
81
|
+
### `PLUGINS_INDEX_URL`
|
|
82
|
+
|
|
83
|
+
- 类型:可选
|
|
84
|
+
- 描述:LobeChat 插件市场的索引地址,如果你自行部署了插件市场的服务,可以使用该变量来覆盖默认的插件市场地址
|
|
85
|
+
- 默认值:`https://chat-plugins.lobehub.com`
|
|
86
|
+
|
|
87
|
+
<br/>
|
|
88
|
+
|
|
89
|
+
## 角色服务
|
|
90
|
+
|
|
91
|
+
### `AGENTS_INDEX_URL`
|
|
92
|
+
|
|
93
|
+
- 类型:可选
|
|
94
|
+
- 描述:LobeChat 角色市场的索引地址,如果你自行部署了角色市场的服务,可以使用该变量来覆盖默认的插件市场地址
|
|
95
|
+
- 默认值:`https://chat-agents.lobehub.com`
|
|
96
|
+
|
|
97
|
+
<br/>
|
|
98
|
+
|
|
99
|
+
## 开发环境
|
|
100
|
+
|
|
101
|
+
### `DEV_API_END_PORT_URL`
|
|
102
|
+
|
|
103
|
+
- 类型:可选
|
|
104
|
+
- 描述:定义 LobeChat 服务端请求转发的代理地址,使用该变量可以方便开发时将请求转发到线上。详见[配置代码](https://github.com/lobehub/lobe-chat/blob/main/next.config.mjs#L29-L38)
|
|
105
|
+
- 默认值:-
|
|
106
|
+
- 示例:`https://chat-preview.lobehub.com`
|
|
107
|
+
|
|
108
|
+
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
109
|
+
[openai-api-page]: https://platform.openai.com/account/api-keys
|
package/docs/Home.md
CHANGED
|
@@ -14,6 +14,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
|
|
|
14
14
|
|
|
15
15
|
### 🤯 LobeChat
|
|
16
16
|
|
|
17
|
+
- [Environment Variables](Environment-Variable) | [环境变量](Environment-Variable.zh-CN)
|
|
17
18
|
- [Maintaining Updates with LobeChat Self-Deployment](Upstream-Sync) | [自部署保持更新](Upstream-Sync.zh-CN)
|
|
18
19
|
- [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [自部署保持更新](Deploy-with-Azure-OpenAI.zh-CN)
|
|
19
20
|
|
package/docs/_Sidebar.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
#### 🤯 LobeChat
|
|
8
8
|
|
|
9
|
+
- [Environment Variables](Environment-Variable) | [中文](Environment-Variable.zh-CN)
|
|
9
10
|
- [Upstream Sync](Upstream-Sync) | [中文](Upstream-Sync.zh-CN)
|
|
10
11
|
- [Deploying with Azure OpenAI](Deploy-with-Azure-OpenAI) | [中文](Deploy-with-Azure-OpenAI.zh-CN)
|
|
11
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "About",
|
|
3
3
|
"advanceSettings": "Advanced Settings",
|
|
4
|
-
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away or go to [Agent Settings](/chat/
|
|
4
|
+
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away or go to [Agent Settings](/chat/settings#session={{id}}) to complete my information.",
|
|
5
5
|
"agentDefaultMessageWithSystemRole": "Hello, I'm **{{name}}**, {{systemRole}}. Let's start chatting!",
|
|
6
6
|
"agentMaxToken": "Max Session Length",
|
|
7
7
|
"agentModel": "Model",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "Наш Github",
|
|
3
3
|
"advanceSettings": "Дополнительные настройки",
|
|
4
|
-
"agentDefaultMessage": "Здравствуйте, я **{{name}}**. Вы можете начать общаться со мной прямо сейчас или перейти на [Assistant Settings](/chat/
|
|
4
|
+
"agentDefaultMessage": "Здравствуйте, я **{{name}}**. Вы можете начать общаться со мной прямо сейчас или перейти на [Assistant Settings](/chat/settings#session={{id}}) для моей настройки.",
|
|
5
5
|
"agentDefaultMessageWithSystemRole": "Здравствуйте, Я **{{name}}**, {{systemRole}}. Давайте начнем общаться!",
|
|
6
6
|
"agentMaxToken": "Максимальная длина запроса",
|
|
7
7
|
"agentModel": "Модель",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "关于",
|
|
3
3
|
"advanceSettings": "高级设置",
|
|
4
|
-
"agentDefaultMessage": "你好,我是 **{{name}}**,你可以立即与我开始对话,也可以前往 [助手设置](/chat/
|
|
4
|
+
"agentDefaultMessage": "你好,我是 **{{name}}**,你可以立即与我开始对话,也可以前往 [助手设置](/chat/settings#session={{id}}) 完善我的信息。",
|
|
5
5
|
"agentDefaultMessageWithSystemRole": "你好,我是 **{{name}}**,{{systemRole}},让我们开始对话吧!",
|
|
6
6
|
"agentMaxToken": "会话最大长度",
|
|
7
7
|
"agentModel": "模型",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"about": "關於",
|
|
3
3
|
"advanceSettings": "進階設定",
|
|
4
|
-
"agentDefaultMessage": "嗨,我是 **{{name}}**。您可以立即與我開始對話,或是前往 [助理設定](/chat/
|
|
4
|
+
"agentDefaultMessage": "嗨,我是 **{{name}}**。您可以立即與我開始對話,或是前往 [助理設定](/chat/settings#session={{id}}) 完善我的資訊。",
|
|
5
5
|
"agentDefaultMessageWithSystemRole": "嗨,我是 **{{name}}**,{{systemRole}}。讓我們開始對話吧!",
|
|
6
6
|
"agentMaxToken": "最大對話長度",
|
|
7
7
|
"agentModel": "模型",
|
package/next.config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import nextPWA from 'next-pwa';
|
|
2
2
|
|
|
3
3
|
const isProd = process.env.NODE_ENV === 'production';
|
|
4
|
-
const
|
|
4
|
+
const DEV_API_END_PORT_URL = process.env.DEV_API_END_PORT_URL || '';
|
|
5
5
|
|
|
6
6
|
const withPWA = nextPWA({
|
|
7
7
|
dest: 'public',
|
|
@@ -12,8 +12,10 @@ const withPWA = nextPWA({
|
|
|
12
12
|
/** @type {import('next').NextConfig} */
|
|
13
13
|
const nextConfig = {
|
|
14
14
|
reactStrictMode: true,
|
|
15
|
-
pageExtensions: ['
|
|
16
|
-
|
|
15
|
+
pageExtensions: ['tsx', 'api.ts'],
|
|
16
|
+
// not sure why antd-style cause multi ThemeProvider instance
|
|
17
|
+
// So we need to transpile it to lib mode
|
|
18
|
+
transpilePackages: ['@lobehub/ui', 'antd-style'],
|
|
17
19
|
webpack(config) {
|
|
18
20
|
config.experiments = {
|
|
19
21
|
asyncWebAssembly: true,
|
|
@@ -27,15 +29,15 @@ const nextConfig = {
|
|
|
27
29
|
return [
|
|
28
30
|
{
|
|
29
31
|
source: '/api/openai/chat-dev',
|
|
30
|
-
destination: `${
|
|
32
|
+
destination: `${DEV_API_END_PORT_URL}/api/openai/chat`,
|
|
31
33
|
},
|
|
32
34
|
{
|
|
33
35
|
source: '/api/openai/models-dev',
|
|
34
|
-
destination: `${
|
|
36
|
+
destination: `${DEV_API_END_PORT_URL}/api/openai/models`,
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
source: '/api/plugins-dev',
|
|
38
|
-
destination: `${
|
|
40
|
+
destination: `${DEV_API_END_PORT_URL}/api/plugins`,
|
|
39
41
|
},
|
|
40
42
|
];
|
|
41
43
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.79.
|
|
3
|
+
"version": "0.79.5",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -87,15 +87,15 @@
|
|
|
87
87
|
"lodash-es": "^4",
|
|
88
88
|
"lucide-react": "latest",
|
|
89
89
|
"nanoid": "^5",
|
|
90
|
-
"next": "13.
|
|
91
|
-
"openai": "^4.
|
|
90
|
+
"next": "^13.5.3",
|
|
91
|
+
"openai": "^4.10.0",
|
|
92
92
|
"polished": "^4",
|
|
93
93
|
"react": "^18",
|
|
94
94
|
"react-dom": "^18",
|
|
95
95
|
"react-hotkeys-hook": "^4",
|
|
96
96
|
"react-i18next": "^13",
|
|
97
97
|
"react-intersection-observer": "^9",
|
|
98
|
-
"react-layout-kit": "^1.7.
|
|
98
|
+
"react-layout-kit": "^1.7.4",
|
|
99
99
|
"swr": "^2",
|
|
100
100
|
"systemjs": "^6.14.2",
|
|
101
101
|
"ts-md5": "^1",
|
|
@@ -118,8 +118,7 @@
|
|
|
118
118
|
"@types/node": "^20",
|
|
119
119
|
"@types/react": "^18",
|
|
120
120
|
"@types/react-dom": "^18",
|
|
121
|
-
"@types/systemjs": "^6.13.
|
|
122
|
-
"@types/testing-library__jest-dom": "^6",
|
|
121
|
+
"@types/systemjs": "^6.13.3",
|
|
123
122
|
"@types/uuid": "^9",
|
|
124
123
|
"@umijs/lint": "^4",
|
|
125
124
|
"@vitest/coverage-v8": "latest",
|
|
@@ -10,6 +10,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
10
10
|
import { useGlobalStore } from '@/store/global';
|
|
11
11
|
import { useSessionChatInit, useSessionStore } from '@/store/session';
|
|
12
12
|
import { agentSelectors, sessionSelectors } from '@/store/session/selectors';
|
|
13
|
+
import { pathString } from '@/utils/url';
|
|
13
14
|
|
|
14
15
|
import PluginTag from './PluginTag';
|
|
15
16
|
import ShareButton from './ShareButton';
|
|
@@ -81,7 +82,7 @@ const Header = memo(() => {
|
|
|
81
82
|
<ActionIcon
|
|
82
83
|
icon={Settings}
|
|
83
84
|
onClick={() => {
|
|
84
|
-
router.push('/chat/settings', { hash: location.hash });
|
|
85
|
+
router.push(pathString('/chat/settings', { hash: location.hash }));
|
|
85
86
|
}}
|
|
86
87
|
size={{ fontSize: 24 }}
|
|
87
88
|
title={t('header.session', { ns: 'setting' })}
|
|
@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import { useGlobalStore } from '@/store/global';
|
|
8
8
|
import { useSessionStore } from '@/store/session';
|
|
9
9
|
import { agentSelectors, sessionSelectors } from '@/store/session/selectors';
|
|
10
|
+
import { pathString } from '@/utils/url';
|
|
10
11
|
|
|
11
12
|
const MobileHeader = memo(() => {
|
|
12
13
|
const { t } = useTranslation('common');
|
|
@@ -25,7 +26,7 @@ const MobileHeader = memo(() => {
|
|
|
25
26
|
return (
|
|
26
27
|
<MobileNavBar
|
|
27
28
|
center={<MobileNavBarTitle desc={model} title={displayTitle} />}
|
|
28
|
-
onBackClick={() => router.push('/chat'
|
|
29
|
+
onBackClick={() => router.push('/chat')}
|
|
29
30
|
right={
|
|
30
31
|
<>
|
|
31
32
|
<ActionIcon icon={LayoutList} onClick={() => toggleConfig()} />
|
|
@@ -33,7 +34,7 @@ const MobileHeader = memo(() => {
|
|
|
33
34
|
<ActionIcon
|
|
34
35
|
icon={Settings}
|
|
35
36
|
onClick={() => {
|
|
36
|
-
router.push('/chat/settings', { hash: location.hash });
|
|
37
|
+
router.push(pathString('/chat/settings', { hash: location.hash }));
|
|
37
38
|
}}
|
|
38
39
|
/>
|
|
39
40
|
)}
|
|
@@ -13,8 +13,8 @@ import { genSiteHeadTitle } from '@/utils/genSiteHeadTitle';
|
|
|
13
13
|
import Conversation from './features/Conversation';
|
|
14
14
|
import Header from './features/Header';
|
|
15
15
|
import SideBar from './features/Sidebar';
|
|
16
|
-
import DesktopLayout from './layout';
|
|
17
16
|
import MobileLayout from './layout.mobile';
|
|
17
|
+
import DesktopLayout from './layout.pc';
|
|
18
18
|
|
|
19
19
|
const Chat = memo(() => {
|
|
20
20
|
const { mobile } = useResponsive();
|