@lobehub/chat 0.147.2 → 0.147.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.env.example +47 -56
  2. package/CHANGELOG.md +58 -0
  3. package/Dockerfile +3 -2
  4. package/README.md +2 -1
  5. package/README.zh-CN.md +7 -6
  6. package/docs/self-hosting/advanced/authentication.mdx +6 -8
  7. package/docs/self-hosting/advanced/authentication.zh-CN.mdx +6 -8
  8. package/docs/self-hosting/advanced/sso-providers/auth0.mdx +2 -2
  9. package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +2 -2
  10. package/docs/self-hosting/advanced/sso-providers/authentik.mdx +2 -2
  11. package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +2 -2
  12. package/docs/self-hosting/advanced/sso-providers/github.mdx +1 -1
  13. package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +2 -2
  14. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +1 -1
  15. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +2 -2
  16. package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +2 -2
  17. package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +2 -2
  18. package/docs/self-hosting/environment-variables/analytics.mdx +1 -1
  19. package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +1 -3
  20. package/docs/self-hosting/environment-variables/model-provider.mdx +19 -21
  21. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +16 -2
  22. package/docs/self-hosting/environment-variables.mdx +2 -1
  23. package/docs/self-hosting/environment-variables.zh-CN.mdx +2 -1
  24. package/docs/self-hosting/examples/azure-openai.mdx +6 -26
  25. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +6 -23
  26. package/docs/self-hosting/examples/ollama.mdx +12 -1
  27. package/docs/self-hosting/examples/ollama.zh-CN.mdx +10 -1
  28. package/docs/self-hosting/platform/docker.mdx +4 -4
  29. package/docs/self-hosting/platform/docker.zh-CN.mdx +4 -4
  30. package/docs/self-hosting/platform/netlify.mdx +1 -1
  31. package/docs/self-hosting/platform/netlify.zh-CN.mdx +1 -1
  32. package/docs/self-hosting/platform/vercel.mdx +1 -1
  33. package/docs/self-hosting/platform/vercel.zh-CN.mdx +1 -1
  34. package/docs/usage/agents/custom-agent.mdx +2 -2
  35. package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
  36. package/docs/usage/features/multi-ai-providers.mdx +7 -1
  37. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +7 -2
  38. package/docs/usage/features/plugin-system.mdx +1 -1
  39. package/docs/usage/features/plugin-system.zh-CN.mdx +2 -2
  40. package/docs/usage/plugins/custom-plugin.mdx +1 -1
  41. package/docs/usage/plugins/custom-plugin.zh-CN.mdx +1 -1
  42. package/docs/usage/providers/ollama/gemma.mdx +3 -3
  43. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +3 -3
  44. package/docs/usage/providers/ollama/qwen.mdx +3 -3
  45. package/docs/usage/providers/ollama/qwen.zh-CN.mdx +3 -3
  46. package/docs/usage/providers/ollama.mdx +3 -3
  47. package/docs/usage/providers/ollama.zh-CN.mdx +3 -3
  48. package/locales/ar/modelProvider.json +5 -0
  49. package/locales/bg-BG/modelProvider.json +5 -0
  50. package/locales/de-DE/modelProvider.json +5 -0
  51. package/locales/en-US/modelProvider.json +5 -0
  52. package/locales/es-ES/modelProvider.json +5 -0
  53. package/locales/fr-FR/modelProvider.json +5 -0
  54. package/locales/it-IT/modelProvider.json +5 -0
  55. package/locales/ja-JP/modelProvider.json +5 -0
  56. package/locales/ko-KR/modelProvider.json +5 -0
  57. package/locales/nl-NL/modelProvider.json +5 -0
  58. package/locales/pl-PL/modelProvider.json +5 -0
  59. package/locales/pt-BR/modelProvider.json +5 -0
  60. package/locales/ru-RU/modelProvider.json +5 -0
  61. package/locales/tr-TR/modelProvider.json +5 -0
  62. package/locales/vi-VN/modelProvider.json +5 -0
  63. package/locales/zh-CN/modelProvider.json +5 -0
  64. package/locales/zh-TW/modelProvider.json +5 -0
  65. package/package.json +2 -2
  66. package/src/app/api/chat/agentRuntime.ts +3 -2
  67. package/src/app/settings/llm/Google/index.tsx +1 -0
  68. package/src/config/modelProviders/openrouter.ts +64 -0
  69. package/src/config/server/provider.ts +2 -0
  70. package/src/const/layoutTokens.ts +1 -1
  71. package/src/libs/agent-runtime/google/index.ts +4 -2
  72. package/src/locales/default/modelProvider.ts +5 -0
