@lobehub/chat 0.101.6 → 0.102.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/.i18nrc.js +1 -1
- package/CHANGELOG.md +50 -0
- package/README.md +38 -4
- package/README.zh-CN.md +41 -9
- package/__mocks__/zustand/traditional.ts +4 -4
- package/locales/en_US/chat.json +11 -1
- package/locales/en_US/error.json +6 -0
- package/locales/en_US/setting.json +40 -1
- package/locales/ja_JP/chat.json +11 -1
- package/locales/ja_JP/error.json +6 -0
- package/locales/ja_JP/setting.json +40 -1
- package/locales/ko_KR/chat.json +11 -1
- package/locales/ko_KR/error.json +6 -0
- package/locales/ko_KR/setting.json +40 -1
- package/locales/ru_RU/chat.json +11 -1
- package/locales/ru_RU/error.json +6 -0
- package/locales/ru_RU/setting.json +40 -1
- package/locales/zh_CN/chat.json +10 -1
- package/locales/zh_CN/error.json +6 -0
- package/locales/zh_CN/setting.json +36 -1
- package/locales/zh_TW/chat.json +11 -1
- package/locales/zh_TW/error.json +6 -0
- package/locales/zh_TW/setting.json +40 -1
- package/next.config.mjs +2 -20
- package/package.json +4 -3
- package/src/app/api/openai/chat/route.ts +5 -41
- package/src/app/api/openai/{createAzureOpenai.ts → createBizOpenAI/createAzureOpenai.ts} +1 -1
- package/src/app/api/openai/{createOpenai.ts → createBizOpenAI/createOpenai.ts} +1 -1
- package/src/app/api/openai/createBizOpenAI/index.ts +46 -0
- package/src/app/api/openai/models/route.ts +1 -1
- package/src/app/api/openai/stt/route.ts +29 -0
- package/src/app/api/openai/tts/route.ts +17 -0
- package/src/app/api/tts/edge-speech/route.ts +9 -0
- package/src/app/api/tts/microsoft-speech/route.ts +9 -0
- package/src/app/chat/(desktop)/features/ChatHeader.tsx +3 -2
- package/src/app/chat/(desktop)/features/ChatInput/Footer.tsx +62 -0
- package/src/app/chat/(desktop)/features/ChatInput/index.tsx +0 -1
- package/src/app/chat/(desktop)/features/SessionHeader.tsx +2 -2
- package/src/app/chat/(desktop)/features/SideBar.tsx +7 -1
- package/src/app/chat/(mobile)/features/ChatHeader.tsx +29 -11
- package/src/app/chat/(mobile)/features/ChatInput/Mobile.tsx +20 -4
- package/src/app/chat/features/ChatHeader/ShareButton/index.tsx +23 -15
- package/src/app/chat/features/ChatInput/ActionBar/config.ts +16 -6
- package/src/app/chat/features/ChatInput/ActionBar/index.tsx +40 -16
- package/src/app/chat/features/ChatInput/STT/index.tsx +146 -0
- package/src/app/chat/features/ChatInput/Topic/index.tsx +1 -3
- package/src/app/chat/features/Conversation/ChatList/Actions/Assistant.tsx +2 -2
- package/src/app/chat/features/Conversation/ChatList/Actions/User.tsx +2 -2
- package/src/app/chat/features/Conversation/ChatList/Actions/customAction.ts +9 -2
- package/src/app/chat/features/Conversation/ChatList/Actions/index.ts +8 -1
- package/src/app/chat/features/Conversation/ChatList/Extras/Assistant.tsx +33 -27
- package/src/app/chat/features/Conversation/ChatList/Extras/AudioPlayer.tsx +139 -0
- package/src/app/chat/features/Conversation/ChatList/Extras/ExtraContainer.tsx +13 -0
- package/src/app/chat/features/Conversation/ChatList/Extras/TTS.tsx +122 -0
- package/src/app/chat/features/Conversation/ChatList/Extras/User.tsx +18 -11
- package/src/app/chat/settings/features/HeaderContent.tsx +6 -4
- package/src/app/chat/settings/features/SubmitAgentButton/index.tsx +2 -3
- package/src/app/settings/features/SideBar/List.tsx +2 -1
- package/src/app/settings/features/SideBar/index.tsx +1 -1
- package/src/app/settings/features/UpgradeAlert.tsx +1 -1
- package/src/app/settings/tts/TTS/index.tsx +73 -0
- package/src/app/settings/tts/TTS/options.ts +30 -0
- package/src/app/settings/tts/index.tsx +21 -0
- package/src/app/settings/tts/layout.tsx +1 -0
- package/src/app/settings/tts/page.tsx +3 -0
- package/src/components/HotKeys/index.tsx +4 -7
- package/src/const/layoutTokens.ts +3 -0
- package/src/const/settings.ts +22 -1
- package/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx +119 -0
- package/src/features/AgentSetting/AgentTTS/index.tsx +115 -0
- package/src/features/AgentSetting/AgentTTS/options.ts +16 -0
- package/src/features/AgentSetting/index.tsx +2 -1
- package/src/hooks/useSTT.ts +61 -0
- package/src/hooks/useTTS.ts +87 -0
- package/src/locales/default/chat.ts +10 -1
- package/src/locales/default/error.ts +6 -0
- package/src/locales/default/setting.ts +35 -1
- package/src/services/_url.ts +7 -0
- package/src/store/global/initialState.ts +1 -0
- package/src/store/global/selectors/settings.test.ts +32 -0
- package/src/store/global/selectors/settings.ts +9 -1
- package/src/store/session/slices/agentConfig/selectors.ts +9 -0
- package/src/store/session/slices/chat/actions/translate.ts +24 -1
- package/src/store/session/slices/chat/selectors/utils.test.ts +16 -0
- package/src/store/session/slices/session/reducers/session.test.ts +24 -0
- package/src/types/chatMessage.ts +6 -0
- package/src/types/session.ts +17 -0
- package/src/types/settings.ts +13 -2
- package/src/app/chat/(mobile)/features/ChatInput/style.mobile.ts +0 -19
package/.i18nrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.102.0](https://github.com/lobehub/lobe-chat/compare/v0.101.7...v0.102.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-11-19**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Support TTS & STT.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Support TTS & STT, closes [#443](https://github.com/lobehub/lobe-chat/issues/443) ([4fa2ef4](https://github.com/lobehub/lobe-chat/commit/4fa2ef4))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.101.7](https://github.com/lobehub/lobe-chat/compare/v0.101.6...v0.101.7)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-11-18**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Agent details sidebar and market page height overflow.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Agent details sidebar and market page height overflow ([71a54cc](https://github.com/lobehub/lobe-chat/commit/71a54cc))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.101.6](https://github.com/lobehub/lobe-chat/compare/v0.101.5...v0.101.6)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-11-17**</sup>
|
package/README.md
CHANGED
|
@@ -123,7 +123,13 @@ Beside these features, LobeChat also have much better basic technique undergroun
|
|
|
123
123
|
|
|
124
124
|
By establishing a versatile plugin system, ChatGPT becomes capable of delivering real-time news updates and enhancing your ability to interact with documents and e-commerce data more effectively. This extended functionality positions ChatGPT as a valuable resource across diverse domains. If you have an interest in creating plugins, we offer comprehensive component development documentation, software development kits (SDKs), and pre-made templates in the [🧩 Plugin System](#-plugins) section below. Join us in our collective efforts to empower ChatGPT, making it both more potent and user-friendly.
|
|
125
125
|
|
|
126
|
-
<
|
|
126
|
+
<https://github.com/lobehub/lobe-chat/assets/28616219/f29475a3-f346-4196-a435-41a6373ab9e2>
|
|
127
|
+
|
|
128
|
+
<div align="right">
|
|
129
|
+
|
|
130
|
+
[![][back-to-top]](#readme-top)
|
|
131
|
+
|
|
132
|
+
</div>
|
|
127
133
|
|
|
128
134
|

|
|
129
135
|
|
|
@@ -135,16 +141,20 @@ In our agent market. We have accumulated a large number of practical, prompt age
|
|
|
135
141
|
|
|
136
142
|
| Recent Submits | Description |
|
|
137
143
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
144
|
+
| [Short Video Script Assistant](https://chat-preview.lobehub.com/market?agent=tik-tok-director)<br/><sup>By **[aihoom](https://github.com/aihoom)** on **2023-11-17**</sup> | Designed to help users write engaging and trendy short video scripts<br/>`short-video` `tkitok` `screenwriter` |
|
|
138
145
|
| [Expert Agent Mentor](https://chat-preview.lobehub.com/market?agent=co-agent)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2023-11-16**</sup> | Call on expert agents perfectly suited for the task to support your goals<br/>`task-guidance` `execution-plan` `communication` `support` |
|
|
139
146
|
| [Full-stack Developer](https://chat-preview.lobehub.com/market?agent=fs-dev)<br/><sup>By **[cloverfield11](https://github.com/cloverfield11)** on **2023-11-15**</sup> | Full-stack web developer with experience in HTML, CSS, JavaScript, Python, Java, Ruby, and frameworks such as React, Angular, Vue.js, Express, Django, Next.js, Flask, or Ruby on Rails. Experience in databases, application architecture, security, and testing.<br/>`web-development` `front-end` `back-end` `programming` `databases` |
|
|
140
147
|
| [Graphic Creative Master](https://chat-preview.lobehub.com/market?agent=graphic-creativity)<br/><sup>By **[yingxirz](https://github.com/yingxirz)** on **2023-11-15**</sup> | Specializes in graphic creative design and graphic creativity<br/>`graphic` `creative` `design` `graphic-design` |
|
|
141
|
-
| [Expert Agent Mentor](https://chat-preview.lobehub.com/market?agent=synapse-co-r)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2023-11-15**</sup> | Call on expert agents perfectly suited for the task to support your goals<br/>`task-guidance` `execution-plan` `communication` `support` |
|
|
142
148
|
|
|
143
149
|
> 📊 Total agents: [<kbd>**48**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
144
150
|
|
|
145
151
|
<!-- AGENT LIST -->
|
|
146
152
|
|
|
147
|
-
<
|
|
153
|
+
<div align="right">
|
|
154
|
+
|
|
155
|
+
[![][back-to-top]](#readme-top)
|
|
156
|
+
|
|
157
|
+
</div>
|
|
148
158
|
|
|
149
159
|

|
|
150
160
|
|
|
@@ -161,7 +171,11 @@ Utilize the Progressive Web Application ([PWA](https://support.google.com/chrome
|
|
|
161
171
|
> - In the upper right corner of the address bar, click on the <kbd>Install</kbd> icon.
|
|
162
172
|
> - Follow the instructions on the screen to complete the PWA Installation.
|
|
163
173
|
|
|
164
|
-
<
|
|
174
|
+
<div align="right">
|
|
175
|
+
|
|
176
|
+
[![][back-to-top]](#readme-top)
|
|
177
|
+
|
|
178
|
+
</div>
|
|
165
179
|
|
|
166
180
|

|
|
167
181
|
|
|
@@ -169,12 +183,28 @@ Utilize the Progressive Web Application ([PWA](https://support.google.com/chrome
|
|
|
169
183
|
|
|
170
184
|
LobeChat offers two unique theme modes - Light Mode and Dark Mode, as well as rich color customization options to meet your personalized needs. By default, our themes will intelligently switch based on your system settings, but if you prefer manual control, you can easily switch in the settings. <br/>
|
|
171
185
|
|
|
186
|
+
<div align="right">
|
|
187
|
+
|
|
188
|
+
[![][back-to-top]](#readme-top)
|
|
189
|
+
|
|
190
|
+
</div>
|
|
191
|
+
|
|
172
192
|

|
|
173
193
|
|
|
174
194
|
#### `5` Mobile Device Adaptation
|
|
175
195
|
|
|
176
196
|
We have carried out a series of optimization designs for mobile devices to enhance the user's mobile experience. Currently, we are iterating on the mobile user experience to achieve smoother and more intuitive interactions. If you have any suggestions or ideas, we welcome you to provide feedback through GitHub Issues or Pull Requests.
|
|
177
197
|
|
|
198
|
+
<div align="right">
|
|
199
|
+
|
|
200
|
+
[![][back-to-top]](#readme-top)
|
|
201
|
+
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
#### `6` Visual Model Support
|
|
205
|
+
|
|
206
|
+
We have support [`gpt-4-vision`](https://platform.openai.com/docs/guides/vision) model.You can just upload, drag/drop or just paste your image to chat.
|
|
207
|
+
|
|
178
208
|
> 🚧 Additional snapshots and demonstrations are being progressively added...
|
|
179
209
|
|
|
180
210
|
<div align="right">
|
|
@@ -287,6 +317,7 @@ This project provides some additional configuration items set with environment v
|
|
|
287
317
|
| NPM | Repository | Description | Version |
|
|
288
318
|
| ------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
289
319
|
| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | Lobe UI is an open-source UI component library dedicated to building AIGC web applications. | [![][lobe-ui-shield]][lobe-ui-link] |
|
|
320
|
+
| [@lobehub/tts][lobe-tts-link] | [lobehub/lobe-tts][lobe-tts-github] | Lobe TTS is a high-quality & reliable TTS/STT React Hooks library | [![][lobe-tts-shield]][lobe-tts-link] |
|
|
290
321
|
| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | LobeLint provides configurations for ESlint, Stylelint, Commitlint, Prettier, Remark, and Semantic Release for LobeHub. | [![][lobe-lint-shield]][lobe-lint-link] |
|
|
291
322
|
| @lobehub/assets | [lobehub/assets][lobe-assets-github] | Logo assets, favicons, webfonts for LobeHub. | |
|
|
292
323
|
|
|
@@ -453,6 +484,9 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
453
484
|
[lobe-lint-link]: https://www.npmjs.com/package/@lobehub/lint
|
|
454
485
|
[lobe-lint-shield]: https://img.shields.io/npm/v/@lobehub/lint?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
455
486
|
[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme
|
|
487
|
+
[lobe-tts-github]: https://github.com/lobehub/lobe-tts
|
|
488
|
+
[lobe-tts-link]: https://www.npmjs.com/package/@lobehub/tts
|
|
489
|
+
[lobe-tts-shield]: https://img.shields.io/npm/v/@lobehub/tts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
456
490
|
[lobe-ui-github]: https://github.com/lobehub/lobe-ui
|
|
457
491
|
[lobe-ui-link]: https://www.npmjs.com/package/@lobehub/ui
|
|
458
492
|
[lobe-ui-shield]: https://img.shields.io/npm/v/@lobehub/ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
package/README.zh-CN.md
CHANGED
|
@@ -121,34 +121,44 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
|
|
|
121
121
|
|
|
122
122
|
通过构建强大的插件生态,ChatGPT 不仅能够实时获取最新新闻,还能助你一臂之力,轻松查询文档、访问各大电商数据。这使得 ChatGPT 在更广泛的领域中发挥其关键作用。如果你对编写插件有所兴趣,我们在下文的 [🧩 插件体系](#-插件体系) 中提供了详尽的组件开发文档、SDK、以及样板文件,让我们一起让助手变得更加好用和强大~
|
|
123
123
|
|
|
124
|
-
<
|
|
124
|
+
<https://github.com/lobehub/lobe-chat/assets/28616219/f29475a3-f346-4196-a435-41a6373ab9e2>
|
|
125
|
+
|
|
126
|
+
<div align="right">
|
|
127
|
+
|
|
128
|
+
[![][back-to-top]](#readme-top)
|
|
129
|
+
|
|
130
|
+
</div>
|
|
125
131
|
|
|
126
132
|

|
|
127
133
|
|
|
128
|
-
#### `2`
|
|
134
|
+
#### `2` 助手市场
|
|
129
135
|
|
|
130
|
-
|
|
136
|
+
在我们的助手市场中,我们积累了大量实用的助手,这些都是在日常工作和学习中得到实际应用的。你也可以在这里分享你的助手,与更多的人一起迭代和优化你的助手提示词。你可以通过 [🤖/🏪 提交助手][submit-agents-link] 来提交你的助手,我们构建的自动化 i18n 工作流将会自动将你的助手翻译成多语言版本,让多语种用户都能享受到你的智慧成果。
|
|
131
137
|
|
|
132
138
|
<!-- AGENT LIST -->
|
|
133
139
|
|
|
134
140
|
| 最近新增 | 助手说明 |
|
|
135
141
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| [短视频脚本助手](https://chat-preview.lobehub.com/market?agent=tik-tok-director)<br/><sup>By **[aihoom](https://github.com/aihoom)** on **2023-11-17**</sup> | 旨在帮助用户编写吸引人、潮流的短视频剧本<br/>`短视频` `tkitok` `编剧` |
|
|
136
143
|
| [专家代理人导师](https://chat-preview.lobehub.com/market?agent=co-agent)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2023-11-16**</sup> | 调用完全适合任务的专家代理人来支持您的目标<br/>`任务指导` `执行计划` `沟通` `支持` |
|
|
137
144
|
| [全栈开发人员](https://chat-preview.lobehub.com/market?agent=fs-dev)<br/><sup>By **[cloverfield11](https://github.com/cloverfield11)** on **2023-11-15**</sup> | 具有 HTML、CSS、JavaScript、Python、Java、Ruby 和 React、Angular、Vue.js、Express、Django、Next.js、Flask 或 Ruby on Rails 框架经验的全栈 Web 开发人员。具备数据库、应用架构、安全性和测试经验。<br/>`web开发` `前端` `后端` `编程` `数据库` |
|
|
138
145
|
| [图形创意大师](https://chat-preview.lobehub.com/market?agent=graphic-creativity)<br/><sup>By **[yingxirz](https://github.com/yingxirz)** on **2023-11-15**</sup> | 擅长平面创意设计与图形创意<br/>`图形` `创意` `设计` `平面` |
|
|
139
|
-
| [专家代理人导师](https://chat-preview.lobehub.com/market?agent=synapse-co-r)<br/><sup>By **[tcmonster](https://github.com/tcmonster)** on **2023-11-15**</sup> | 调用完全适合任务的专家代理人来支持您的目标<br/>`任务指导` `执行计划` `沟通` `支持` |
|
|
140
146
|
|
|
141
147
|
> 📊 Total agents: [<kbd>**48**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
142
148
|
|
|
143
149
|
<!-- AGENT LIST -->
|
|
144
150
|
|
|
145
|
-
<
|
|
151
|
+
<div align="right">
|
|
152
|
+
|
|
153
|
+
[![][back-to-top]](#readme-top)
|
|
154
|
+
|
|
155
|
+
</div>
|
|
146
156
|
|
|
147
157
|

|
|
148
158
|
|
|
149
159
|
#### `3` PWA 渐进式 Web 应用
|
|
150
160
|
|
|
151
|
-
|
|
161
|
+
我们利用了渐进式 Web 应用 [PWA](https://support.google.com/chrome/answer/9658361) 技术,使得您可在电脑或移动设备上实现接近原生的 LobeChat 体验。
|
|
152
162
|
|
|
153
163
|
> \[!NOTE]
|
|
154
164
|
>
|
|
@@ -159,15 +169,23 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
|
|
|
159
169
|
> - 在地址栏的右上角,单击 <kbd>安装</kbd> 图标 .
|
|
160
170
|
> - 根据屏幕上的指示完成 PWA 的安装 .
|
|
161
171
|
|
|
162
|
-
<
|
|
172
|
+
<div align="right">
|
|
173
|
+
|
|
174
|
+
[![][back-to-top]](#readme-top)
|
|
175
|
+
|
|
176
|
+
</div>
|
|
163
177
|
|
|
164
178
|

|
|
165
179
|
|
|
166
180
|
#### `4` 主题模式选择
|
|
167
181
|
|
|
168
|
-
LobeChat
|
|
182
|
+
LobeChat 提供了丰富的主题模式 - 亮色 / 深色模式 与丰富的颜色定制选项,以满足您的个性化需求。默认情况下,我们的主题会智能地跟随您的系统设置进行切换,但如果您希望进行手动控制,也可以轻松在设置中进行切换。
|
|
169
183
|
|
|
170
|
-
<
|
|
184
|
+
<div align="right">
|
|
185
|
+
|
|
186
|
+
[![][back-to-top]](#readme-top)
|
|
187
|
+
|
|
188
|
+
</div>
|
|
171
189
|
|
|
172
190
|

|
|
173
191
|
|
|
@@ -175,6 +193,16 @@ LobeChat 提供了两种独特的主题模式 - 明亮模式和暗黑模式,
|
|
|
175
193
|
|
|
176
194
|
针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。
|
|
177
195
|
|
|
196
|
+
<div align="right">
|
|
197
|
+
|
|
198
|
+
[![][back-to-top]](#readme-top)
|
|
199
|
+
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
#### `6` 图片识别
|
|
203
|
+
|
|
204
|
+
LobeChat 已经支持 OpenAI 最新的 [`gpt-4-vsion`](https://platform.openai.com/docs/guides/vision) 支持视觉识别的模型。你可以上传图片,或者直接粘贴图片,与助手进行对话。
|
|
205
|
+
|
|
178
206
|
> 🚧 更多快照和演示正在陆续添加中...
|
|
179
207
|
|
|
180
208
|
<div align="right">
|
|
@@ -289,6 +317,7 @@ $ docker run -d -p 3210:3210 \
|
|
|
289
317
|
| NPM | 仓库 | 描述 | 版本 |
|
|
290
318
|
| ------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
291
319
|
| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | Lobe UI 是一个专为构建 AIGC 网页应用程序而设计的开源 UI 组件库。 | [![][lobe-ui-shield]][lobe-ui-link] |
|
|
320
|
+
| [@lobehub/tts][lobe-tts-link] | [lobehub/lobe-tts][lobe-tts-github] | Lobe TTS 是一个专为 TTS/STT 建设的语音合成 / 识别 React Hooks 库 | [![][lobe-tts-shield]][lobe-tts-link] |
|
|
292
321
|
| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | LobeLint 为 LobeHub 提供 ESlint,Stylelint,Commitlint,Prettier,Remark 和 Semantic Release 的配置。 | [![][lobe-lint-shield]][lobe-lint-link] |
|
|
293
322
|
| @lobehub/assets | [lobehub/assets][lobe-assets-github] | LobeHub 的 Logo 资源、favicon、网页字体。 | |
|
|
294
323
|
|
|
@@ -455,6 +484,9 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
455
484
|
[lobe-lint-link]: https://www.npmjs.com/package/@lobehub/lint
|
|
456
485
|
[lobe-lint-shield]: https://img.shields.io/npm/v/@lobehub/lint?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
457
486
|
[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme
|
|
487
|
+
[lobe-tts-github]: https://github.com/lobehub/lobe-tts
|
|
488
|
+
[lobe-tts-link]: https://www.npmjs.com/package/@lobehub/tts
|
|
489
|
+
[lobe-tts-shield]: https://img.shields.io/npm/v/@lobehub/tts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
458
490
|
[lobe-ui-github]: https://github.com/lobehub/lobe-ui
|
|
459
491
|
[lobe-ui-link]: https://www.npmjs.com/package/@lobehub/ui
|
|
460
492
|
[lobe-ui-shield]: https://img.shields.io/npm/v/@lobehub/ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
@@ -15,11 +15,11 @@ const createImpl = (createState: any) => {
|
|
|
15
15
|
|
|
16
16
|
// Reset all stores after each test run
|
|
17
17
|
beforeEach(() => {
|
|
18
|
-
act(() =>
|
|
19
|
-
|
|
18
|
+
act(() => {
|
|
19
|
+
for (const resetFn of storeResetFns) {
|
|
20
20
|
resetFn();
|
|
21
|
-
}
|
|
22
|
-
);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
export const createWithEqualityFn = (f: any) => (f === undefined ? createImpl : createImpl(f));
|
package/locales/en_US/chat.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"withSystemRole": "Include Agent Role Setting"
|
|
36
36
|
},
|
|
37
37
|
"stop": "Stop",
|
|
38
|
+
"stt": {
|
|
39
|
+
"action": "Voice Input",
|
|
40
|
+
"loading": "Recognizing...",
|
|
41
|
+
"prettifying": "Prettifying..."
|
|
42
|
+
},
|
|
38
43
|
"temp": "Temporary",
|
|
39
44
|
"tokenDetail": "Role Setting: {{systemRoleToken}} · Chat History: {{chatsToken}}",
|
|
40
45
|
"tokenTag": {
|
|
@@ -57,9 +62,14 @@
|
|
|
57
62
|
"openNewTopic": "Open a new topic"
|
|
58
63
|
},
|
|
59
64
|
"translate": {
|
|
60
|
-
"clear": "Clear Translation"
|
|
65
|
+
"clear": "Clear Translation",
|
|
66
|
+
"action": "Translate"
|
|
61
67
|
},
|
|
62
68
|
"translateTo": "Translate",
|
|
69
|
+
"tts": {
|
|
70
|
+
"action": "Text to Speech",
|
|
71
|
+
"clear": "Clear Speech"
|
|
72
|
+
},
|
|
63
73
|
"updateAgent": "Update Agent Information",
|
|
64
74
|
"upload": {
|
|
65
75
|
"actionTooltip": "Upload Image",
|
package/locales/en_US/error.json
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"PluginServerError": "Plugin server request returned an error. Please check your plugin manifest file, plugin configuration, or server implementation based on the error information below",
|
|
29
29
|
"NoAPIKey": "OpenAI API Key is empty, please add a custom OpenAI API Key"
|
|
30
30
|
},
|
|
31
|
+
"stt": {
|
|
32
|
+
"responseError": "Service request failed, please check the configuration or try again"
|
|
33
|
+
},
|
|
34
|
+
"tts": {
|
|
35
|
+
"responseError": "Service request failed, please check the configuration or try again"
|
|
36
|
+
},
|
|
31
37
|
"unlock": {
|
|
32
38
|
"apikey": {
|
|
33
39
|
"title": "Use Custom API Key",
|
|
@@ -207,6 +207,44 @@
|
|
|
207
207
|
},
|
|
208
208
|
"title": "System Settings"
|
|
209
209
|
},
|
|
210
|
+
"settingTTS": {
|
|
211
|
+
"showAllLocaleVoice": {
|
|
212
|
+
"desc": "If disabled, only voices for the current language will be displayed",
|
|
213
|
+
"title": "Show all locale voices"
|
|
214
|
+
},
|
|
215
|
+
"sttService": {
|
|
216
|
+
"desc": "The 'browser' option refers to the native speech recognition service in the browser",
|
|
217
|
+
"title": "Speech-to-Text Service"
|
|
218
|
+
},
|
|
219
|
+
"title": "Speech Services",
|
|
220
|
+
"ttsService": {
|
|
221
|
+
"desc": "If using the OpenAI text-to-speech service, ensure that the OpenAI model service is enabled",
|
|
222
|
+
"title": "Text-to-Speech Service"
|
|
223
|
+
},
|
|
224
|
+
"voice": {
|
|
225
|
+
"title": "Text-to-Speech Voices",
|
|
226
|
+
"desc": "Select a voice for the current assistant, different TTS services support different voices",
|
|
227
|
+
"preview": "Preview Voice"
|
|
228
|
+
},
|
|
229
|
+
"openai": {
|
|
230
|
+
"sttModel": "OpenAI Speech Recognition Model",
|
|
231
|
+
"ttsModel": "OpenAI Text-to-Speech Model"
|
|
232
|
+
},
|
|
233
|
+
"stt": "Speech Recognition Settings",
|
|
234
|
+
"sttLocale": {
|
|
235
|
+
"desc": "The language of the speech input, this option can improve the accuracy of speech recognition",
|
|
236
|
+
"title": "Speech Recognition Language"
|
|
237
|
+
},
|
|
238
|
+
"sttPersisted": {
|
|
239
|
+
"desc": "When enabled, speech recognition will not automatically end and requires manual click on the end button",
|
|
240
|
+
"title": "Manually End Speech Recognition"
|
|
241
|
+
},
|
|
242
|
+
"tts": "Text-to-Speech Settings",
|
|
243
|
+
"sttAutoStop": {
|
|
244
|
+
"desc": "When disabled, speech recognition will not automatically stop and will require manual intervention to end the process.",
|
|
245
|
+
"title": "Automatic Speech Recognition Termination"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
210
248
|
"settingTheme": {
|
|
211
249
|
"avatar": {
|
|
212
250
|
"title": "Avatar"
|
|
@@ -245,6 +283,7 @@
|
|
|
245
283
|
"tab": {
|
|
246
284
|
"agent": "Default Agent",
|
|
247
285
|
"common": "Common Settings",
|
|
248
|
-
"llm": "Custom LLM API"
|
|
286
|
+
"llm": "Custom LLM API",
|
|
287
|
+
"tts": "Speech Services"
|
|
249
288
|
}
|
|
250
289
|
}
|
package/locales/ja_JP/chat.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"withSystemRole": "エージェントの役割設定を含む"
|
|
36
36
|
},
|
|
37
37
|
"stop": "停止",
|
|
38
|
+
"stt": {
|
|
39
|
+
"action": "音声入力",
|
|
40
|
+
"loading": "読み取り中...",
|
|
41
|
+
"prettifying": "美化中..."
|
|
42
|
+
},
|
|
38
43
|
"temp": "一時",
|
|
39
44
|
"tokenDetail": "役割設定: {{systemRoleToken}} · チャット履歴: {{chatsToken}}",
|
|
40
45
|
"tokenTag": {
|
|
@@ -57,9 +62,14 @@
|
|
|
57
62
|
"openNewTopic": "新しいトピックを開く"
|
|
58
63
|
},
|
|
59
64
|
"translate": {
|
|
60
|
-
"clear": "翻訳をクリア"
|
|
65
|
+
"clear": "翻訳をクリア",
|
|
66
|
+
"action": "翻訳"
|
|
61
67
|
},
|
|
62
68
|
"translateTo": "翻訳",
|
|
69
|
+
"tts": {
|
|
70
|
+
"action": "音声読み上げ",
|
|
71
|
+
"clear": "音声削除"
|
|
72
|
+
},
|
|
63
73
|
"updateAgent": "エージェント情報を更新",
|
|
64
74
|
"upload": {
|
|
65
75
|
"actionTooltip": "画像をアップロード",
|
package/locales/ja_JP/error.json
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"PluginApiNotFound": "申し訳ありませんが、プラグインのマニフェストに指定されたAPIが見つかりませんでした。リクエストメソッドとプラグインのマニフェストのAPIが一致しているかどうかを確認してください",
|
|
29
29
|
"NoAPIKey": "OpenAI APIキーが空です。カスタムOpenAI APIキーを追加してください。"
|
|
30
30
|
},
|
|
31
|
+
"stt": {
|
|
32
|
+
"responseError": "サービスリクエストが失敗しました。設定を確認するか、もう一度お試しください"
|
|
33
|
+
},
|
|
34
|
+
"tts": {
|
|
35
|
+
"responseError": "サービスリクエストが失敗しました。設定を確認するか、もう一度お試しください"
|
|
36
|
+
},
|
|
31
37
|
"unlock": {
|
|
32
38
|
"apikey": {
|
|
33
39
|
"title": "カスタムAPIキーの使用",
|
|
@@ -194,6 +194,44 @@
|
|
|
194
194
|
},
|
|
195
195
|
"title": "システム設定"
|
|
196
196
|
},
|
|
197
|
+
"settingTTS": {
|
|
198
|
+
"showAllLocaleVoice": {
|
|
199
|
+
"desc": "关闭すると、現在の言語の音声のみが表示されます",
|
|
200
|
+
"title": "すべての言語の音声を表示"
|
|
201
|
+
},
|
|
202
|
+
"sttService": {
|
|
203
|
+
"desc": "ブラウザはブラウザのネイティブ音声認識サービスです",
|
|
204
|
+
"title": "音声認識サービス"
|
|
205
|
+
},
|
|
206
|
+
"title": "音声サービス",
|
|
207
|
+
"ttsService": {
|
|
208
|
+
"desc": "OpenAIの音声合成サービスを使用する場合、OpenAIモデルサービスが有効になっていることを確認する必要があります",
|
|
209
|
+
"title": "音声合成サービス"
|
|
210
|
+
},
|
|
211
|
+
"voice": {
|
|
212
|
+
"title": "音声合成音声源",
|
|
213
|
+
"desc": "現在のアシスタントに適した音声を選択します。異なるTTSサービスは異なる音声をサポートしています",
|
|
214
|
+
"preview": "プレビュー"
|
|
215
|
+
},
|
|
216
|
+
"openai": {
|
|
217
|
+
"sttModel": "OpenAI 音声認識モデル",
|
|
218
|
+
"ttsModel": "OpenAI 音声合成モデル"
|
|
219
|
+
},
|
|
220
|
+
"stt": "音声認識設定",
|
|
221
|
+
"sttLocale": {
|
|
222
|
+
"desc": "音声入力の言語、このオプションを選択すると音声認識の精度が向上します",
|
|
223
|
+
"title": "音声認識言語"
|
|
224
|
+
},
|
|
225
|
+
"sttPersisted": {
|
|
226
|
+
"desc": "有効にすると、音声認識が自動的に終了せず、手動で終了ボタンをクリックする必要があります",
|
|
227
|
+
"title": "音声認識の手動終了"
|
|
228
|
+
},
|
|
229
|
+
"tts": "音声合成設定",
|
|
230
|
+
"sttAutoStop": {
|
|
231
|
+
"desc": "オフにすると、音声認識が自動的に終了せず、手動で終了ボタンをクリックする必要があります",
|
|
232
|
+
"title": "音声認識の自動終了"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
197
235
|
"settingTheme": {
|
|
198
236
|
"avatar": {
|
|
199
237
|
"title": "アバター"
|
|
@@ -232,6 +270,7 @@
|
|
|
232
270
|
"tab": {
|
|
233
271
|
"agent": "デフォルトのアシスタント",
|
|
234
272
|
"common": "一般設定",
|
|
235
|
-
"llm": "言語モデル"
|
|
273
|
+
"llm": "言語モデル",
|
|
274
|
+
"tts": "音声サービス"
|
|
236
275
|
}
|
|
237
276
|
}
|
package/locales/ko_KR/chat.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"withSystemRole": "도우미 역할 포함"
|
|
36
36
|
},
|
|
37
37
|
"stop": "정지",
|
|
38
|
+
"stt": {
|
|
39
|
+
"action": "음성 입력",
|
|
40
|
+
"loading": "인식 중...",
|
|
41
|
+
"prettifying": "미화 중..."
|
|
42
|
+
},
|
|
38
43
|
"temp": "임시",
|
|
39
44
|
"tokenDetail": "역할 설정: {{systemRoleToken}} · 대화 기록: {{chatsToken}}",
|
|
40
45
|
"tokenTag": {
|
|
@@ -57,9 +62,14 @@
|
|
|
57
62
|
"openNewTopic": "새로운 주제 열기"
|
|
58
63
|
},
|
|
59
64
|
"translate": {
|
|
60
|
-
"clear": "번역 지우기"
|
|
65
|
+
"clear": "번역 지우기",
|
|
66
|
+
"action": "번역"
|
|
61
67
|
},
|
|
62
68
|
"translateTo": "번역",
|
|
69
|
+
"tts": {
|
|
70
|
+
"action": "음성 읽기",
|
|
71
|
+
"clear": "음성 삭제"
|
|
72
|
+
},
|
|
63
73
|
"updateAgent": "도우미 정보 업데이트",
|
|
64
74
|
"upload": {
|
|
65
75
|
"actionTooltip": "이미지 업로드",
|
package/locales/ko_KR/error.json
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"OpenAIBizError": "OpenAI 서비스 요청 중 오류가 발생했습니다. 아래 정보를 확인하고 문제를 해결하거나 다시 시도해주세요.",
|
|
29
29
|
"NoAPIKey": "OpenAI API 키가 비어 있습니다. 사용자 정의 OpenAI API 키를 추가해주세요."
|
|
30
30
|
},
|
|
31
|
+
"stt": {
|
|
32
|
+
"responseError": "서비스 요청이 실패했습니다. 구성을 확인하거나 다시 시도해주세요."
|
|
33
|
+
},
|
|
34
|
+
"tts": {
|
|
35
|
+
"responseError": "서비스 요청이 실패했습니다. 구성을 확인하거나 다시 시도해주세요."
|
|
36
|
+
},
|
|
31
37
|
"unlock": {
|
|
32
38
|
"apikey": {
|
|
33
39
|
"title": "사용자 정의 API 키 사용",
|
|
@@ -194,6 +194,44 @@
|
|
|
194
194
|
},
|
|
195
195
|
"title": "시스템 설정"
|
|
196
196
|
},
|
|
197
|
+
"settingTTS": {
|
|
198
|
+
"showAllLocaleVoice": {
|
|
199
|
+
"desc": "현재 언어의 음성만 표시하려면 닫으십시오",
|
|
200
|
+
"title": "모든 언어 음성 표시"
|
|
201
|
+
},
|
|
202
|
+
"sttService": {
|
|
203
|
+
"desc": "브라우저는 브라우저 기본 음성 인식 서비스입니다",
|
|
204
|
+
"title": "음성 인식 서비스"
|
|
205
|
+
},
|
|
206
|
+
"title": "음성 서비스",
|
|
207
|
+
"ttsService": {
|
|
208
|
+
"desc": "OpenAI 음성 합성 서비스를 사용하는 경우 OpenAI 모델 서비스가 열려 있어야 합니다",
|
|
209
|
+
"title": "음성 합성 서비스"
|
|
210
|
+
},
|
|
211
|
+
"voice": {
|
|
212
|
+
"title": "음성 합성 음성",
|
|
213
|
+
"desc": "현재 어시스턴트에 대한 음성을 선택하십시오. 각기 다른 TTS 서비스는 다른 음성을 지원합니다.",
|
|
214
|
+
"preview": "프리뷰 음성"
|
|
215
|
+
},
|
|
216
|
+
"openai": {
|
|
217
|
+
"sttModel": "OpenAI 음성 인식 모델",
|
|
218
|
+
"ttsModel": "OpenAI 음성 합성 모델"
|
|
219
|
+
},
|
|
220
|
+
"stt": "음성 인식 설정",
|
|
221
|
+
"sttLocale": {
|
|
222
|
+
"desc": "음성 입력의 언어, 이 옵션을 통해 음성 인식 정확도를 높일 수 있습니다.",
|
|
223
|
+
"title": "음성 인식 언어"
|
|
224
|
+
},
|
|
225
|
+
"sttPersisted": {
|
|
226
|
+
"desc": "활성화하면 음성 인식이 자동으로 종료되지 않고, 수동으로 종료 버튼을 클릭해야 합니다.",
|
|
227
|
+
"title": "음성 인식 수동 종료"
|
|
228
|
+
},
|
|
229
|
+
"tts": "음성 합성 설정",
|
|
230
|
+
"sttAutoStop": {
|
|
231
|
+
"desc": "자동으로 종료되지 않고 수동으로 종료 버튼을 클릭해야 하는 음성 인식을 사용하지 않습니다.",
|
|
232
|
+
"title": "음성 인식 자동 종료"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
197
235
|
"settingTheme": {
|
|
198
236
|
"avatar": {
|
|
199
237
|
"title": "아바타"
|
|
@@ -232,6 +270,7 @@
|
|
|
232
270
|
"tab": {
|
|
233
271
|
"agent": "기본 도우미",
|
|
234
272
|
"common": "일반 설정",
|
|
235
|
-
"llm": "언어 모델"
|
|
273
|
+
"llm": "언어 모델",
|
|
274
|
+
"tts": "음성 서비스"
|
|
236
275
|
}
|
|
237
276
|
}
|
package/locales/ru_RU/chat.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"withSystemRole": "С указанием роли помощника"
|
|
36
36
|
},
|
|
37
37
|
"stop": "Остановить",
|
|
38
|
+
"stt": {
|
|
39
|
+
"action": "Голосовой ввод",
|
|
40
|
+
"loading": "Идет распознавание...",
|
|
41
|
+
"prettifying": "Форматирование..."
|
|
42
|
+
},
|
|
38
43
|
"temp": "Временный",
|
|
39
44
|
"tokenDetail": "Роль помощника: {{systemRoleToken}} · История сообщений: {{chatsToken}}",
|
|
40
45
|
"tokenTag": {
|
|
@@ -57,9 +62,14 @@
|
|
|
57
62
|
"openNewTopic": "Открыть новую тему"
|
|
58
63
|
},
|
|
59
64
|
"translate": {
|
|
60
|
-
"clear": "Очистить перевод"
|
|
65
|
+
"clear": "Очистить перевод",
|
|
66
|
+
"action": "перевести"
|
|
61
67
|
},
|
|
62
68
|
"translateTo": "Перевести на",
|
|
69
|
+
"tts": {
|
|
70
|
+
"action": "воспроизвести речь",
|
|
71
|
+
"clear": "очистить речь"
|
|
72
|
+
},
|
|
63
73
|
"updateAgent": "Обновить информацию о помощнике",
|
|
64
74
|
"upload": {
|
|
65
75
|
"actionTooltip": "Загрузить изображение",
|
package/locales/ru_RU/error.json
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
"PluginServerError": "Запрос сервера плагина возвратил ошибку. Проверьте файл манифеста плагина, конфигурацию плагина или реализацию сервера на основе информации об ошибке ниже",
|
|
29
29
|
"NoAPIKey": "Ключ OpenAI API пуст, пожалуйста, добавьте свой собственный ключ OpenAI API"
|
|
30
30
|
},
|
|
31
|
+
"stt": {
|
|
32
|
+
"responseError": "Ошибка запроса сервиса. Пожалуйста, проверьте конфигурацию или повторите попытку"
|
|
33
|
+
},
|
|
34
|
+
"tts": {
|
|
35
|
+
"responseError": "Ошибка запроса сервиса. Пожалуйста, проверьте конфигурацию или повторите попытку"
|
|
36
|
+
},
|
|
31
37
|
"unlock": {
|
|
32
38
|
"apikey": {
|
|
33
39
|
"title": "Использовать собственный ключ API",
|