@lobehub/chat 0.74.0 → 0.76.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.
- package/CHANGELOG.md +86 -0
- package/README.md +26 -5
- package/README.zh-CN.md +25 -4
- package/docs/deploy-with-azure-openai.zh-CN.md +45 -0
- package/locales/en_US/market.json +12 -0
- package/locales/en_US/plugin.json +11 -2
- package/locales/en_US/setting.json +3 -1
- package/locales/ru_RU/market.json +12 -0
- package/locales/ru_RU/plugin.json +44 -49
- package/locales/ru_RU/setting.json +3 -1
- package/locales/zh_CN/common.json +1 -1
- package/locales/zh_CN/market.json +12 -0
- package/locales/zh_CN/plugin.json +19 -5
- package/locales/zh_CN/setting.json +62 -14
- package/next.config.mjs +3 -1
- package/package.json +5 -5
- package/scripts/i18nWorkflow/const.ts +19 -0
- package/scripts/i18nWorkflow/genDefaultLocale.ts +19 -0
- package/scripts/i18nWorkflow/genDiff.ts +50 -0
- package/scripts/i18nWorkflow/genResources.ts +26 -0
- package/scripts/i18nWorkflow/index.ts +15 -0
- package/scripts/i18nWorkflow/utils.ts +85 -0
- package/src/config/client.ts +14 -0
- package/src/config/server.ts +5 -0
- package/src/const/layoutTokens.ts +3 -1
- package/src/const/market.ts +15 -0
- package/src/const/settings.ts +2 -1
- package/src/const/url.ts +29 -4
- package/src/features/AgentSetting/AgentConfig/index.tsx +1 -2
- package/src/features/AgentSetting/AgentPlugin/MarketSettingModal.tsx +1 -1
- package/src/features/AgentSetting/store/initialState.ts +1 -1
- package/src/features/MobileTabBar/index.tsx +2 -2
- package/src/features/SideBar/TopActions.tsx +2 -2
- package/src/locales/default/market.ts +12 -0
- package/src/locales/default/setting.ts +1 -0
- package/src/locales/resources/en_US.ts +2 -0
- package/src/locales/resources/ru_RU.ts +2 -0
- package/src/locales/resources/zh_CN.ts +2 -0
- package/src/pages/api/openai/chat.api.ts +6 -10
- package/src/pages/api/openai/createAzureOpenai.ts +13 -9
- package/src/pages/chat/features/Conversation/Input/{Action.tsx → ActionBar/ActionLeft.tsx} +2 -2
- package/src/pages/chat/features/Conversation/Input/ActionBar/ActionRight.tsx +36 -0
- package/src/pages/chat/features/Conversation/Input/Desktop.tsx +40 -0
- package/src/pages/chat/features/Conversation/Input/Footer/SaveTopic.tsx +27 -0
- package/src/pages/chat/features/Conversation/Input/Footer/index.tsx +35 -0
- package/src/pages/chat/features/Conversation/Input/Mobile.tsx +12 -0
- package/src/pages/chat/features/Conversation/Input/index.tsx +20 -38
- package/src/pages/chat/features/SessionList/Header/Desktop.tsx +6 -13
- package/src/pages/chat/features/SessionList/Header/Mobile.tsx +1 -1
- package/src/pages/chat/features/SessionList/List/AddButton.tsx +1 -1
- package/src/pages/chat/features/SessionList/List/Item/index.tsx +4 -3
- package/src/pages/chat/features/SessionList/List/index.tsx +1 -3
- package/src/pages/chat/features/SessionList/Mobile.tsx +2 -12
- package/src/pages/chat/features/SessionSearchBar/index.tsx +26 -0
- package/src/pages/chat/features/Sidebar/Topic/index.tsx +18 -6
- package/src/pages/chat/features/Sidebar/TopicSearchBar/index.tsx +24 -0
- package/src/pages/chat/features/Sidebar/index.tsx +2 -9
- package/src/pages/market/features/AgentCard/AgentCardBanner.tsx +64 -0
- package/src/pages/market/features/AgentCard/AgentCardItem.tsx +57 -0
- package/src/pages/market/features/AgentCard/Loading.tsx +13 -0
- package/src/pages/market/features/AgentCard/index.tsx +37 -0
- package/src/pages/market/features/AgentCard/style.ts +22 -0
- package/src/pages/market/features/AgentSearchBar/index.tsx +26 -0
- package/src/pages/market/features/Header/Desktop.tsx +15 -4
- package/src/pages/market/features/Header/Mobile.tsx +7 -24
- package/src/pages/market/features/SideBar/AgentInfo/Comment.tsx +16 -0
- package/src/pages/market/features/SideBar/AgentInfo/Header.tsx +68 -0
- package/src/pages/market/features/SideBar/AgentInfo/Loading.tsx +61 -0
- package/src/pages/market/features/SideBar/AgentInfo/TokenTag.tsx +25 -0
- package/src/pages/market/features/SideBar/AgentInfo/index.tsx +68 -0
- package/src/pages/market/features/SideBar/AgentInfo/style.ts +46 -0
- package/src/pages/market/features/SideBar/Desktop.tsx +70 -0
- package/src/pages/market/features/SideBar/Mobile.tsx +36 -0
- package/src/pages/market/features/SideBar/index.tsx +23 -0
- package/src/pages/market/features/TagList/index.tsx +29 -0
- package/src/pages/market/index.page.tsx +11 -2
- package/src/pages/market/layout.mobile.tsx +8 -7
- package/src/pages/market/layout.tsx +39 -1
- package/src/pages/settings/features/Header/Desktop.tsx +2 -4
- package/src/pages/settings/features/Header/Mobile.tsx +1 -1
- package/src/pages/settings/features/Settings/Common.tsx +1 -2
- package/src/pages/settings/features/Settings/LLM/index.tsx +12 -1
- package/src/pages/settings/features/Settings/index.tsx +17 -4
- package/src/services/_header.ts +1 -1
- package/src/services/agentMarket.ts +21 -0
- package/src/store/global/initialState.ts +1 -2
- package/src/store/global/selectors.test.ts +0 -1
- package/src/store/market/action.ts +57 -0
- package/src/store/market/index.ts +3 -0
- package/src/store/market/initialState.ts +17 -0
- package/src/store/market/selectors.ts +36 -0
- package/src/store/market/store.ts +51 -0
- package/src/store/session/slices/session/action.ts +5 -3
- package/src/store/session/slices/session/initialState.ts +2 -0
- package/src/store/session/slices/session/reducers/session.test.ts +4 -4
- package/src/types/market.ts +19 -0
- package/src/types/meta.ts +1 -1
- package/src/utils/filter.ts +1 -1
- package/src/utils/findDuplicates.ts +22 -0
- package/scripts/genDefaultLocale.ts +0 -18
- package/scripts/genResources.ts +0 -51
- package/scripts/toc.ts +0 -7
- package/src/components/Empty/index.tsx +0 -63
- package/src/components/Empty/style.ts +0 -31
- package/src/components/SelectWithImg/index.tsx +0 -97
- package/src/components/SelectWithImg/styles.ts +0 -43
- package/src/pages/chat/features/Conversation/Input/ActionRight.tsx +0 -31
- package/src/pages/chat/features/Conversation/Input/Footer.tsx +0 -49
- /package/src/components/{ManifestPreviewer.tsx → ManifestPreviewer/index.tsx} +0 -0
- /package/src/pages/chat/features/Conversation/Input/{Token.tsx → ActionBar/Token.tsx} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,92 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.76.0](https://github.com/lobehub/lobe-chat/compare/v0.75.0...v0.76.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-09-11**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Support Azure OpenAI Deploy env.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Support Azure OpenAI Deploy env, closes [#183](https://github.com/lobehub/lobe-chat/issues/183) ([bda6732](https://github.com/lobehub/lobe-chat/commit/bda6732))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 0.75.0](https://github.com/lobehub/lobe-chat/compare/v0.74.0...v0.75.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-09-11**</sup>
|
|
33
|
+
|
|
34
|
+
#### ♻ Code Refactoring
|
|
35
|
+
|
|
36
|
+
- **misc**: Fefactor index url fetch.
|
|
37
|
+
|
|
38
|
+
#### ✨ Features
|
|
39
|
+
|
|
40
|
+
- **market**: Add prompt token count.
|
|
41
|
+
- **misc**: Add agents market and improve UI components, Add and refactor components for chat input feature, Add functions for generating and analyzing JSON files, generating resource files and table of contents, and formatting console output, Add new settings for Azure OpenAI and OpenAI in locales files, Add new string, create AgentModal component, implement GridCardItem and Loading components, import AgentModal, Add SideBar component, new actions, and update market store state and selectors, Add translations and new setting to "setting.json", Improve functionality and user interface of market page, Modify market features components and update CSS styles, support add agent to chat.
|
|
42
|
+
|
|
43
|
+
#### 🐛 Bug Fixes
|
|
44
|
+
|
|
45
|
+
- **misc**: Fix fetcher, Fix market sidebar scroll and add i18n.
|
|
46
|
+
|
|
47
|
+
#### 💄 Styles
|
|
48
|
+
|
|
49
|
+
- **misc**: Update loading style and compatible with unknown agent identifier.
|
|
50
|
+
|
|
51
|
+
<br/>
|
|
52
|
+
|
|
53
|
+
<details>
|
|
54
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
55
|
+
|
|
56
|
+
#### Code refactoring
|
|
57
|
+
|
|
58
|
+
- **misc**: Fefactor index url fetch ([257584b](https://github.com/lobehub/lobe-chat/commit/257584b))
|
|
59
|
+
|
|
60
|
+
#### What's improved
|
|
61
|
+
|
|
62
|
+
- **market**: Add prompt token count ([16221a7](https://github.com/lobehub/lobe-chat/commit/16221a7))
|
|
63
|
+
- **misc**: Add agents market and improve UI components ([116c136](https://github.com/lobehub/lobe-chat/commit/116c136))
|
|
64
|
+
- **misc**: Add and refactor components for chat input feature ([f1ac9fe](https://github.com/lobehub/lobe-chat/commit/f1ac9fe))
|
|
65
|
+
- **misc**: Add functions for generating and analyzing JSON files, generating resource files and table of contents, and formatting console output ([d7c2e74](https://github.com/lobehub/lobe-chat/commit/d7c2e74))
|
|
66
|
+
- **misc**: Add new settings for Azure OpenAI and OpenAI in locales files ([e9e25b5](https://github.com/lobehub/lobe-chat/commit/e9e25b5))
|
|
67
|
+
- **misc**: Add new string, create AgentModal component, implement GridCardItem and Loading components, import AgentModal ([2a0e59f](https://github.com/lobehub/lobe-chat/commit/2a0e59f))
|
|
68
|
+
- **misc**: Add SideBar component, new actions, and update market store state and selectors ([8f6cfda](https://github.com/lobehub/lobe-chat/commit/8f6cfda))
|
|
69
|
+
- **misc**: Add translations and new setting to "setting.json" ([aca3822](https://github.com/lobehub/lobe-chat/commit/aca3822))
|
|
70
|
+
- **misc**: Improve functionality and user interface of market page ([1d465d6](https://github.com/lobehub/lobe-chat/commit/1d465d6))
|
|
71
|
+
- **misc**: Modify market features components and update CSS styles ([97e4179](https://github.com/lobehub/lobe-chat/commit/97e4179))
|
|
72
|
+
- **misc**: Support add agent to chat ([3b930c4](https://github.com/lobehub/lobe-chat/commit/3b930c4))
|
|
73
|
+
|
|
74
|
+
#### What's fixed
|
|
75
|
+
|
|
76
|
+
- **misc**: Fix fetcher ([171b2da](https://github.com/lobehub/lobe-chat/commit/171b2da))
|
|
77
|
+
- **misc**: Fix market sidebar scroll and add i18n ([9c897d2](https://github.com/lobehub/lobe-chat/commit/9c897d2))
|
|
78
|
+
|
|
79
|
+
#### Styles
|
|
80
|
+
|
|
81
|
+
- **misc**: Update loading style and compatible with unknown agent identifier ([2e2231d](https://github.com/lobehub/lobe-chat/commit/2e2231d))
|
|
82
|
+
|
|
83
|
+
</details>
|
|
84
|
+
|
|
85
|
+
<div align="right">
|
|
86
|
+
|
|
87
|
+
[](#readme-top)
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
|
|
5
91
|
## [Version 0.74.0](https://github.com/lobehub/lobe-chat/compare/v0.73.0...v0.74.0)
|
|
6
92
|
|
|
7
93
|
<sup>Released on **2023-09-11**</sup>
|
package/README.md
CHANGED
|
@@ -16,8 +16,9 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform
|
|
|
16
16
|
|
|
17
17
|
[![release][release-shield]][release-url]
|
|
18
18
|
[![releaseDate][release-date-shield]][release-date-url]
|
|
19
|
+
[![][license-shield]][fossa-license-url]
|
|
19
20
|
[![ciTest][ci-test-shield]][ci-test-url]
|
|
20
|
-
[![ciRelease][ci-release-shield]][ci-release-url]
|
|
21
|
+
[![ciRelease][ci-release-shield]][ci-release-url]<br/>
|
|
21
22
|
[![contributors][contributors-shield]][contributors-url]
|
|
22
23
|
[![forks][forks-shield]][forks-url]
|
|
23
24
|
[![stargazers][stargazers-shield]][stargazers-url]
|
|
@@ -79,7 +80,7 @@ Please be aware that LobeChat is currently under active development,feedback i
|
|
|
79
80
|
- [x] 🔒 **Privacy Protection**: All data is stored locally in the user's browser, ensuring user privacy;
|
|
80
81
|
- [x] 🤖 **Customizable Assistant Roles**: Users can create, share, and debug personalized dialogue assistant roles according to their needs, providing more flexible and personalized dialogue functions;
|
|
81
82
|
- [x] 🌐 **Custom Domain**: If users have their own domain, they can bind it to the platform for quick access to the dialogue assistant from anywhere.
|
|
82
|
-
- [
|
|
83
|
+
- [x] 🏬 **Role Market**: A Role Market is provided where users can select their preferred dialogue assistant roles, enriching the content and style of the dialogue;
|
|
83
84
|
|
|
84
85
|
> **👉 Roadmap:** You can find our upcoming [Roadmap][project-url] plans in the Projects section.
|
|
85
86
|
|
|
@@ -100,7 +101,8 @@ LobeChat provides a [self-hosted version][deploy-url] with Vercel. This allows y
|
|
|
100
101
|
|
|
101
102
|
[![Deploy with Vercel][deploy-button-image]][deploy-url]
|
|
102
103
|
|
|
103
|
-
>
|
|
104
|
+
> **Note**\
|
|
105
|
+
> This project provides some additional configuration items, set with environment variables:
|
|
104
106
|
|
|
105
107
|
| Environment Variable | Required | Description | Example |
|
|
106
108
|
| -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
@@ -136,7 +138,8 @@ If you have deployed your own project following the one-click deployment steps i
|
|
|
136
138
|
|
|
137
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.
|
|
138
140
|
|
|
139
|
-
>
|
|
141
|
+
> **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>.
|
|
140
143
|
|
|
141
144
|
- [@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.
|
|
142
145
|
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat.
|
|
@@ -179,6 +182,10 @@ $ pnpm dev
|
|
|
179
182
|
|
|
180
183
|
Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub [Issues][issues-url] and [Projects][project-url] to get stuck in to show us what you’re made of.
|
|
181
184
|
|
|
185
|
+
[![][pr-welcome-shield]][pr-welcome-url]
|
|
186
|
+
[![][submit-agents-shield]][submit-agents-url]
|
|
187
|
+
[![][submit-plugin-shield]][submit-plugin-url]
|
|
188
|
+
|
|
182
189
|
<!-- CONTRIBUTION GROUP -->
|
|
183
190
|
|
|
184
191
|
> 📊 Total: <kbd>**5**</kbd>
|
|
@@ -221,7 +228,12 @@ Contributions of all types are more than welcome, if you are interested in contr
|
|
|
221
228
|
|
|
222
229
|
---
|
|
223
230
|
|
|
224
|
-
|
|
231
|
+
<details>
|
|
232
|
+
<summary><h4>📝 License</h4></summary>
|
|
233
|
+
|
|
234
|
+
[![][fossa-license-shield]][fossa-license-url]
|
|
235
|
+
|
|
236
|
+
</details>
|
|
225
237
|
|
|
226
238
|
Copyright © 2023 [LobeHub][profile-url]. <br />
|
|
227
239
|
This project is [MIT](./LICENSE) licensed.
|
|
@@ -247,9 +259,12 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
247
259
|
[fc-url]: https://sspai.com/post/81986
|
|
248
260
|
[forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-chat.svg?style=flat
|
|
249
261
|
[forks-url]: https://github.com/lobehub/lobe-chat/network/members
|
|
262
|
+
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
|
|
263
|
+
[fossa-license-url]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
|
|
250
264
|
[gitpod-url]: https://gitpod.io/#https://github.com/lobehub/lobe-chat
|
|
251
265
|
[issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
|
252
266
|
[issues-url]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
|
267
|
+
[license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=shield&issueType=license
|
|
253
268
|
[lobe-assets-github]: https://github.com/lobehub/lobe-assets
|
|
254
269
|
[lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins
|
|
255
270
|
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
|
@@ -263,6 +278,8 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
263
278
|
[lobe-ui-url]: https://www.npmjs.com/package/@lobehub/ui
|
|
264
279
|
[official-shield]: https://img.shields.io/website?down_message=offline&label=🤯%20Try%20LobeChat&up_message=online&url=https%3A%2F%2Flobe-chat.vercel.app&style=for-the-badge
|
|
265
280
|
[official-url]: https://lobe-chat.vercel.app
|
|
281
|
+
[pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-FEE064?style=for-the-badge
|
|
282
|
+
[pr-welcome-url]: https://github.com/lobehub/lobe-chat/pulls
|
|
266
283
|
[profile-url]: https://github.com/lobehub
|
|
267
284
|
[project-url]: https://github.com/lobehub/lobe-chat/projects
|
|
268
285
|
[release-date-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?style=flat
|
|
@@ -271,3 +288,7 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
271
288
|
[release-url]: https://www.npmjs.com/package/@lobehub/chat
|
|
272
289
|
[stargazers-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat.svg?style=flat
|
|
273
290
|
[stargazers-url]: https://github.com/lobehub/lobe-chat/stargazers
|
|
291
|
+
[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-9DFF92?style=for-the-badge
|
|
292
|
+
[submit-agents-url]: https://github.com/lobehub/lobe-chat-agents
|
|
293
|
+
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
|
|
294
|
+
[submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
|
package/README.zh-CN.md
CHANGED
|
@@ -16,6 +16,7 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性
|
|
|
16
16
|
|
|
17
17
|
[![release][release-shield]][release-url]
|
|
18
18
|
[![releaseDate][release-date-shield]][release-date-url]
|
|
19
|
+
[![][license-shield]][fossa-license-url]
|
|
19
20
|
[![ciTest][ci-test-shield]][ci-test-url]
|
|
20
21
|
[![ciRelease][ci-release-shield]][ci-release-url] <br/>
|
|
21
22
|
[![contributors][contributors-shield]][contributors-url]
|
|
@@ -79,7 +80,7 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性
|
|
|
79
80
|
- [x] 🔒 **隐私安全**:所有数据保存在用户浏览器本地,保证用户的隐私安全;
|
|
80
81
|
- [x] 🤖 **自定义助手角色**:用户可以根据自己的需求创建、分享和调试个性化的对话助手角色,提供更加灵活和个性化的对话功能;
|
|
81
82
|
- [x] 🌐 **自定义域名**:如果用户拥有自己的域名,可以将其绑定到平台上,方便在任何地方快速访问对话助手。
|
|
82
|
-
- [
|
|
83
|
+
- [x] 🏬 **角色市场**:提供角色市场,用户可以在市场上选择自己喜欢的对话助手角色,丰富对话的内容和风格;
|
|
83
84
|
|
|
84
85
|
> **👉 Roadmap:** 你可以在 Projects 中找到我们后续的 [Roadmap][project-url] 计划
|
|
85
86
|
|
|
@@ -100,7 +101,8 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-url]。这使你可以在
|
|
|
100
101
|
|
|
101
102
|
[![使用 Vercel 部署][deploy-button-image]][deploy-url]
|
|
102
103
|
|
|
103
|
-
>
|
|
104
|
+
> **Note**\
|
|
105
|
+
> 本项目提供了一些额外的配置项,使用环境变量进行设置:
|
|
104
106
|
|
|
105
107
|
| 环境变量 | 类型 | 描述 | 示例 |
|
|
106
108
|
| ------------------ | ---- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
@@ -136,7 +138,8 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-url]。这使你可以在
|
|
|
136
138
|
|
|
137
139
|
插件提供了扩展 LobeChat [Function Calling][fc-url] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。
|
|
138
140
|
|
|
139
|
-
>
|
|
141
|
+
> **Note**\
|
|
142
|
+
> 插件系统目前正在进行重大开发。您可以在 <https://github.com/lobehub/lobe-chat/issues/97> 中了解更多信息。
|
|
140
143
|
|
|
141
144
|
- [@lobehub/lobe-chat-plugins][lobe-chat-plugins]:这是 LobeChat 的插件索引。它从该仓库的 index.json 中获取插件列表并显示给用户。
|
|
142
145
|
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]:LobeChat 插件 SDK 可帮助您创建出色的 Lobe Chat 插件。
|
|
@@ -179,6 +182,10 @@ $ pnpm dev
|
|
|
179
182
|
|
|
180
183
|
我们非常欢迎各种形式的贡献。如果你对贡献代码感兴趣,可以查看我们的 GitHub [Issues][issues-url] 和 [Projects][project-url],大展身手,向我们展示你的奇思妙想。
|
|
181
184
|
|
|
185
|
+
[![][pr-welcome-shield]][pr-welcome-url]
|
|
186
|
+
[![][submit-agents-shield]][submit-agents-url]
|
|
187
|
+
[![][submit-plugin-shield]][submit-plugin-url]
|
|
188
|
+
|
|
182
189
|
<!-- CONTRIBUTION GROUP -->
|
|
183
190
|
|
|
184
191
|
> 📊 Total: <kbd>**5**</kbd>
|
|
@@ -221,7 +228,12 @@ $ pnpm dev
|
|
|
221
228
|
|
|
222
229
|
---
|
|
223
230
|
|
|
224
|
-
|
|
231
|
+
<details>
|
|
232
|
+
<summary><h4>📝 License</h4></summary>
|
|
233
|
+
|
|
234
|
+
[![][fossa-license-shield]][fossa-license-url]
|
|
235
|
+
|
|
236
|
+
</details>
|
|
225
237
|
|
|
226
238
|
Copyright © 2023 [LobeHub][profile-url]. <br />
|
|
227
239
|
This project is [MIT](./LICENSE) licensed.
|
|
@@ -247,9 +259,12 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
247
259
|
[fc-url]: https://sspai.com/post/81986
|
|
248
260
|
[forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-chat.svg?style=flat
|
|
249
261
|
[forks-url]: https://github.com/lobehub/lobe-chat/network/members
|
|
262
|
+
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
|
|
263
|
+
[fossa-license-url]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
|
|
250
264
|
[gitpod-url]: https://gitpod.io/#https://github.com/lobehub/lobe-chat
|
|
251
265
|
[issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
|
252
266
|
[issues-url]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
|
267
|
+
[license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=shield&issueType=license
|
|
253
268
|
[lobe-assets-github]: https://github.com/lobehub/lobe-assets
|
|
254
269
|
[lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins
|
|
255
270
|
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
|
@@ -263,6 +278,8 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
263
278
|
[lobe-ui-url]: https://www.npmjs.com/package/@lobehub/ui
|
|
264
279
|
[official-shield]: https://img.shields.io/website?down_message=offline&label=🤯%20Try%20LobeChat&up_message=online&url=https%3A%2F%2Flobe-chat.vercel.app&style=for-the-badge
|
|
265
280
|
[official-url]: https://lobe-chat.vercel.app
|
|
281
|
+
[pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-FEE064?style=for-the-badge
|
|
282
|
+
[pr-welcome-url]: https://github.com/lobehub/lobe-chat/pulls
|
|
266
283
|
[profile-url]: https://github.com/lobehub
|
|
267
284
|
[project-url]: https://github.com/lobehub/lobe-chat/projects
|
|
268
285
|
[release-date-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?style=flat
|
|
@@ -271,3 +288,7 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
271
288
|
[release-url]: https://www.npmjs.com/package/@lobehub/chat
|
|
272
289
|
[stargazers-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat.svg?style=flat
|
|
273
290
|
[stargazers-url]: https://github.com/lobehub/lobe-chat/stargazers
|
|
291
|
+
[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-9DFF92?style=for-the-badge
|
|
292
|
+
[submit-agents-url]: https://github.com/lobehub/lobe-chat-agents
|
|
293
|
+
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
|
|
294
|
+
[submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 使用 Azure OpenAI 部署
|
|
2
|
+
|
|
3
|
+
LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型服务商,本文将介绍如何配置 Azure OpenAI。
|
|
4
|
+
|
|
5
|
+
## 使用限制
|
|
6
|
+
|
|
7
|
+
从研发成本考虑([#178][rfc]),目前阶段的 LobeChat 并没有 100% 完全符合 Azure OpenAI 的实现模型,采用了以 `openai` 为基座,兼容 Azure OpeAI 的解决方案。因此会带来以下局限性:
|
|
8
|
+
|
|
9
|
+
- OpenAI 与 Azure OpenAI 只能二选一,当你开启使用 Azure OpenAI 后,将无法使用 OpenAI 作为模型服务商;
|
|
10
|
+
- LobeChat 约定了与模型同名的部署名才能正常使用,比如 `gpt-35-turbo` 模型的部署名,必须为 `gpt-35-turbo`,否则 LobeChat 将无法正常正确匹配到相应模型
|
|
11
|
+

|
|
12
|
+
- 由于 Azure OpenAI 的 SDK 接入复杂度,当前无法查询配置资源的模型列表;
|
|
13
|
+
|
|
14
|
+
## 在界面中配置
|
|
15
|
+
|
|
16
|
+
点击左下角「操作」 -「设置」,切到 「语言模型」 Tab 后通过开启「Azure OpenAI」开关,即可开启使用 Azure OpenAI。
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
你按需填写相应的配置项:
|
|
21
|
+
|
|
22
|
+
- **APIKey**:你在 Azure OpenAI 账户页面申请的 API 密钥,可在“密钥和终结点”部分中找到此值
|
|
23
|
+
- **API 地址**:Azure API 地址,从 Azure 门户检查资源时,可在“密钥和终结点”部分中找到此值
|
|
24
|
+
- **Azure Api Version**: Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本][azure-api-verion-url]
|
|
25
|
+
|
|
26
|
+
完成上述字段配置后,点击「检查」,如果提示「检查通过」,则说明配置成功。
|
|
27
|
+
|
|
28
|
+
## 在部署时配置
|
|
29
|
+
|
|
30
|
+
如果你希望部署的版本直接配置好 Azure OpenAI,让终端用户直接使用,那么你需要在部署时配置以下环境变量:
|
|
31
|
+
|
|
32
|
+
| 环境变量 | 类型 | 描述 | 默认值 | 示例 |
|
|
33
|
+
| ------------------- | ---- | ------------------------------------------------------------------------- | ------------------ | -------------------------------------------------- |
|
|
34
|
+
| `USE_AZURE_OPENAI` | 必选 | 设置改值为 `1` 开启 Azure OpenAI 配置 | - | `1` |
|
|
35
|
+
| `AZURE_API_KEY` | 必选 | 这是你在 Azure OpenAI 账户页面申请的 API 密钥 | - | `c55168be3874490ef0565d9779ecd5a6` |
|
|
36
|
+
| `OPENAI_PROXY_URL` | 必选 | Azure API 地址,从 Azure 门户检查资源时,可在“密钥和终结点”部分中找到此值 | - | `https://docs-test-001.openai.azure.com` |
|
|
37
|
+
| `AZURE_API_VERSION` | 可选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式 | 2023-08-01-preview | `2023-05-15`,查阅[最新版本][azure-api-verion-url] |
|
|
38
|
+
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,密码应为 6 位数字或字母 | - | `awCT74` 或 `e3@09!` |
|
|
39
|
+
|
|
40
|
+
> **Note**\
|
|
41
|
+
> 当你在服务端开启 `USE_AZURE_OPENAI` 后,用户将无法在前端配置中修改并使用 OpenAI key。
|
|
42
|
+
|
|
43
|
+
[azure-api-verion-url]: https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions
|
|
44
|
+
[azure-openai-url]: https://learn.microsoft.com/zh-cn/azure/ai-services/openai/concepts/models
|
|
45
|
+
[rfc]: https://github.com/lobehub/lobe-chat/discussions/178
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"addAgent": "Add Assistant",
|
|
3
|
+
"search": {
|
|
4
|
+
"placeholder": "Search assistant name, description or keywords..."
|
|
5
|
+
},
|
|
6
|
+
"sidebar": {
|
|
7
|
+
"comment": "Comments",
|
|
8
|
+
"prompt": "Prompts",
|
|
9
|
+
"title": "Assistant Details"
|
|
10
|
+
},
|
|
11
|
+
"submitAgent": "Submit Assistant"
|
|
12
|
+
}
|
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
"list": {
|
|
85
85
|
"item": {
|
|
86
86
|
"local.config": "Configuration",
|
|
87
|
-
"local.title": "Local"
|
|
87
|
+
"local.title": "Local",
|
|
88
|
+
"deprecated.title": "Deleted"
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
"loading": {
|
|
@@ -113,5 +114,13 @@
|
|
|
113
114
|
"title": "Weather Data for the Next 7 Days ({{city}})",
|
|
114
115
|
"updateAt": "Last Updated"
|
|
115
116
|
},
|
|
116
|
-
"responseData": "Response Data"
|
|
117
|
+
"responseData": "Response Data",
|
|
118
|
+
"settings": {
|
|
119
|
+
"indexUrl": {
|
|
120
|
+
"title": "Marketplace Index",
|
|
121
|
+
"tooltip": "Editing is not supported at the moment"
|
|
122
|
+
},
|
|
123
|
+
"modalDesc": "After configuring the address of the plugin marketplace, you can use a custom plugin marketplace",
|
|
124
|
+
"title": "Configure Plugin Marketplace"
|
|
125
|
+
}
|
|
117
126
|
}
|
|
@@ -189,7 +189,9 @@
|
|
|
189
189
|
"title": "Plugin List",
|
|
190
190
|
"add": "Add",
|
|
191
191
|
"addTooltip": "Add custom plugin",
|
|
192
|
-
"config": "{{id}} Plugin Configuration"
|
|
192
|
+
"config": "{{id}} Plugin Configuration",
|
|
193
|
+
"clearDeprecated": "Remove Deprecated Plugins",
|
|
194
|
+
"settings": "Plugin Marketplace Settings"
|
|
193
195
|
},
|
|
194
196
|
"settingSystem": {
|
|
195
197
|
"accessCode": {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"addAgent": "Добавить агента",
|
|
3
|
+
"search": {
|
|
4
|
+
"placeholder": "Введите название или ключевое слово помощника..."
|
|
5
|
+
},
|
|
6
|
+
"sidebar": {
|
|
7
|
+
"comment": "Комментарии",
|
|
8
|
+
"prompt": "Подсказка",
|
|
9
|
+
"title": "Детали агента"
|
|
10
|
+
},
|
|
11
|
+
"submitAgent": "Отправить агента"
|
|
12
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"debug": {
|
|
3
|
-
"arguments": "Аргументы",
|
|
3
|
+
"arguments": "Аргументы вызова",
|
|
4
4
|
"function_call": "Вызов функции",
|
|
5
5
|
"response": "Ответ"
|
|
6
6
|
},
|
|
7
7
|
"dev": {
|
|
8
|
-
"confirmDeleteDevPlugin": "Вы
|
|
8
|
+
"confirmDeleteDevPlugin": "Вы собираетесь удалить этот локальный плагин. После удаления его будет невозможно восстановить. Вы уверены, что хотите удалить этот плагин?",
|
|
9
9
|
"deleteSuccess": "Плагин успешно удален",
|
|
10
10
|
"manifest": {
|
|
11
11
|
"identifier": {
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"label": "Идентификатор"
|
|
14
14
|
},
|
|
15
15
|
"mode": {
|
|
16
|
-
"local": "Визуальная
|
|
17
|
-
"local-tooltip": "Визуальная
|
|
16
|
+
"local": "Визуальная настройка",
|
|
17
|
+
"local-tooltip": "Визуальная настройка временно недоступна",
|
|
18
18
|
"url": "Онлайн-ссылка"
|
|
19
19
|
},
|
|
20
20
|
"name": {
|
|
21
|
-
"desc": "
|
|
22
|
-
"label": "
|
|
23
|
-
"placeholder": "
|
|
21
|
+
"desc": "Заголовок плагина",
|
|
22
|
+
"label": "Заголовок",
|
|
23
|
+
"placeholder": "Поиск в поисковой системе"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"meta": {
|
|
@@ -29,83 +29,78 @@
|
|
|
29
29
|
"label": "Автор"
|
|
30
30
|
},
|
|
31
31
|
"avatar": {
|
|
32
|
-
"desc": "Иконка плагина,
|
|
32
|
+
"desc": "Иконка плагина, можно использовать Emoji или URL",
|
|
33
33
|
"label": "Иконка"
|
|
34
34
|
},
|
|
35
35
|
"description": {
|
|
36
36
|
"desc": "Описание плагина",
|
|
37
37
|
"label": "Описание",
|
|
38
|
-
"placeholder": "Получение информации из
|
|
38
|
+
"placeholder": "Получение информации из поисковой системы"
|
|
39
39
|
},
|
|
40
|
-
"formFieldRequired": "Это поле
|
|
40
|
+
"formFieldRequired": "Это обязательное поле",
|
|
41
41
|
"homepage": {
|
|
42
42
|
"desc": "Домашняя страница плагина",
|
|
43
|
-
"label": "
|
|
43
|
+
"label": "Домашняя страница"
|
|
44
44
|
},
|
|
45
45
|
"identifier": {
|
|
46
|
-
"desc": "Уникальный идентификатор плагина,
|
|
47
|
-
"errorDuplicate": "Идентификатор уже используется другим
|
|
46
|
+
"desc": "Уникальный идентификатор плагина, будет автоматически определен из манифеста",
|
|
47
|
+
"errorDuplicate": "Идентификатор уже используется другим плагином. Пожалуйста, измените идентификатор",
|
|
48
48
|
"label": "Идентификатор",
|
|
49
|
-
"pattenErrorMessage": "
|
|
49
|
+
"pattenErrorMessage": "Можно вводить только латинские буквы, цифры, - и _"
|
|
50
50
|
},
|
|
51
51
|
"manifest": {
|
|
52
|
-
"desc": "LobeChat
|
|
53
|
-
"
|
|
54
|
-
"label": "URL-адрес
|
|
55
|
-
"
|
|
52
|
+
"desc": "LobeChat будет устанавливать плагин по этой ссылке",
|
|
53
|
+
"jsonInvalid": "Манифест не соответствует стандарту. Результат проверки: \n\n {{error}}",
|
|
54
|
+
"label": "URL-адрес описания плагина",
|
|
55
|
+
"preview": "Предварительный просмотр манифеста",
|
|
56
|
+
"refresh": "Обновить",
|
|
57
|
+
"requestError": "Не удалось получить данные по этой ссылке. Пожалуйста, введите действительную ссылку и проверьте, разрешен ли кросс-доменный доступ",
|
|
58
|
+
"urlError": "Ссылка не возвращает данные в формате JSON. Пожалуйста, введите действительную ссылку"
|
|
56
59
|
},
|
|
57
60
|
"title": {
|
|
58
|
-
"desc": "
|
|
59
|
-
"label": "
|
|
60
|
-
"placeholder": "
|
|
61
|
+
"desc": "Заголовок плагина",
|
|
62
|
+
"label": "Заголовок",
|
|
63
|
+
"placeholder": "Поиск в поисковой системе"
|
|
61
64
|
}
|
|
62
65
|
},
|
|
63
|
-
"metaConfig": "
|
|
64
|
-
"modalDesc": "После добавления пользовательского плагина его можно использовать для проверки разработки
|
|
66
|
+
"metaConfig": "Настройка метаданных плагина",
|
|
67
|
+
"modalDesc": "После добавления пользовательского плагина его можно использовать для проверки разработки плагинов или непосредственно в сеансе. См. документацию по разработке плагинов",
|
|
65
68
|
"preview": {
|
|
66
|
-
"card": "Предварительный просмотр
|
|
69
|
+
"card": "Предварительный просмотр плагина",
|
|
67
70
|
"desc": "Предварительный просмотр описания плагина",
|
|
68
71
|
"title": "Предварительный просмотр имени плагина"
|
|
69
72
|
},
|
|
70
73
|
"save": "Сохранить",
|
|
71
74
|
"saveSuccess": "Настройки плагина успешно сохранены",
|
|
72
75
|
"tabs": {
|
|
73
|
-
"manifest": "Описание
|
|
76
|
+
"manifest": "Описание функций (Манифест)",
|
|
74
77
|
"meta": "Метаданные плагина"
|
|
75
78
|
},
|
|
76
|
-
"title": "Добавить пользовательский плагин"
|
|
79
|
+
"title": "Добавить пользовательский плагин",
|
|
80
|
+
"update": "Обновить",
|
|
81
|
+
"updateSuccess": "Настройки плагина успешно обновлены"
|
|
77
82
|
},
|
|
78
83
|
"list": {
|
|
79
84
|
"item": {
|
|
80
|
-
"
|
|
81
|
-
"local.
|
|
85
|
+
"deprecated.title": "Удалено",
|
|
86
|
+
"local.config": "Настройка",
|
|
87
|
+
"local.title": "Пользовательский"
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
90
|
"loading": {
|
|
85
|
-
"content": "
|
|
86
|
-
"plugin": "
|
|
91
|
+
"content": "Получение данных...",
|
|
92
|
+
"plugin": "Выполнение плагина..."
|
|
87
93
|
},
|
|
88
94
|
"pluginList": "Список плагинов",
|
|
89
95
|
"plugins": {
|
|
90
|
-
"
|
|
91
|
-
"searchEngine": "Поисковая система",
|
|
92
|
-
"undefined": "Обнаружение плагина...",
|
|
93
|
-
"websiteCrawler": "Website Crawler",
|
|
94
|
-
"неизвестно": "Идет обнаружение плагина..."
|
|
96
|
+
"unknown": "Проверка плагинов..."
|
|
95
97
|
},
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"dayweather": "Погода в дневное время",
|
|
101
|
-
"Дневной ветер": "Дневной ветер",
|
|
102
|
-
"nighttemp_float": "Температура в ночное время",
|
|
103
|
-
"nightweather": "Погода в ночное время",
|
|
104
|
-
"ночной ветер": "Ночной ветер",
|
|
105
|
-
"week": "Неделя"
|
|
98
|
+
"settings": {
|
|
99
|
+
"indexUrl": {
|
|
100
|
+
"title": "Индекс рынка",
|
|
101
|
+
"tooltip": "Редактирование в настоящее время недоступно"
|
|
106
102
|
},
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
}
|
|
110
|
-
"responseData": "Ответные данные"
|
|
103
|
+
"modalDesc": "После настройки адреса рынка плагинов можно использовать пользовательский рынок плагинов",
|
|
104
|
+
"title": "Настройки рынка плагинов"
|
|
105
|
+
}
|
|
111
106
|
}
|
|
@@ -189,7 +189,9 @@
|
|
|
189
189
|
"title": "Список плагинов",
|
|
190
190
|
"add": "Добавить",
|
|
191
191
|
"addTooltip": "Добавить кастомный плагин",
|
|
192
|
-
"config": "{{id}} Конфигурация плагина"
|
|
192
|
+
"config": "{{id}} Конфигурация плагина",
|
|
193
|
+
"clearDeprecated": "Удалить недействительные плагины",
|
|
194
|
+
"settings": "Настройки плагинов"
|
|
193
195
|
},
|
|
194
196
|
"settingSystem": {
|
|
195
197
|
"accessCode": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"import": "导入配置",
|
|
37
37
|
"inbox": {
|
|
38
38
|
"defaultMessage": "你好,我是你的智能助手,你可以问我任何问题,我会尽力回答你。如果需要获得更加专业或定制的助手,可以点击<kbd>+</kbd>创建自定义助手",
|
|
39
|
-
"desc": "
|
|
39
|
+
"desc": "开启大脑集群,激发思维火花。你的智能助理,在这里与你交流一切",
|
|
40
40
|
"title": "随便聊聊"
|
|
41
41
|
},
|
|
42
42
|
"message": {
|