package/.env.example CHANGED
@@ -1,14 +1,16 @@
1
1
  # add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
2
- #ACCESS_CODE=lobe66
2
+ # ACCESS_CODE=lobe66
3
3
 
4
4
  # Specify your API Key selection method, currently supporting `random` and `turn`.
5
5
  # API_KEY_SELECT_MODE=random
6
6
 
7
7
 
8
8
  ########################################
9
- ############ OpenAI Service ############
9
+ ######## Model Provider Service ########
10
10
  ########################################
11
11
 
12
+ ### OpenAI ###
13
+
12
14
  # you openai api key
13
15
  OPENAI_API_KEY=sk-xxxxxxxxx
14
16
 
@@ -16,99 +18,88 @@ OPENAI_API_KEY=sk-xxxxxxxxx
16
18
  # OPENAI_PROXY_URL=https://api.openai.com/v1
17
19
 
18
20
  # add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106
19
- #OPENAI_ENABLED_MODELS=gpt-3.5-turbo
21
+ # OPENAI_MODEL_LIST=gpt-3.5-turbo
20
22
 
21
- ########################################
22
- ######### Azure OpenAI Service #########
23
- ########################################
24
- # you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
25
23
 
24
+ ### Azure OpenAI ###
25
+
26
+ # you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
26
27
  # use Azure OpenAI Service by uncomment the following line
27
28
 
28
29
  # The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
29
30
  # AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
30
31
 
31
32
  # The endpoint you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
32
- # OPENAI_PROXY_URL=https://docs-test-001.openai.azure.com
33
+ # AZURE_ENDPOINT=https://docs-test-001.openai.azure.com
33
34
 
34
35
  # Azure's API version, follows the YYYY-MM-DD format
35
- # AZURE_API_VERSION=2023-08-01-preview
36
+ # AZURE_API_VERSION=2024-02-01
36
37
 
37
- ########################################
38
- ############ ZhiPu AI Service ##########
39
- ########################################
40
38
 
41
- #ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx
39
+ ### Anthropic Service ####
42
40
 
43
- ########################################
44
- ########## Moonshot AI Service #########
45
- ########################################
41
+ # ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
46
42
 
47
- #MOONSHOT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
43
+ # use a proxy to connect to the Anthropic API
44
+ # ANTHROPIC_PROXY_URL=https://api.anthropic.com
48
45
 
49
- ########################################
50
- ########### Google AI Service ##########
51
- ########################################
52
46
 
53
- #GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
47
+ ### Google AI ####
54
48
 
55
- ########################################
56
- ######### AWS Bedrock Service ##########
57
- ########################################
49
+ # GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
58
50
 
59
- #AWS_REGION=us-east-1
60
- #AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx
61
- #AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
62
51
 
63
- ########################################
64
- ######### Ollama AI Service ##########
65
- ########################################
52
+ ### AWS Bedrock ###
53
+
54
+ # AWS_REGION=us-east-1
55
+ # AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx
56
+ # AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
57
+
58
+
59
+ ### Ollama AI ####
66
60
 
67
61
  # You can use ollama to get and run LLM locally, learn more about it via https://github.com/ollama/ollama
62
+
68
63
  # The local/remote ollama service url
69
64
  # OLLAMA_PROXY_URL=http://127.0.0.1:11434/v1
70
65
 
71
- ########### Mistral AI Service ##########
72
- ########################################
66
+ # OLLAMA_MODEL_LIST=your_ollama_model_names
67
+
68
+
69
+ ### OpenRouter Service ###
70
+
71
+ # OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
72
+ # OPENROUTER_MODEL_LIST=model1,model2,model3
73
+
74
+
75
+ ### Mistral AI ###
73
76
 
