@lobehub/chat 0.119.13 → 0.120.1
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 -0
- package/CHANGELOG.md +50 -0
- package/LICENSE +1 -1
- package/README.md +24 -26
- package/README.zh-CN.md +67 -26
- package/docs/Deployment/Common-Error.md +18 -1
- package/docs/Deployment/Common-Error.zh-CN.md +18 -0
- package/docs/Deployment/Environment-Variable.md +14 -3
- package/docs/Deployment/Environment-Variable.zh-CN.md +14 -3
- package/docs/Development/Contributing-Guidelines.zh-CN.md +72 -0
- package/docs/Development/Internationalization-Implementation.zh-CN.md +117 -0
- package/docs/Development/State-Management/Selectors.zh-CN.md +49 -0
- package/docs/Development/State-Management/index.zh-CN.md +219 -0
- package/docs/Development/index.zh-CN.md +66 -1
- package/docs/Home.md +3 -3
- package/docs/_Sidebar.md +4 -4
- package/locales/ar/chat.json +96 -0
- package/locales/ar/common.json +114 -0
- package/locales/ar/error.json +72 -0
- package/locales/ar/market.json +30 -0
- package/locales/ar/migration.json +45 -0
- package/locales/ar/plugin.json +166 -0
- package/locales/ar/setting.json +306 -0
- package/locales/ar/tool.json +9 -0
- package/locales/ar/welcome.json +14 -0
- package/package.json +10 -5
- package/src/app/home/Redirect.tsx +4 -0
- package/src/app/layout.tsx +3 -2
- package/src/features/Conversation/components/ChatItem/index.tsx +12 -1
- package/src/features/Conversation/components/VirtualizedList/index.tsx +4 -1
- package/src/locales/create.ts +8 -1
- package/src/locales/default/common.ts +1 -0
- package/src/locales/resources.ts +5 -0
- package/vercel.json +1 -1
- package/docs/Development/Data-Store-Selectors.zh-CN.md +0 -68
- /package/docs/{Add-New-Locale.md → Development/Add-New-Locale.md} +0 -0
- /package/docs/{Add-New-Locale.zh-CN.md → Development/Add-New-Locale.zh-CN.md} +0 -0
- /package/docs/Development/{Data-Store-Selectors.md → State-Management/Selectors.md} +0 -0
package/.i18nrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.120.1](https://github.com/lobehub/lobe-chat/compare/v0.120.0...v0.120.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-01-16**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix list scrolling white screen on mobile.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix list scrolling white screen on mobile, closes [#1072](https://github.com/lobehub/lobe-chat/issues/1072) ([af10947](https://github.com/lobehub/lobe-chat/commit/af10947))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 0.120.0](https://github.com/lobehub/lobe-chat/compare/v0.119.13...v0.120.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-01-15**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **misc**: Adding Arabic Language Support.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **misc**: Adding Arabic Language Support, closes [#1049](https://github.com/lobehub/lobe-chat/issues/1049) ([a325ef9](https://github.com/lobehub/lobe-chat/commit/a325ef9))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.119.13](https://github.com/lobehub/lobe-chat/compare/v0.119.12...v0.119.13)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2024-01-10**</sup>
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -169,14 +169,14 @@ e-commerce platform data access, and various third-party services.
|
|
|
169
169
|
|
|
170
170
|
<!-- PLUGIN LIST -->
|
|
171
171
|
|
|
172
|
-
| Recent Submits | Description
|
|
173
|
-
| ------------------------------------------------------------------------------------------------------------------ |
|
|
174
|
-
| [
|
|
175
|
-
| [
|
|
176
|
-
| [
|
|
177
|
-
| [
|
|
172
|
+
| Recent Submits | Description |
|
|
173
|
+
| ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
174
|
+
| [TikZJax](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Arvin Xu** on **2024-01-14**</sup> | Convert LaTeX TikZ code into SVG images for crisp, scalable mathematical diagrams and visualizations.<br/>`latex` `svg` `visualization` `diagram` `math` |
|
|
175
|
+
| [weather GPT](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Steven Tey** on **2023-12-16**</sup> | Get current weather information for a specific location.<br/>`weather` |
|
|
176
|
+
| [Ask Your PDF](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **AskYourPDF** on **2023-12-16**</sup> | Unlock the power of your PDFs!, dive into your documents, find answers, and bring information to your fingertips.<br/>`pdf` `document` `web` |
|
|
177
|
+
| [Clock Time](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | Display a clock to show current time<br/>`clock` `time` |
|
|
178
178
|
|
|
179
|
-
> 📊 Total plugins: [<kbd>**
|
|
179
|
+
> 📊 Total plugins: [<kbd>**10**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
180
180
|
|
|
181
181
|
<!-- PLUGIN LIST -->
|
|
182
182
|
|
|
@@ -208,14 +208,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
208
208
|
|
|
209
209
|
<!-- AGENT LIST -->
|
|
210
210
|
|
|
211
|
-
| Recent Submits
|
|
212
|
-
|
|
|
213
|
-
| [
|
|
214
|
-
| [
|
|
215
|
-
| [
|
|
216
|
-
| [
|
|
211
|
+
| Recent Submits | Description |
|
|
212
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
213
|
+
| [William](https://chat-preview.lobehub.com/market?agent=unreal-engine-development-engineer)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-16**</sup> | Unreal Engine expert, proficient in C++ programming, rendering, memory, thread and other pipeline architectures, UE application on Android platform, comprehensive artistic cognition, familiar with Shader writing, proficient in 3D art asset production process and tools.<br/>`unreal-engine` `c-programming` `rendering-pipeline` `memory-management` `thread-architecture` |
|
|
214
|
+
| [Chad](https://chat-preview.lobehub.com/market?agent=chad)<br/><sup>By **[HerIsDia](https://github.com/HerIsDia)** on **2024-01-15**</sup> | Just chad<br/>`humor` `funny` |
|
|
215
|
+
| [English Analyst](https://chat-preview.lobehub.com/market?agent=english-teacher)<br/><sup>By **[fmaxyou](https://github.com/fmaxyou)** on **2024-01-11**</sup> | Specializes in explaining and memorization techniques for English words and phrases<br/>`english-teaching` `explanation` `memorization-techniques` |
|
|
216
|
+
| [Life Decision Advisor](https://chat-preview.lobehub.com/market?agent=life-decision-advisor)<br/><sup>By **[amitalokbera](https://github.com/amitalokbera)** on **2024-01-11**</sup> | A Life Decision Advisor is a virtual guide designed to assist users in making informed life decisions<br/>`prompt` |
|
|
217
217
|
|
|
218
|
-
> 📊 Total agents: [<kbd>**
|
|
218
|
+
> 📊 Total agents: [<kbd>**98**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
219
219
|
|
|
220
220
|
<!-- AGENT LIST -->
|
|
221
221
|
|
|
@@ -395,12 +395,12 @@ $ docker run -d -p 3210:3210 \
|
|
|
395
395
|
|
|
396
396
|
This project provides some additional configuration items set with environment variables:
|
|
397
397
|
|
|
398
|
-
| Environment Variable | Required | Description | Example
|
|
399
|
-
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
400
|
-
| `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx`
|
|
401
|
-
| `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn/v1
|
|
402
|
-
| `ACCESS_CODE` | No | Add a password to access this service; you can set a long password to avoid leaking. If this value contains a comma, it is a password array. | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3`
|
|
403
|
-
| `CUSTOM_MODELS` | No | Used to control the model list. Use `+` to add a model, `-` to hide a model, and `model_name=display_name` to customize the display name of a model, separated by commas. | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo`
|
|
398
|
+
| Environment Variable | Required | Description | Example |
|
|
399
|
+
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
400
|
+
| `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
|
|
401
|
+
| `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn` or `https://aihubmix.com/v1` <br/>The default value is<br/>`https://api.openai.com/v1` |
|
|
402
|
+
| `ACCESS_CODE` | No | Add a password to access this service; you can set a long password to avoid leaking. If this value contains a comma, it is a password array. | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
|
|
403
|
+
| `CUSTOM_MODELS` | No | Used to control the model list. Use `+` to add a model, `-` to hide a model, and `model_name=display_name` to customize the display name of a model, separated by commas. | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
|
|
404
404
|
|
|
405
405
|
> \[!NOTE]
|
|
406
406
|
>
|
|
@@ -458,15 +458,15 @@ You can use GitHub Codespaces for online development:
|
|
|
458
458
|
|
|
459
459
|
Or clone it for local development:
|
|
460
460
|
|
|
461
|
-
[![][bun-shield]][bun-link]
|
|
462
|
-
|
|
463
461
|
```fish
|
|
464
462
|
$ git clone https://github.com/lobehub/lobe-chat.git
|
|
465
463
|
$ cd lobe-chat
|
|
466
|
-
$
|
|
467
|
-
$
|
|
464
|
+
$ pnpm install
|
|
465
|
+
$ pnpm dev
|
|
468
466
|
```
|
|
469
467
|
|
|
468
|
+
If you would like to learn more details, please feel free to look at our [LobeChat Development Guide](https://github.com/lobehub/lobe-chat/wiki/index)
|
|
469
|
+
|
|
470
470
|
<div align="right">
|
|
471
471
|
|
|
472
472
|
[![][back-to-top]](#readme-top)
|
|
@@ -562,8 +562,6 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
562
562
|
<!-- LINK GROUP -->
|
|
563
563
|
|
|
564
564
|
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
|
565
|
-
[bun-link]: https://bun.sh
|
|
566
|
-
[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
|
|
567
565
|
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
|
|
568
566
|
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
|
|
569
567
|
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
|
package/README.zh-CN.md
CHANGED
|
@@ -53,6 +53,7 @@ LobeChat 是开源的高性能聊天机器人框架,支持语音合成、多
|
|
|
53
53
|
- [`A` 使用 Vercel、Zeabur 或 Sealos 部署](#a-使用-vercelzeabur-或-sealos-部署)
|
|
54
54
|
- [`B` 使用 Docker 部署](#b-使用-docker-部署)
|
|
55
55
|
- [环境变量](#环境变量)
|
|
56
|
+
- [获取 OpenAI API Key](#获取-openai-api-key)
|
|
56
57
|
- [📦 生态系统](#-生态系统)
|
|
57
58
|
- [🧩 插件体系](#-插件体系)
|
|
58
59
|
- [⌨️ 本地开发](#️-本地开发)
|
|
@@ -149,14 +150,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
149
150
|
|
|
150
151
|
<!-- PLUGIN LIST -->
|
|
151
152
|
|
|
152
|
-
| 最近新增 | 插件描述
|
|
153
|
-
| --------------------------------------------------------------------------------------------------------------- |
|
|
154
|
-
| [
|
|
155
|
-
| [
|
|
156
|
-
| [
|
|
157
|
-
| [
|
|
153
|
+
| 最近新增 | 插件描述 |
|
|
154
|
+
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
155
|
+
| [TikZJax](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Arvin Xu** on **2024-01-14**</sup> | 将 LaTeX TikZ 代码转换为 SVG 图像,用于创建清晰、可缩放的数学图表和可视化效果。<br/>`latex` `svg` `可视化` `图表` `数学` |
|
|
156
|
+
| [天气 GPT](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Steven Tey** on **2023-12-16**</sup> | 获取特定位置的当前天气信息。<br/>`天气` |
|
|
157
|
+
| [AskYouPDF](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **AskYourPDF** on **2023-12-16**</sup> | 释放您的 PDF 的力量!深入您的文档,找到答案,并将信息带到您的指尖。<br/>`pdf` `文档` `web` |
|
|
158
|
+
| [时钟时间](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | 显示一个时钟来展示当前时间<br/>`时钟` `时间` |
|
|
158
159
|
|
|
159
|
-
> 📊 Total plugins: [<kbd>**
|
|
160
|
+
> 📊 Total plugins: [<kbd>**10**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
160
161
|
|
|
161
162
|
<!-- PLUGIN LIST -->
|
|
162
163
|
|
|
@@ -184,14 +185,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
184
185
|
|
|
185
186
|
<!-- AGENT LIST -->
|
|
186
187
|
|
|
187
|
-
| 最近新增
|
|
188
|
-
|
|
|
189
|
-
| [
|
|
190
|
-
| [
|
|
191
|
-
| [
|
|
192
|
-
| [
|
|
188
|
+
| 最近新增 | 助手说明 |
|
|
189
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
190
|
+
| [William](https://chat-preview.lobehub.com/market?agent=unreal-engine-development-engineer)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-16**</sup> | 虚幻引擎专家,精通 C++ 编程,渲染、内存、线程等管线架构,UE 在安卓平台应用,全面的美术认知,熟悉 Shader 编写,熟练掌握 3D 美术资产制作流程与工具。<br/>`虚幻引擎` `c-编程` `渲染管线` `内存管理` `线程架构` |
|
|
191
|
+
| [乍得](https://chat-preview.lobehub.com/market?agent=chad)<br/><sup>By **[HerIsDia](https://github.com/HerIsDia)** on **2024-01-15**</sup> | 只是乍得<br/>`幽默` `搞笑` |
|
|
192
|
+
| [英语解析师](https://chat-preview.lobehub.com/market?agent=english-teacher)<br/><sup>By **[fmaxyou](https://github.com/fmaxyou)** on **2024-01-11**</sup> | 擅长英语单词和短语解释与记忆技巧<br/>`英语教学` `解释` `记忆技巧` |
|
|
193
|
+
| [生活决策顾问](https://chat-preview.lobehub.com/market?agent=life-decision-advisor)<br/><sup>By **[amitalokbera](https://github.com/amitalokbera)** on **2024-01-11**</sup> | 生活决策顾问是一个虚拟指南,旨在帮助用户做出明智的生活决策<br/>`提示` |
|
|
193
194
|
|
|
194
|
-
> 📊 Total agents: [<kbd>**
|
|
195
|
+
> 📊 Total agents: [<kbd>**98**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
195
196
|
|
|
196
197
|
<!-- AGENT LIST -->
|
|
197
198
|
|
|
@@ -366,17 +367,59 @@ $ docker run -d -p 3210:3210 \
|
|
|
366
367
|
|
|
367
368
|
本项目提供了一些额外的配置项,使用环境变量进行设置:
|
|
368
369
|
|
|
369
|
-
| 环境变量 | 类型 | 描述 | 示例
|
|
370
|
-
| ------------------ | ---- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
371
|
-
| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx`
|
|
372
|
-
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
|
|
373
|
-
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3`
|
|
374
|
-
| `CUSTOM_MODELS` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo`
|
|
370
|
+
| 环境变量 | 类型 | 描述 | 示例 |
|
|
371
|
+
| ------------------ | ---- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
372
|
+
| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
|
|
373
|
+
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
|
|
374
|
+
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
|
|
375
|
+
| `CUSTOM_MODELS` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
|
|
375
376
|
|
|
376
377
|
> \[!NOTE]
|
|
377
378
|
>
|
|
378
379
|
> 完整环境变量可见 [📘环境变量](https://github.com/lobehub/lobe-chat/wiki/Environment-Variable.zh-CN)
|
|
379
380
|
|
|
381
|
+
<br/>
|
|
382
|
+
|
|
383
|
+
### 获取 OpenAI API Key
|
|
384
|
+
|
|
385
|
+
API Key 是使用 LobeChat 进行大语言模型会话的必要信息,本节以 OpenAI 模型服务商为例,简要介绍获取 API Key 的方式。
|
|
386
|
+
|
|
387
|
+
#### `A` 通过 OpenAI 官方渠道
|
|
388
|
+
|
|
389
|
+
- 注册一个 [OpenAI 账户](https://platform.openai.com/signup),你需要使用国际手机号、非大陆邮箱进行注册;
|
|
390
|
+
- 注册完毕后,前往 [API Keys](https://platform.openai.com/api-keys) 页面,点击 `Create new secret key` 创建新的 API Key:
|
|
391
|
+
|
|
392
|
+
| 步骤 1:打开创建窗口 | 步骤 2:创建 API Key | 步骤 3:获取 API Key |
|
|
393
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
394
|
+
| <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296253192-ff2193dd-f125-4e58-82e8-91bc376c0d68.png" height="200"/> | <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296254170-803bacf0-4471-4171-ae79-0eab08d621d1.png" height="200"/> | <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296255167-f2745f2b-f083-4ba8-bc78-9b558e0002de.png" height="200"/> |
|
|
395
|
+
|
|
396
|
+
- 将此 API Key 填写到 LobeChat 的 API Key 配置中,即可开始使用。
|
|
397
|
+
|
|
398
|
+
> \[!TIP]
|
|
399
|
+
>
|
|
400
|
+
> 账户注册后,一般有 5 美元的免费额度,但有效期只有三个月。
|
|
401
|
+
> 如果你希望长期使用你的 API Key,你需要完成支付的信用卡绑定。由于 OpenAI 只支持外币信用卡,因此你需要找到合适的支付渠道,此处不再详细展开。
|
|
402
|
+
|
|
403
|
+
<br/>
|
|
404
|
+
|
|
405
|
+
#### `B` 通过 OpenAI 第三方代理商
|
|
406
|
+
|
|
407
|
+
如果你发现注册 OpenAI 账户或者绑定外币信用卡比较麻烦,可以考虑借助一些知名的 OpenAI 第三方代理商来获取 API Key,
|
|
408
|
+
这可以有效降低获取 OpenAI API Key 的门槛。但与此同时,一旦使用三方服务,你可能也需要承担潜在的风险,
|
|
409
|
+
请根据你自己的实际情况自行决策。以下是常见的第三方模型代理商列表,供你参考:
|
|
410
|
+
|
|
411
|
+
| | 服务商 | 特性说明 | Proxy 代理地址 | 链接 |
|
|
412
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------- | ------------------------- | ------------------------------- |
|
|
413
|
+
| <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/296272721-c3ac0bf3-e433-4496-89c4-ebdc20689c17.jpg" width="48" /> | **AiHubMix** | 使用 OpenAI 企业接口,全站模型价格为官方一半(含 GPT-4 ) | `https://aihubmix.com/v1` | [获取](https://lobe.li/XHnZIUP) |
|
|
414
|
+
|
|
415
|
+
> \[!WARNING]
|
|
416
|
+
>
|
|
417
|
+
> **免责申明**: 在此推荐的 OpenAI API Key 由第三方代理商提供,所以我们不对 API Key 的 **有效性** 和 **安全性** 负责,请你自行承担购买和使用 API Key 的风险。
|
|
418
|
+
|
|
419
|
+
> \[!NOTE]
|
|
420
|
+
>
|
|
421
|
+
> 如果你是模型服务商,并认为自己的服务足够稳定且价格实惠,欢迎联系我们,我们会在自行体验和测试后酌情推荐。
|
|
422
|
+
|
|
380
423
|
<div align="right">
|
|
381
424
|
|
|
382
425
|
[![][back-to-top]](#readme-top)
|
|
@@ -429,15 +472,15 @@ $ docker run -d -p 3210:3210 \
|
|
|
429
472
|
|
|
430
473
|
或者使用以下命令进行本地开发:
|
|
431
474
|
|
|
432
|
-
[![][bun-shield]][bun-link]
|
|
433
|
-
|
|
434
475
|
```fish
|
|
435
476
|
$ git clone https://github.com/lobehub/lobe-chat.git
|
|
436
477
|
$ cd lobe-chat
|
|
437
|
-
$
|
|
438
|
-
$
|
|
478
|
+
$ pnpm install
|
|
479
|
+
$ pnpm run dev
|
|
439
480
|
```
|
|
440
481
|
|
|
482
|
+
如果你希望了解更多详情,欢迎可以查阅我们的 [LobeChat 开发指南](https://github.com/lobehub/lobe-chat/wiki/index.zh-CN)
|
|
483
|
+
|
|
441
484
|
<div align="right">
|
|
442
485
|
|
|
443
486
|
[![][back-to-top]](#readme-top)
|
|
@@ -533,8 +576,6 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
533
576
|
<!-- LINK GROUP -->
|
|
534
577
|
|
|
535
578
|
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
|
536
|
-
[bun-link]: https://bun.sh
|
|
537
|
-
[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
|
|
538
579
|
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
|
|
539
580
|
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
|
|
540
581
|
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Frequently Asked Questions
|
|
2
2
|
|
|
3
|
+
## Configuring the `OPENAI_PROXY_URL` Environment Variable but Receiving an Empty Response
|
|
4
|
+
|
|
5
|
+
### Problem Description
|
|
6
|
+
|
|
7
|
+
After configuring the `OPENAI_PROXY_URL` environment variable, you may encounter a situation where the response from the AI is empty. This could be due to an incorrect configuration of the `OPENAI_PROXY_URL`.
|
|
8
|
+
|
|
9
|
+
### Solution
|
|
10
|
+
|
|
11
|
+
Recheck and confirm if the `OPENAI_PROXY_URL` is set correctly, including the correct addition of the `/v1` suffix (if required).
|
|
12
|
+
|
|
13
|
+
### Related Discussion Links
|
|
14
|
+
|
|
15
|
+
- [Why is the response blank after installing and configuring Docker and environment variables?](https://github.com/lobehub/lobe-chat/discussions/623)
|
|
16
|
+
- [Reasons for errors when using third-party APIs](https://github.com/lobehub/lobe-chat/discussions/734)
|
|
17
|
+
- [No response from the chat when the proxy server address is filled](https://github.com/lobehub/lobe-chat/discussions/1065)
|
|
18
|
+
|
|
19
|
+
If the issue persists, it is recommended to raise the problem in the community with relevant logs and configuration information for other developers or maintainers to provide assistance.
|
|
20
|
+
|
|
3
21
|
## When using a proxy(e.g. Surge), I encounter the `UNABLE_TO_VERIFY_LEAF_SIGNATURE` error
|
|
4
22
|
|
|
5
23
|
### Problem Description
|
|
@@ -67,4 +85,3 @@ If possible, it is recommended to address certificate issues using the following
|
|
|
67
85
|
3. Properly configure the certificate chain in the code to ensure that Node.js can validate to the root certificate.
|
|
68
86
|
|
|
69
87
|
Implementing these methods can resolve certificate validation issues without sacrificing security.
|
|
70
|
-
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# 常见问题
|
|
2
2
|
|
|
3
|
+
## 配置 `OPENAI_PROXY_URL` 环境变量但返回值为空
|
|
4
|
+
|
|
5
|
+
### 问题描述
|
|
6
|
+
|
|
7
|
+
配置 `OPENAI_PROXY_URL` 环境变量后,可能会遇到 AI 的返回消息为空的情况。这可能是由于 `OPENAI_PROXY_URL` 配置不正确导致。
|
|
8
|
+
|
|
9
|
+
### 解决方案
|
|
10
|
+
|
|
11
|
+
重新检查并确认 `OPENAI_PROXY_URL` 是否设置正确,包括是否正确地添加了 `/v1` 后缀(如果需要)。
|
|
12
|
+
|
|
13
|
+
### 相关讨论链接
|
|
14
|
+
|
|
15
|
+
- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/lobe-chat/discussions/623)
|
|
16
|
+
- [使用第三方接口报错的原因](https://github.com/lobehub/lobe-chat/discussions/734)
|
|
17
|
+
- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobe-chat/discussions/1065)
|
|
18
|
+
|
|
19
|
+
如果问题依旧无法解决,建议在社区中提出问题,附上相关日志和配置信息,以便其他开发者或维护者提供帮助。
|
|
20
|
+
|
|
3
21
|
## 使用代理中转请求时(例如:Surge),报 `UNABLE_TO_VERIFY_LEAF_SIGNATURE` 错误
|
|
4
22
|
|
|
5
23
|
### 问题描述
|
|
@@ -54,10 +54,21 @@ The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `g
|
|
|
54
54
|
|
|
55
55
|
- Type: Optional
|
|
56
56
|
- Description: If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL
|
|
57
|
-
- Default: `https://api.openai.com`
|
|
58
|
-
- Example: `https://api.chatanywhere.cn`
|
|
57
|
+
- Default: `https://api.openai.com/v1`
|
|
58
|
+
- Example: `https://api.chatanywhere.cn` or `https://aihubmix.com/v1`
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
> !\[NOTE]
|
|
61
|
+
>
|
|
62
|
+
> Please check the request suffix of your proxy service provider. Some proxy service providers may add `/v1` to the request suffix, while others may not.
|
|
63
|
+
> If you find that the AI returns an empty message during testing, try adding the `/v1` suffix and retrying.
|
|
64
|
+
|
|
65
|
+
Whether to fill in `/v1` is closely related to the model service provider. For example, the default address of OpenAI is `api.openai.com/v1`. If your proxy forwards this interface, you can directly fill in `proxy.com`. However, if the model service provider directly forwards the `api.openai.com` domain, you need to add the `/v1` URL by yourself.
|
|
66
|
+
|
|
67
|
+
Related discussions:
|
|
68
|
+
|
|
69
|
+
- [Why is the return value blank after installing Docker, configuring the environment variables?](https://github.com/lobehub/lobe-chat/discussions/623)
|
|
70
|
+
- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobe-chat/discussions/734)
|
|
71
|
+
- [No response when filling in the proxy server address for chatting](https://github.com/lobehub/lobe-chat/discussions/1065)
|
|
61
72
|
|
|
62
73
|
## Azure OpenAI
|
|
63
74
|
|
|
@@ -54,10 +54,21 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
|
|
|
54
54
|
|
|
55
55
|
- 类型:可选
|
|
56
56
|
- 描述:如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL
|
|
57
|
-
- 默认值:`https://api.openai.com`
|
|
58
|
-
- 示例:`https://api.chatanywhere.cn`
|
|
57
|
+
- 默认值:`https://api.openai.com/v1`
|
|
58
|
+
- 示例:`https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
> !\[NOTE] 注意事项:
|
|
61
|
+
>
|
|
62
|
+
> 请检查你的代理服务商的请求后缀,有的代理服务商会在请求后缀添加 `/v1`,有的则不会。
|
|
63
|
+
> 如果你在测试时发现 AI 返回的消息为空,请尝试添加 `/v1` 后缀后重试。
|
|
64
|
+
|
|
65
|
+
是否填写 `/v1` 跟模型服务商有很大关系,比如 openai 的默认地址是 `api.openai.com/v1` 。如果你的代理上是转发了 `/v1` 这个接口,那么直接填 `proxy.com` 即可。 但如果模型服务商是直接转发了 `api.openai.com` 域名,那么你就要自己加上 `/v1` 这个 url。
|
|
66
|
+
|
|
67
|
+
相关讨论:
|
|
68
|
+
|
|
69
|
+
- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/lobe-chat/discussions/623)
|
|
70
|
+
- [使用第三方接口报错的原因](https://github.com/lobehub/lobe-chat/discussions/734)
|
|
71
|
+
- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobe-chat/discussions/1065)
|
|
61
72
|
|
|
62
73
|
## Azure OpenAI
|
|
63
74
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# 代码风格与贡献指南
|
|
2
|
+
|
|
3
|
+
欢迎来到 LobeChat 的代码风格与贡献指南。本指南将帮助您理解我们的代码规范和贡献流程,确保代码的一致性和项目的顺利进行。
|
|
4
|
+
|
|
5
|
+
## 代码风格
|
|
6
|
+
|
|
7
|
+
在 LobeChat 中,我们使用 `@lobehub/lint` 程序包来统一代码风格。该程序包内置了 `ESLint`、`Prettier`、`remarklint` 和 `stylelint` 的配置,以确保我们的 JavaScript、Markdown 和 CSS 文件遵循相同的编码标准。
|
|
8
|
+
|
|
9
|
+
### ESLint
|
|
10
|
+
|
|
11
|
+
我们的项目使用 ESLint 来检查 JavaScript 代码中的问题。您可以在项目根目录下找到 `.eslintrc.js` 文件,其中包含了我们对 `@lobehub/lint` 的 ESLint 配置的扩展和自定义规则。
|
|
12
|
+
|
|
13
|
+
为了与 Next.js 框架兼容,我们在配置中添加了 `plugin:@next/next/recommended`。此外,我们禁用了一些规则,以适应我们项目的特定需求。
|
|
14
|
+
|
|
15
|
+
请在提交代码前运行 ESLint,以确保您的代码符合项目规范。
|
|
16
|
+
|
|
17
|
+
### Prettier
|
|
18
|
+
|
|
19
|
+
Prettier 负责代码格式化,以保证代码的一致性。您可以在 `.prettierrc.js` 中找到我们的 Prettier 配置,它是从 `@lobehub/lint` 导入的。
|
|
20
|
+
|
|
21
|
+
在保存文件时,建议您配置您的编辑器以自动运行 Prettier,或者在提交前手动运行它。
|
|
22
|
+
|
|
23
|
+
### remarklint
|
|
24
|
+
|
|
25
|
+
对于 Markdown 文件,我们使用 remarklint 来确保文档格式的统一。您可以在项目中找到相应的配置文件。
|
|
26
|
+
|
|
27
|
+
### stylelint
|
|
28
|
+
|
|
29
|
+
我们使用 stylelint 来规范 CSS 代码的风格。在 `stylelint` 的配置文件中,我们基于 `@lobehub/lint` 的配置进行了一些自定义规则的调整。
|
|
30
|
+
|
|
31
|
+
确保您的样式代码在提交前通过了 stylelint 的检查。
|
|
32
|
+
|
|
33
|
+
## 贡献流程
|
|
34
|
+
|
|
35
|
+
LobeChat 采用 gitmoji 和 semantic release 作为我们的代码提交和发布流程。
|
|
36
|
+
|
|
37
|
+
### Gitmoji
|
|
38
|
+
|
|
39
|
+
在提交代码时,请使用 gitmoji 来标注您的提交信息。这有助于其他贡献者快速理解您提交的内容和目的。
|
|
40
|
+
|
|
41
|
+
Gitmoji commit messages 使用特定的 emoji 来表示提交的类型或意图。以下是一个示例:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
📝 Update README with contribution guidelines
|
|
45
|
+
|
|
46
|
+
- Added section about code style preferences
|
|
47
|
+
- Included instructions for running tests
|
|
48
|
+
- Corrected typos and improved formatting
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
在这个示例中,📝 emoji 代表了文档的更新。提交信息清晰地描述了更改的内容,提供了具体的细节。
|
|
52
|
+
|
|
53
|
+
### Semantic Release
|
|
54
|
+
|
|
55
|
+
我们使用 semantic release 来自动化版本控制和发布流程。请确保您的提交信息遵循 semantic release 的规范,这样当代码合并到主分支后,系统就可以自动创建新的版本并发布。
|
|
56
|
+
|
|
57
|
+
### Commitlint
|
|
58
|
+
|
|
59
|
+
为了确保提交信息的一致性,我们使用 `commitlint` 来检查提交信息格式。您可以在 `.commitlintrc.js` 配置文件中找到相关规则。
|
|
60
|
+
|
|
61
|
+
在您提交代码之前,请确保您的提交信息遵循我们的规范。
|
|
62
|
+
|
|
63
|
+
### 如何贡献
|
|
64
|
+
|
|
65
|
+
1. Fork 项目到您的账户。
|
|
66
|
+
2. 创建一个新的分支进行开发。
|
|
67
|
+
3. 开发完成后,确保您的代码通过了上述的代码风格检查。
|
|
68
|
+
4. 提交您的更改,并使用合适的 gitmoji 标注您的提交信息。
|
|
69
|
+
5. 创建一个 Pull Request 到原项目的主分支。
|
|
70
|
+
6. 等待代码审查,并根据反馈进行必要的修改。
|
|
71
|
+
|
|
72
|
+
感谢您遵循这些指导原则,它们有助于我们维护项目的质量和一致性。我们期待您的贡献!
|