74
77
  # MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
75
78
 
76
- ########################################
77
- ######### Perplexity Service ###########
78
- ########################################
79
+ ### Perplexity Service ###
79
80
 
80
81
  # PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
81
82
 
82
- ########################################
83
- ######### Anthropic Service ############
84
- ########################################
83
+ ### Groq Service ####
85
84
 
86
- # ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
85
+ # GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
87
86
 
88
- ########################################
89
- ############ Groq Service ##############
90
- ########################################
87
+ #### 01.AI Service ####
91
88
 
92
- # GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
89
+ # ZEROONE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
93
90
 
94
- ########################################
95
- ######### OpenRouter Service ##########
96
- ########################################
91
+ ### TogetherAI Service ###
97
92
 
98
- #OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
99
- #OPENROUTER_CUSTOM_MODELS=model1,model2,model3
93
+ # TOGETHERAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
100
94
 
101
- ########################################
102
- ######### 01.AI Service ##########
103
- ########################################
95
+ ### ZhiPu AI ###
104
96
 
105
- #ZEROONE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
97
+ # ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx
106
98
 
107
- ########################################
108
- ######### TogetherAI Service ##########
109
- ########################################
99
+ ### Moonshot AI ####
100
+
101
+ # MOONSHOT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
110
102
 
111
- #TOGETHERAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
112
103
 
113
104
  ########################################
114
105
  ############ Market Service ############
package/CHANGELOG.md CHANGED
@@ -2,6 +2,64 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.147.4](https://github.com/lobehub/lobe-chat/compare/v0.147.3...v0.147.4)
6
+
7
+ <sup>Released on **2024-04-11**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Add more builtin OpenRouter models.
12
+
13
+ #### 💄 Styles
14
+
15
+ - **misc**: Adjust minimum width value for DraggablePanel component.
16
+
17
+ <br/>
18
+
19
+ <details>
20
+ <summary><kbd>Improvements and Fixes</kbd></summary>
21
+
22
+ #### What's fixed
23
+
24
+ - **misc**: Add more builtin OpenRouter models, closes [#1973](https://github.com/lobehub/lobe-chat/issues/1973) ([0000b1a](https://github.com/lobehub/lobe-chat/commit/0000b1a))
25
+
26
+ #### Styles
27
+
28
+ - **misc**: Adjust minimum width value for DraggablePanel component, closes [#1901](https://github.com/lobehub/lobe-chat/issues/1901) ([a696d37](https://github.com/lobehub/lobe-chat/commit/a696d37))
29
+
30
+ </details>
31
+
32
+ <div align="right">
33
+
34
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
35
+
36
+ </div>
37
+
38
+ ### [Version 0.147.3](https://github.com/lobehub/lobe-chat/compare/v0.147.2...v0.147.3)
39
+
40
+ <sup>Released on **2024-04-11**</sup>
41
+
42
+ #### 💄 Styles
43
+
44
+ - **misc**: Support Google Proxy URL.
45
+
46
+ <br/>
47
+
48
+ <details>
49
+ <summary><kbd>Improvements and Fixes</kbd></summary>
50
+
51
+ #### Styles
52
+
53
+ - **misc**: Support Google Proxy URL, closes [#1979](https://github.com/lobehub/lobe-chat/issues/1979) ([fbf2c24](https://github.com/lobehub/lobe-chat/commit/fbf2c24))
54
+
55
+ </details>
56
+
57
+ <div align="right">
58
+
59
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
60
+
61
+ </div>
62
+
5
63
  ### [Version 0.147.2](https://github.com/lobehub/lobe-chat/compare/v0.147.1...v0.147.2)
6
64
 
7
65
  <sup>Released on **2024-04-11**</sup>
package/Dockerfile CHANGED
@@ -58,13 +58,13 @@ ENV PORT=3210
58
58
 
59
59
  # General Variables
60
60
  ENV ACCESS_CODE ""
61
- ENV CUSTOM_MODELS ""
62
61
 
63
62
  ENV API_KEY_SELECT_MODE ""
64
63
 
65
64
  # OpenAI
66
65
  ENV OPENAI_API_KEY ""
67
66
  ENV OPENAI_PROXY_URL ""
67
+ ENV OPENAI_MODEL_LIST ""
68
68
 
69
69
  # Azure OpenAI
70
70
  ENV USE_AZURE_OPENAI ""
@@ -82,6 +82,7 @@ ENV MOONSHOT_API_KEY ""
82
82
 
83
83
  # Ollama
84
84
  ENV OLLAMA_PROXY_URL ""
85
+ ENV OLLAMA_MODEL_LIST ""
85
86
 
86
87
  # Perplexity
87
88
  ENV PERPLEXITY_API_KEY ""
@@ -94,7 +95,7 @@ ENV MISTRAL_API_KEY ""
94
95
 
95
96
  # OpenRouter
96
97
  ENV OPENROUTER_API_KEY ""
97
- ENV OPENROUTER_CUSTOM_MODELS ""
98
+ ENV OPENROUTER_MODEL_LIST ""
98
99
 
99
100
  # 01.AI
100
101
  ENV ZEROONE_API_KEY ""
package/README.md CHANGED
@@ -128,6 +128,7 @@ We have implemented support for the following model service providers:
128
128
  - **Groq**: Accessed Groq's AI models, efficiently processing message sequences and generating responses, capable of multi-turn dialogues and single-interaction tasks. [Learn more](https://groq.com/)
129
129
  - **OpenRouter**: Supports routing of models including **Claude 3**, **Gemma**, **Mistral**, **Llama2** and **Cohere**, with intelligent routing optimization to improve usage efficiency, open and flexible. [Learn more](https://openrouter.ai/)
130
130
  - **01.AI (Yi Model)**: Integrated the 01.AI models, with series of APIs featuring fast inference speed, which not only shortened the processing time, but also maintained excellent model performance. [Learn more](https://01.ai/)
131
+ - **Together.ai**: Over 100 leading open-source Chat, Language, Image, Code, and Embedding models are available through the Together Inference API. For these models you pay just for what you use. [Learn more](https://www.together.ai/)
131
132
 
132
133
  At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/1284).
133
134
 
@@ -459,7 +460,7 @@ This project provides some additional configuration items set with environment v
459
460
  | `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
460
461
  | `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` |
461
462
  | `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` |
462
- | `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` |
463
+ | `OPENAI_MODEL_LIST` | 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` |
463
464
 
464
465
  > \[!NOTE]
465
466
  >
package/README.zh-CN.md CHANGED
@@ -124,6 +124,7 @@
124
124
  - **Anthropic (Claude)**:接入了 Anthropic 的 **Claude** 系列模型,包括 Claude 3 和 Claude 2,多模态突破,超长上下文,树立行业新基准。[了解更多](https://www.anthropic.com/claude)
125
125
  - **ChatGLM**:加入了智谱的 **ChatGLM** 系列模型(GLM-4/GLM-4-vision/GLM-3-turbo),为用户提供了另一种高效的会话模型选择。[了解更多](https://www.zhipuai.cn/)
126
126
  - **Moonshot AI (月之暗面)**:集成了 Moonshot 系列模型,这是一家来自中国的创新性 AI 创业公司,旨在提供更深层次的会话理解。[了解更多](https://www.moonshot.cn/)
127
+ - **Together.ai**:集成部署了数百种开源模型和向量模型,无需本地部署即可随时访问这些模型。[了解更多](https://www.together.ai/)
127
128
  - **01.AI (零一万物)**:集成了零一万物模型,系列 API 具备较快的推理速度,这不仅缩短了处理时间,同时也保持了出色的模型效果。[了解更多](https://www.lingyiwanwu.com/)
128
129
  - **Groq**:接入了 Groq 的 AI 模型,高效处理消息序列,生成回应,胜任多轮对话及单次交互任务。[了解更多](https://groq.com/)
129
130
  - **OpenRouter**:其支持包括 **Claude 3**,**Gemma**,**Mistral**,**Llama2**和**Cohere**等模型路由,支持智能路由优化,提升使用效率,开放且灵活。[了解更多](https://openrouter.ai/)
@@ -435,12 +436,12 @@ $ docker run -d -p 3210:3210 \
435
436
 
436
437
  本项目提供了一些额外的配置项,使用环境变量进行设置:
437
438
 
438
- | 环境变量 | 类型 | 描述 | 示例 |
439
- | ------------------ | ---- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
440
- | `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
441
- | `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
442
- | `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
443
- | `CUSTOM_MODELS` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
439
+ | 环境变量 | 类型 | 描述 | 示例 |
440
+ | ------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
441
+ | `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
442
+ | `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
443
+ | `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
444
+ | `OPENAI_MODEL_LIST` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
444
445
 
445
446
  > \[!NOTE]
446
447
  >
@@ -24,11 +24,11 @@ LobeChat supports the configuration of external identity verification services f
24
24
 
25
25
  Currently supported identity verification services include:
26
26
 
27
- - [Auth0](/en/self-hosting/advanced/sso-providers/auth0)
28
- - [Microsoft Entra ID](/en/self-hosting/advanced/sso-providers/microsoft-entra-id)
29
- - [Authentik](/en/self-hosting/advanced/sso-providers/authentik)
30
- - [Github](/en/self-hosting/advanced/sso-providers/github)
31
- - [ZITADEL](/en/self-hosting/advanced/sso-providers/zitadel)
27
+ - [Auth0](/en/docs/self-hosting/advanced/sso-providers/auth0)
28
+ - [Microsoft Entra ID](/en/docs/self-hosting/advanced/sso-providers/microsoft-entra-id)
29
+ - [Authentik](/en/docs/self-hosting/advanced/sso-providers/authentik)
30
+ - [Github](/en/docs/self-hosting/advanced/sso-providers/github)
31
+ - [ZITADEL](/en/docs/self-hosting/advanced/sso-providers/zitadel)
32
32
 
33
33
  Click on the links to view the corresponding platform's configuration documentation.
34
34
 
@@ -48,6 +48,4 @@ The order corresponds to the display order of the SSO providers.
48
48
 
49
49
  ## Other SSO Providers
50
50
 
51
- Please refer to the [NextAuth.js][next-auth-js] documentation and feel free to submit a Pull Request.
52
-
53
- [next-auth-js]: https://next-auth.js.org/providers
51
+ Please refer to the [NextAuth.js](https://next-auth.js.org/providers) documentation and feel free to submit a Pull Request.
@@ -20,11 +20,11 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
20
20
 
21
21
  目前支持的身份验证服务有:
22
22
 
23
- - [Auth0](/zh/self-hosting/advanced/sso-providers/auth0)
24
- - [Microsoft Entra ID](/zh/self-hosting/advanced/sso-providers/microsoft-entra-id)
25
- - [Authentik](/zh/self-hosting/advanced/sso-providers/authentik)
26
- - [Github](/zh/self-hosting/advanced/sso-providers/github)
27
- - [ZITADEL](/zh/self-hosting/advanced/sso-providers/zitadel)
23
+ - [Auth0](/zh/docs/self-hosting/advanced/sso-providers/auth0)
24
+ - [Microsoft Entra ID](/zh/docs/self-hosting/advanced/sso-providers/microsoft-entra-id)
25
+ - [Authentik](/zh/docs/self-hosting/advanced/sso-providers/authentik)
26
+ - [Github](/zh/docs/self-hosting/advanced/sso-providers/github)
27
+ - [ZITADEL](/zh/docs/self-hosting/advanced/sso-providers/zitadel)
28
28
 
29
29
  点击链接可以查看对应平台的配置文档。
30
30
 
@@ -44,6 +44,4 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
44
44
 
45
45
  ## 其他 SSO 提供商
46
46
 
47
- 请参考 [NextAuth.js][next-auth-js] 文档,欢迎提交 Pull Request。
48
-
49
- [next-auth-js]: https://next-auth.js.org/providers
47
+ 请参考 [NextAuth.js](https://next-auth.js.org/providers) 文档,欢迎提交 Pull Request。
@@ -86,8 +86,8 @@ When deploying LobeChat, you need to configure the following environment variabl
86
86
  | `NEXTAUTH_URL` | Optional | The URL is used to specify the callback address for the execution of OAuth authentication in Auth.js. It needs to be set only when the default address is incorrect. `https://example.com/api/auth` |
87
87
 
88
88
  <Callout type={'tip'}>
89
- You can refer to the related variable details at [📘Environment Variables](/en/self-hosting/environment-variable#auth0).
90
-
89
+ You can refer to the related variable details at [📘Environment Variables](/en/docs/self-hosting/environment-variable#auth0).
90
+
91
91
  </Callout>
92
92
  </Steps>
93
93
 
@@ -81,8 +81,8 @@ http(s)://your-domain/api/auth/callback/auth0
81
81
  | `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
82
82
 
83
83
  <Callout type={'tip'}>
84
- 前往 [📘 环境变量](/zh/self-hosting/environment-variable#auth0) 可查阅相关变量详情。
85
-
84
+ 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#auth0) 可查阅相关变量详情。
85
+
86
86
  </Callout>
87
87
  </Steps>
88
88
 
@@ -64,8 +64,8 @@ When deploying LobeChat, you need to configure the following environment variabl
64
64
  | `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It only needs to be set when the default generated redirect address is incorrect. `https://example.com/api/auth` |
65
65
 
66
66
  <Callout type={'tip'}>
67
- Go to Environment Variables: /en/self-hosting/environment-variable#Authentik for details about the variables.
68
-
67
+ Go to Environment Variables: /en/docs/self-hosting/environment-variable#Authentik for details about the variables.
68
+
69
69
  </Callout>
70
70
  </Steps>
71
71
 
@@ -59,8 +59,8 @@ https://your-domain/api/auth/callback/authentik
59
59
  | `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
60
60
 
61
61
  <Callout type={'tip'}>
62
- 前往 [📘 环境变量](/zh/self-hosting/environment-variable#Authentik) 可查阅相关变量详情。
63
-
62
+ 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Authentik) 可查阅相关变量详情。
63
+
64
64
  </Callout>
65
65
  </Steps>
66
66
 
@@ -91,7 +91,7 @@ When deploying LobeChat, you need to configure the following environment variabl
91
91
  | `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
92
92
 
93
93
  <Callout type={'tip'}>
94
- Go to [📘 Environment Variables](/en/self-hosting/environment-variable#Github) for detailed
94
+ Go to [📘 Environment Variables](/en/docs/self-hosting/environment-variable#Github) for detailed
95
95
  information on these variables.
96
96
  </Callout>
97
97
  </Steps>
@@ -87,8 +87,8 @@ tags:
87
87
  | `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
88
88
 
89
89
  <Callout type={'tip'}>
90
- 前往 [📘 环境变量](/zh/self-hosting/environment-variable#Github) 可查阅相关变量详情。
91
-
90
+ 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Github) 可查阅相关变量详情。
91
+
92
92
  </Callout>
93
93
  </Steps>
94
94
 
@@ -82,7 +82,7 @@ When deploying LobeChat, you need to configure the following environment variabl
82
82
 
83
83
  <Callout type={'tip'}>
84
84
  You can refer to [📘 environment
85
- variables](/en/self-hosting/environment-variable#microsoft-entra-id) for details on related
85
+ variables](/en/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
86
86
  variables.
87
87
  </Callout>
88
88
 
@@ -78,8 +78,8 @@ https://your-domain/api/auth/callback/azure-ad
78
78
  | `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
79
79
 
80
80
  <Callout type={'tip'}>
81
- 前往 [📘 环境变量](/zh/self-hosting/environment-variable#microsoft-entra-id) 可查阅相关变量详情。
82
-
81
+ 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#microsoft-entra-id) 可查阅相关变量详情。
82
+
83
83
  </Callout>
84
84
  </Steps>
85
85
 
@@ -99,8 +99,8 @@ When deploying LobeChat, you need to configure the following environment variabl
99
99
  | `NEXTAUTH_URL` | Optional | The URL is used to specify the callback address for the execution of OAuth authentication in Auth.js. It needs to be set only when the default address is incorrect. `https://example.com/api/auth` |
100
100
 
101
101
  <Callout type={'tip'}>
102
- You can refer to the related variable details at [📘Environment Variables](/en/self-hosting/environment-variables/auth#zitadel).
103
-
102
+ You can refer to the related variable details at [📘Environment Variables](/en/docs/self-hosting/environment-variables/auth#zitadel).
103
+
104
104
  </Callout>
105
105
  </Steps>
106
106
 
@@ -95,8 +95,8 @@ http(s)://your-domain/api/auth/callback/zitadel
95
95
  | `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 中执行 OAuth 认证的回调地址。仅当默认地址不正确时才需要设置。`https://example.com/api/auth` |
96
96
 
97
97
  <Callout type={'tip'}>
98
- 您可以在 [📘 环境变量](/zh/self-hosting/environment-variables/auth#zitadel) 中查看相关变量的详细信息。
99
-
98
+ 您可以在 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#zitadel) 中查看相关变量的详细信息。
99
+
100
100
  </Callout>
101
101
  </Steps>
102
102
 
@@ -14,7 +14,7 @@ tags:
14
14
  - Configuration
15
15
  ---
16
16
 
17
- # Data Statistics
17
+ # Data Analytics
18
18
 
19
19
  We have integrated several free/open-source data analytics services in LobeChat for collecting user usage data. Here are environment variables that you can use.
20
20
 
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  title: 在 LobeChat 中 配置数据统计服务环境变量指南
3
- description: >-
4
- 了解如何在 LobeChat 中配置各种数据统计服务的环境变量,包括Vercel Analytics、Google Analytics、Posthog
5
- Analytics和Umami Analytics。
3
+ description: 了解如何在 LobeChat 中配置各种数据统计服务的环境变量,包括Vercel Analytics、Google Analytics 等。
6
4
  tags:
7
5
  - 数据统计
8
6
  - 环境变量
@@ -2,30 +2,14 @@
2
2
  title: LobeChat Model Service Providers - Environment Variables and Configuration
3
3
  description: >-
4
4
  Learn about the environment variables and configuration settings for various
5
- model service providers like OpenAI, Azure OpenAI, ZHIPU AI, Moonshot AI,
6
- Google AI, AWS Bedrock, Ollama, Perplexity AI, Anthropic AI, Mistral AI, Groq
7
- AI, OpenRouter AI, 01.AI, and TogetherAI.
5
+ model service providers like OpenAI, Google AI, AWS Bedrock, Ollama,
6
+ Perplexity AI, Anthropic AI, Mistral AI, Groq AI, OpenRouter AI, and 01.AI.
8
7
  tags:
9
8
  - Model Service Providers
10
9
  - Environment Variables
11
- - Configuration
12
- - OpenAI
13
- - Azure OpenAI
14
- - ZHIPU AI
15
- - Moonshot AI
16
- - Google AI
17
- - AWS Bedrock
18
- - Ollama
19
- - Perplexity AI
20
- - Anthropic AI
21
- - Mistral AI
22
- - Groq AI
23
- - OpenRouter AI
24
- - 01.AI
25
- - TogetherAI
26
10
  ---
27
11
 
28
- # Model Service Providers
12
+ # Model Providers
29
13
 
30
14
  When deploying LobeChat, a rich set of environment variables related to model service providers is provided, allowing you to easily define the model service providers to be enabled in LobeChat.
31
15
 
@@ -64,7 +48,7 @@ Related discussions:
64
48
  - [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobe-chat/discussions/734)
65
49
  - [No response in chat after filling in the proxy server address](https://github.com/lobehub/lobe-chat/discussions/1065)
66
50
 
67
- ### `CUSTOM_MODELS`
51
+ ### `OPENAI_MODEL_LIST`
68
52
 
69
53
  - Type: Optional
70
54
  - Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas.
@@ -138,6 +122,13 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
138
122
  - Default: -
139
123
  - Example: `AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE`
140
124
 
125
+ ### `GOOGLE_PROXY_URL`
126
+
127
+ - Type: Optional
128
+ - Description: If you manually configure the Google interface proxy, you can use this configuration item to override the default Google API request base URL
129
+ - Default: `https://generativelanguage.googleapis.com`
130
+ - Example: `https://api.genai.gd.edu.kg/google`
131
+
141
132
  ## AWS Bedrock
142
133
 
143
134
  ### `AWS_ACCESS_KEY_ID`
@@ -170,6 +161,13 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
170
161
  - Default: -
171
162
  - Example: `http://127.0.0.1:11434/v1`
172
163
 
164
+ ### `OLLAMA_MODEL_LIST`
165
+
166
+ - Type: Optional
167
+ - Description: Used to customize your own language models
168
+ - Default: -
169
+ - Example: `llama2:7B`
170
+
173
171
  ## Perplexity AI
174
172
 
175
173
  ### `PERPLEXITY_API_KEY`
@@ -215,7 +213,7 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann
215
213
  - Default: -
216
214
  - Example: `sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
217
215
 
218
- ### `OPENROUTER_CUSTOM_MODELS`
216
+ ### `OPENROUTER_MODEL_LIST`
219
217
 
220
218
  - Type: Optional
221
219
  - Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas.
@@ -46,7 +46,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
46
46
  - [使用第三方接口报错的原因](https://github.com/lobehub/lobe-chat/discussions/734)
47
47
  - [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobe-chat/discussions/1065)
48
48
 
49
- ### `CUSTOM_MODELS`
49
+ ### `OPENAI_MODEL_LIST`
50
50
 
51
51
  - 类型:可选
52
52
  - 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。
@@ -120,6 +120,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
120
120
  - 默认值:-
121
121
  - 示例:`AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE`
122
122
 
123
+ ### `GOOGLE_PROXY_URL`
124
+
125
+ - 类型:可选
126
+ - 描述:如果你手动配置了 Google 接口代理,可以使用此配置项来覆盖默认的 Google API 请求基础 URL
127
+ - 默认值:`https://generativelanguage.googleapis.com`
128
+ - 示例:`https://api.genai.gd.edu.kg/google`
129
+
123
130
  ## AWS Bedrock
124
131
 
125
132
  ### `AWS_ACCESS_KEY_ID`
@@ -152,6 +159,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
152
159
  - 默认值:-
153
160
  - 示例:`http://127.0.0.1:11434/v1`
154
161
 
162
+ ### `OLLAMA_MODEL_LIST`
163
+
164
+ - 类型:可选
165
+ - 描述:用于指定自定义 Ollama 语言模型
166
+ - 默认值:-
167
+ - 示例:`qwen:32B`
168
+
155
169
  ## Perplexity AI
156
170
 
157
171
  ### `PERPLEXITY_API_KEY`
@@ -197,7 +211,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
197
211
  - 默认值:-
198
212
  - 示例:`sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=`
199
213
 
200
- ### `OPENROUTER_CUSTOM_MODELS`
214
+ ### `OPENROUTER_MODEL_LIST`
201
215
 
202
216
  - 类型:可选
203
217
  - 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。
@@ -16,6 +16,7 @@ LobeChat provides some additional configuration options when deployed, which can
16
16
 
17
17
  <Cards>
18
18
  <Card href={'environment-variables/basic'} title={'Basic Environment Variables'} />
19
-
20
19
  <Card href={'environment-variables/model-provider'} title={'Model Service Providers'} />
20
+ <Cards href={'environment-variables/auth'} title={'Authentication'} />
21
+ <Cards href={'environment-variables/analytics'} title={'Data Analytics'} />
21
22
  </Cards>
@@ -14,6 +14,7 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
14
14
 
15
15
  <Cards>
16
16
  <Cards href={'environment-variables/basic'} title={'基础环境变量'} />
17
-
18
17
  <Cards href={'environment-variables/model-provider'} title={'模型服务商'} />
18
+ <Cards href={'environment-variables/auth'} title={'身份验证'} />
19
+ <Cards href={'environment-variables/analytics'} title={'数据统计'} />
19
20
  </Cards>