@lobehub/chat 0.128.1 → 0.128.3
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/.github/workflows/issue-close-require.yml +3 -3
- package/.github/workflows/issues-translate.yml +3 -3
- package/.github/workflows/wiki-sync.yml +2 -2
- package/.i18nrc.js +2 -2
- package/CHANGELOG.md +50 -0
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/contributing/Basic/Feature-Development.md +713 -0
- package/{docs/Development → contributing/Basic}/Feature-Development.zh-CN.md +2 -2
- package/{docs/Development → contributing/Basic}/Intro.zh-CN.md +5 -5
- package/{docs → contributing}/Home.md +20 -29
- package/{docs/Development → contributing/Internationalization}/Internationalization-Implementation.zh-CN.md +1 -1
- package/{docs → contributing}/_Sidebar.md +18 -29
- package/docs/agents/concepts.mdx +18 -0
- package/docs/agents/concepts.zh-CN.mdx +17 -0
- package/docs/agents/custom-agent.mdx +34 -0
- package/docs/agents/custom-agent.zh-CN.mdx +31 -0
- package/docs/agents/model.mdx +68 -0
- package/docs/agents/model.zh-CN.mdx +64 -0
- package/docs/agents/prompt.mdx +96 -0
- package/docs/agents/prompt.zh-CN.mdx +97 -0
- package/docs/agents/topics.mdx +7 -0
- package/docs/agents/topics.zh-CN.mdx +6 -0
- package/docs/common-errors/no-v1-suffix.mdx +18 -0
- package/docs/common-errors/no-v1-suffix.zh-CN.mdx +17 -0
- package/docs/common-errors/proxy-with-unable-to-verify-leaf-signature.mdx +70 -0
- package/docs/{Deployment/Common-Error.zh-CN.md → common-errors/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx} +8 -26
- package/docs/environment-variables/common.mdx +215 -0
- package/docs/environment-variables/common.zh-CN.mdx +214 -0
- package/docs/environment-variables/model-provider.mdx +135 -0
- package/docs/environment-variables/model-provider.zh-CN.mdx +133 -0
- package/docs/package.json +5 -0
- package/docs/plugins/basic-usage.mdx +40 -0
- package/docs/{Usage/Plugins.zh-CN.md → plugins/basic-usage.zh-CN.mdx} +7 -21
- package/docs/plugins/custom-plugin.mdx +27 -0
- package/docs/plugins/custom-plugin.zh-CN.mdx +26 -0
- package/docs/plugins/plugin-development.mdx +262 -0
- package/docs/{Plugins/Plugin-Development.zh-CN.md → plugins/plugin-development.zh-CN.mdx} +9 -33
- package/docs/plugins/plugin-store.mdx +10 -0
- package/docs/plugins/plugin-store.zh-CN.mdx +9 -0
- package/docs/self-hosting/analytics.mdx +20 -0
- package/docs/{Deployment/Analytics.zh-CN.md → self-hosting/analytics.zh-CN.mdx} +5 -8
- package/docs/self-hosting/authentication.mdx +94 -0
- package/docs/self-hosting/authentication.zh-CN.mdx +90 -0
- package/docs/self-hosting/deploy-with-azure-openai.mdx +48 -0
- package/docs/{Deployment/Deploy-with-Azure-OpenAI.zh-CN.md → self-hosting/deploy-with-azure-openai.zh-CN.mdx} +16 -21
- package/docs/self-hosting/docker-compose.mdx +121 -0
- package/docs/self-hosting/docker-compose.zh-CN.mdx +121 -0
- package/docs/self-hosting/docker.mdx +152 -0
- package/docs/self-hosting/docker.zh-CN.mdx +149 -0
- package/docs/self-hosting/environment-variable.mdx +340 -0
- package/docs/{Deployment/Environment-Variable.zh-CN.md → self-hosting/environment-variable.zh-CN.mdx} +43 -57
- package/docs/self-hosting/upstream-sync.mdx +66 -0
- package/docs/{Deployment/Upstream-Sync.zh-CN.md → self-hosting/upstream-sync.zh-CN.mdx} +23 -21
- package/docs/self-hosting/vercel.mdx +39 -0
- package/docs/self-hosting/vercel.zh-CN.mdx +39 -0
- package/docs/usage/agent-market.mdx +35 -0
- package/docs/usage/agent-market.zh-CN.mdx +32 -0
- package/docs/usage/mobile.mdx +8 -0
- package/docs/usage/mobile.zh-CN.mdx +7 -0
- package/docs/usage/more.mdx +21 -0
- package/docs/usage/more.zh-CN.mdx +19 -0
- package/docs/usage/plugin-system.mdx +84 -0
- package/docs/usage/plugin-system.zh-CN.mdx +77 -0
- package/docs/usage/pwa.mdx +21 -0
- package/docs/usage/pwa.zh-CN.mdx +21 -0
- package/docs/usage/text-to-image.mdx +5 -0
- package/docs/usage/text-to-image.zh-CN.mdx +6 -0
- package/docs/usage/theme.mdx +17 -0
- package/docs/usage/theme.zh-CN.mdx +15 -0
- package/docs/usage/tts.mdx +26 -0
- package/docs/usage/tts.zh-CN.mdx +24 -0
- package/docs/usage/vision.mdx +8 -0
- package/docs/usage/vision.zh-CN.mdx +7 -0
- package/next.config.mjs +5 -0
- package/package.json +4 -3
- package/scripts/docsWorkflow/const.ts +1 -1
- package/scripts/docsWorkflow/toc.ts +6 -6
- package/src/app/chat/(desktop)/features/ChatHeader.tsx +1 -1
- package/src/app/chat/(desktop)/features/SideBar/SystemRole/index.tsx +1 -1
- package/src/app/chat/settings/(mobile)/features/Header.tsx +1 -1
- package/src/app/welcome/(desktop)/features/Footer.tsx +5 -3
- package/src/config/client.ts +6 -0
- package/src/const/url.ts +10 -1
- package/src/features/Conversation/Messages/index.ts +1 -1
- package/src/features/SideBar/BottomActions.tsx +11 -10
- package/src/locales/default/common.ts +1 -0
- package/docs/Deployment/Analytics.md +0 -20
- package/docs/Deployment/Authentication.md +0 -80
- package/docs/Deployment/Authentication.zh-CN.md +0 -80
- package/docs/Deployment/Common-Error.md +0 -87
- package/docs/Deployment/Deploy-with-Azure-OpenAI.md +0 -54
- package/docs/Deployment/Docker-Deployment.md +0 -219
- package/docs/Deployment/Docker-Deployment.zh-CN.md +0 -217
- package/docs/Deployment/Environment-Variable.md +0 -362
- package/docs/Deployment/Upstream-Sync.md +0 -62
- package/docs/Plugins/Plugin-Development.md +0 -287
- package/docs/Usage/Plugins.md +0 -53
- package/docs/Usage/Usage-Agents.md +0 -201
- package/docs/Usage/Usage-Agents.zh-CN.md +0 -202
- package/docs/Usage/Usage-Topics.md +0 -31
- package/docs/Usage/Usage-Topics.zh-CN.md +0 -31
- /package/{docs/Development → contributing/Basic}/Add-New-Authentication-Providers.md +0 -0
- /package/{docs/Development → contributing/Basic}/Add-New-Authentication-Providers.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Architecture.md +0 -0
- /package/{docs/Development → contributing/Basic}/Architecture.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Chat-API.md +0 -0
- /package/{docs/Development → contributing/Basic}/Chat-API.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Contributing-Guidelines.md +0 -0
- /package/{docs/Development → contributing/Basic}/Contributing-Guidelines.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Feature-Development-Frontend.md +0 -0
- /package/{docs/Development → contributing/Basic}/Feature-Development-Frontend.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Folder-Structure.md +0 -0
- /package/{docs/Development → contributing/Basic}/Folder-Structure.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Intro.md +0 -0
- /package/{docs/Development → contributing/Basic}/Resources.md +0 -0
- /package/{docs/Development → contributing/Basic}/Resources.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Setup-Development.md +0 -0
- /package/{docs/Development → contributing/Basic}/Setup-Development.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Basic}/Test.md +0 -0
- /package/{docs/Development → contributing/Basic}/Test.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Internationalization}/Add-New-Locale.md +0 -0
- /package/{docs/Development → contributing/Internationalization}/Add-New-Locale.zh-CN.md +0 -0
- /package/{docs/Development → contributing/Internationalization}/Internationalization-Implementation.md +0 -0
- /package/{docs → contributing}/Others/Lighthouse.md +0 -0
- /package/{docs → contributing}/Others/Lighthouse.zh-CN.md +0 -0
- /package/{docs/Development → contributing/State-Management}/State-Management-Intro.md +0 -0
- /package/{docs/Development → contributing/State-Management}/State-Management-Intro.zh-CN.md +0 -0
- /package/{docs/Development → contributing/State-Management}/State-Management-Selectors.md +0 -0
- /package/{docs/Development → contributing/State-Management}/State-Management-Selectors.zh-CN.md +0 -0
- /package/{docs → contributing}/_Footer.md +0 -0
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
# Environment Variables
|
|
2
|
-
|
|
3
|
-
LobeChat provides additional configuration options during deployment, which can be set using environment variables
|
|
4
|
-
|
|
5
|
-
#### TOC
|
|
6
|
-
|
|
7
|
-
- [General Variables](#general-variables)
|
|
8
|
-
- [`ACCESS_CODE`](#access_code)
|
|
9
|
-
- [`ENABLE_OAUTH_SSO`](#enable_oauth_sso)
|
|
10
|
-
- [`NEXT_PUBLIC_BASE_PATH`](#next_public_base_path)
|
|
11
|
-
- [Authentication Service Providers](#authentication-service-providers)
|
|
12
|
-
- [Common Settings](#common-settings)
|
|
13
|
-
- [Auth0](#auth0)
|
|
14
|
-
- [Model Service Providers](#model-service-providers)
|
|
15
|
-
- [OpenAI](#openai)
|
|
16
|
-
- [Azure OpenAI](#azure-openai)
|
|
17
|
-
- [Zhipu AI](#zhipu-ai)
|
|
18
|
-
- [Moonshot AI](#moonshot-ai)
|
|
19
|
-
- [Google AI](#google-ai)
|
|
20
|
-
- [AWS Bedrock](#aws-bedrock)
|
|
21
|
-
- [Ollama](#ollama)
|
|
22
|
-
- [Plugin Service](#plugin-service)
|
|
23
|
-
- [`PLUGINS_INDEX_URL`](#plugins_index_url)
|
|
24
|
-
- [`PLUGIN_SETTINGS`](#plugin_settings)
|
|
25
|
-
- [Agent Service](#agent-service)
|
|
26
|
-
- [`AGENTS_INDEX_URL`](#agents_index_url)
|
|
27
|
-
- [Data Analytics](#data-analytics)
|
|
28
|
-
- [Vercel Analytics](#vercel-analytics)
|
|
29
|
-
- [Posthog Analytics](#posthog-analytics)
|
|
30
|
-
- [Umami Analytics](#umami-analytics)
|
|
31
|
-
|
|
32
|
-
## General Variables
|
|
33
|
-
|
|
34
|
-
### `ACCESS_CODE`
|
|
35
|
-
|
|
36
|
-
- Type: Optional
|
|
37
|
-
- Description: Add a password to access the LobeChat service; you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
|
|
38
|
-
- Default: `-`
|
|
39
|
-
- Example: `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3`
|
|
40
|
-
|
|
41
|
-
### `ENABLE_OAUTH_SSO`
|
|
42
|
-
|
|
43
|
-
- Type: Optional
|
|
44
|
-
- Description: Enable OAuth single sign-on (SSO) for LobeChat. Set to `1` to enable OAuth SSO. See [Authentication Service Providers](#authentication-service-providers) for more details.
|
|
45
|
-
- Default: `-`
|
|
46
|
-
- Example: `1`
|
|
47
|
-
|
|
48
|
-
### `NEXT_PUBLIC_BASE_PATH`
|
|
49
|
-
|
|
50
|
-
- Type:Optional
|
|
51
|
-
- Description:add `basePath` for LobeChat
|
|
52
|
-
- Default: `-`
|
|
53
|
-
- Example: `/test`
|
|
54
|
-
|
|
55
|
-
#### `DEFAULT_AGENT_CONFIG`
|
|
56
|
-
|
|
57
|
-
- Type: Optional
|
|
58
|
-
- Description: Used to configure the default configuration of the LobeChat default assistant. It supports various data types and structures, including key-value pairs, nested fields, array values, etc.
|
|
59
|
-
- Default Value: `-`
|
|
60
|
-
- Example: `'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer`
|
|
61
|
-
|
|
62
|
-
`DEFAULT_AGENT_CONFIG` is used to configure the default configuration of the LobeChat default agent. It supports various data types and structures, including key-value pairs, nested fields, array values, etc. The table below provides detailed explanations of the configuration options, examples, and corresponding explanations for the `DEFAULT_AGENT_CONFIG` environment variable:
|
|
63
|
-
|
|
64
|
-
| Configuration Type | Example | Explanation |
|
|
65
|
-
| ----------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
-
| Basic Key-Value Pair | `model=gpt-4` | Set the model to `gpt-4`. |
|
|
67
|
-
| Nested Field | `tts.sttLocale=en-US` | Set the language region for the text-to-speech service to `en-US`. |
|
|
68
|
-
| Array | `plugins=search-engine,lobe-image-designer` | Enable the `search-engine` and `lobe-image-designer` plugins. |
|
|
69
|
-
| Chinese Comma | `plugins=search-engine,lobe-image-designer` | The same as above, demonstrating support for Chinese comma separation. |
|
|
70
|
-
| Multiple Configurations | `model=glm-4;provider=zhipu` | Set the model to `glm-4` and the model provider to `zhipu`. |
|
|
71
|
-
| Numeric Value | `params.max_tokens=300` | Set the maximum number of tokens to `300`. |
|
|
72
|
-
| Boolean Value | `enableAutoCreateTopic=true` | Enable automatic topic creation. |
|
|
73
|
-
| Special Characters | `inputTemplate="Hello; I am a bot;"` | Set the input template to `Hello; I am a bot;`. |
|
|
74
|
-
| Error Handling | `model=gpt-4;maxToken` | Ignore the invalid entry `maxToken` and only parse out `model=gpt-4`. |
|
|
75
|
-
| Value Overriding | `model=gpt-4;model=gpt-4-1106-preview` | If the key is duplicated, use the value that appears last, in this case, the value of `model` is `gpt-4-1106-preview`. |
|
|
76
|
-
|
|
77
|
-
Related discussions:
|
|
78
|
-
|
|
79
|
-
- [\[RFC\] 022 - Default Helper Parameters for Environment Variable Configuration](https://github.com/lobehub/lobe-chat/discussions/913)
|
|
80
|
-
|
|
81
|
-
## Authentication Service Providers
|
|
82
|
-
|
|
83
|
-
### Common Settings
|
|
84
|
-
|
|
85
|
-
#### `NEXTAUTH_SECRET`
|
|
86
|
-
|
|
87
|
-
- Type: Required
|
|
88
|
-
- Description: The secret key used to encrypt the Auth.js session token. You can generate a secret key using the following command: `openssl rand -base64 32`
|
|
89
|
-
- Default: `-`
|
|
90
|
-
- Example: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=`
|
|
91
|
-
|
|
92
|
-
### Auth0
|
|
93
|
-
|
|
94
|
-
> \[!NOTE]
|
|
95
|
-
>
|
|
96
|
-
> We only support the Auth0 authentication service provider at the moment. If you need to use other authentication service providers, you can submit a feature request or pull request.
|
|
97
|
-
|
|
98
|
-
#### `AUTH0_CLIENT_ID`
|
|
99
|
-
|
|
100
|
-
- Type: Required
|
|
101
|
-
- Description: The Client ID of the Auth0 application, you can go [here][auth0-client-page] and navigate to the application settings to view
|
|
102
|
-
- Default: `-`
|
|
103
|
-
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`
|
|
104
|
-
|
|
105
|
-
#### `AUTH0_CLIENT_SECRET`
|
|
106
|
-
|
|
107
|
-
- Type: Required
|
|
108
|
-
- Description: The Client Secret of the Auth0 application
|
|
109
|
-
- Default: `-`
|
|
110
|
-
- Example: `wnX7UbZg85ZUzF6ioxPLnJVEQa1Elbs7aqBUSF16xleBS5AdkVfASS49-fQIC8Rm`
|
|
111
|
-
|
|
112
|
-
#### `AUTH0_ISSUER`
|
|
113
|
-
|
|
114
|
-
- Type: Required
|
|
115
|
-
- Description: The issuer/domain of the Auth0 application
|
|
116
|
-
- Default: `-`
|
|
117
|
-
- Example: `https://example.auth0.com`
|
|
118
|
-
|
|
119
|
-
## Model Service Providers
|
|
120
|
-
|
|
121
|
-
### OpenAI
|
|
122
|
-
|
|
123
|
-
#### `OPENAI_API_KEY`
|
|
124
|
-
|
|
125
|
-
- Type: Required
|
|
126
|
-
- Description: This is the API key you apply for on the OpenAI account page, you can go [here][openai-api-page] to view
|
|
127
|
-
- Default: `-`
|
|
128
|
-
- Example: `sk-xxxxxx...xxxxxx`
|
|
129
|
-
|
|
130
|
-
#### `OPENAI_PROXY_URL`
|
|
131
|
-
|
|
132
|
-
- Type: Optional
|
|
133
|
-
- Description: If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL
|
|
134
|
-
- Default: `https://api.openai.com/v1`
|
|
135
|
-
- Example: `https://api.chatanywhere.cn` or `https://aihubmix.com/v1`
|
|
136
|
-
|
|
137
|
-
> \[!NOTE]
|
|
138
|
-
>
|
|
139
|
-
> 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.
|
|
140
|
-
> If you find that the AI returns an empty message during testing, try adding the `/v1` suffix and retrying.
|
|
141
|
-
|
|
142
|
-
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.
|
|
143
|
-
|
|
144
|
-
Related discussions:
|
|
145
|
-
|
|
146
|
-
- [Why is the return value blank after installing Docker, configuring the environment variables?](https://github.com/lobehub/lobe-chat/discussions/623)
|
|
147
|
-
- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobe-chat/discussions/734)
|
|
148
|
-
- [No response when filling in the proxy server address for chatting](https://github.com/lobehub/lobe-chat/discussions/1065)
|
|
149
|
-
|
|
150
|
-
#### `CUSTOM_MODELS`
|
|
151
|
-
|
|
152
|
-
- Type: Optional
|
|
153
|
-
- Description: 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.
|
|
154
|
-
- Default: `-`
|
|
155
|
-
- Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
|
|
156
|
-
|
|
157
|
-
The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled.
|
|
158
|
-
|
|
159
|
-
You can find all current model names in [modelProviders](https://github.com/lobehub/lobe-chat/tree/main/src/config/modelProviders).
|
|
160
|
-
|
|
161
|
-
### Azure OpenAI
|
|
162
|
-
|
|
163
|
-
If you need to use Azure OpenAI to provide model services, you can refer to the [Deploy with Azure OpenAI](Deploy-with-Azure-OpenAI.zh-CN.md) section for detailed steps. Here are the environment variables related to Azure OpenAI.
|
|
164
|
-
|
|
165
|
-
#### `USE_AZURE_OPENAI`
|
|
166
|
-
|
|
167
|
-
- Type: Optional
|
|
168
|
-
- Description: Set this value to `1` to enable Azure OpenAI configuration
|
|
169
|
-
- Default: `-`
|
|
170
|
-
- Example: `1`
|
|
171
|
-
|
|
172
|
-
#### `AZURE_API_KEY`
|
|
173
|
-
|
|
174
|
-
- Type: Optional
|
|
175
|
-
- Description: This is the API key you apply for on the Azure OpenAI account page
|
|
176
|
-
- Default: `-`
|
|
177
|
-
- Example: `c55168be3874490ef0565d9779ecd5a6`
|
|
178
|
-
|
|
179
|
-
#### `AZURE_API_VERSION`
|
|
180
|
-
|
|
181
|
-
- Type: Optional
|
|
182
|
-
- Description: Azure's API version, following the YYYY-MM-DD format
|
|
183
|
-
- Default: `2023-08-01-preview`
|
|
184
|
-
- Example: `2023-05-15`, refer to [latest version][azure-api-verion-url]
|
|
185
|
-
|
|
186
|
-
<br/>
|
|
187
|
-
|
|
188
|
-
### Zhipu AI
|
|
189
|
-
|
|
190
|
-
#### `ZHIPU_API_KEY`
|
|
191
|
-
|
|
192
|
-
- Type: Required
|
|
193
|
-
- Description: This is the API key you applied for in the Zhipu AI service
|
|
194
|
-
- Default Value: -
|
|
195
|
-
- Example: `4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT`
|
|
196
|
-
|
|
197
|
-
### Moonshot AI
|
|
198
|
-
|
|
199
|
-
#### `MOONSHOT_API_KEY`
|
|
200
|
-
|
|
201
|
-
- Type: Required
|
|
202
|
-
- Description: This is the API key you applied for in the Zhipu AI service
|
|
203
|
-
- Default Value: -
|
|
204
|
-
- Example: `Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=`
|
|
205
|
-
|
|
206
|
-
### Google AI
|
|
207
|
-
|
|
208
|
-
#### `GOOGLE_API_KEY`
|
|
209
|
-
|
|
210
|
-
- Type: Required
|
|
211
|
-
- Description: This is the API key you applied for on Google Cloud Platform, used to access Google AI services
|
|
212
|
-
- Default Value: -
|
|
213
|
-
- Example: `AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE`
|
|
214
|
-
|
|
215
|
-
### AWS Bedrock
|
|
216
|
-
|
|
217
|
-
#### `AWS_ACCESS_KEY_ID`
|
|
218
|
-
|
|
219
|
-
- Type: Required
|
|
220
|
-
- Description: The access key ID for AWS service authentication
|
|
221
|
-
- Default Value: -
|
|
222
|
-
- Example: `AKIA5STVRLFSB4S9HWBR`
|
|
223
|
-
|
|
224
|
-
#### `AWS_SECRET_ACCESS_KEY`
|
|
225
|
-
|
|
226
|
-
- Type: Required
|
|
227
|
-
- Description: The secret key for AWS service authentication
|
|
228
|
-
- Default Value: -
|
|
229
|
-
- Example: `Th3vXxLYpuKcv2BARktPSTPxx+jbSiFT6/0w7oEC`
|
|
230
|
-
|
|
231
|
-
#### `AWS_REGION`
|
|
232
|
-
|
|
233
|
-
- Type: Optional
|
|
234
|
-
- Description: The region setting for AWS services
|
|
235
|
-
- Default Value: `us-east-1`
|
|
236
|
-
- Example: `us-east-1`
|
|
237
|
-
|
|
238
|
-
### Ollama
|
|
239
|
-
|
|
240
|
-
#### `OLLAMA_PROXY_URL`
|
|
241
|
-
|
|
242
|
-
- Type: Optional
|
|
243
|
-
- Description: To enable the Ollama service provider, if set up which will appear as selectable model card in the language model setting page, you can also specify a custom language model.
|
|
244
|
-
- Default: -
|
|
245
|
-
- Example: `http://127.0.0.1:11434/v1`
|
|
246
|
-
|
|
247
|
-
## Plugin Service
|
|
248
|
-
|
|
249
|
-
### `PLUGINS_INDEX_URL`
|
|
250
|
-
|
|
251
|
-
- Type: Optional
|
|
252
|
-
- Description: The index address of the LobeChat plugin market. If you have deployed the plugin market service yourself, you can use this variable to override the default plugin market address
|
|
253
|
-
- Default: `https://chat-plugins.lobehub.com`
|
|
254
|
-
|
|
255
|
-
### `PLUGIN_SETTINGS`
|
|
256
|
-
|
|
257
|
-
- Type: Optional
|
|
258
|
-
- Description: Used to set the plugin settings, the format is `plugin-identifier:key1=value1;key2=value2`, multiple settings fields are separated by semicolons `;`, multiple plugin settings are separated by commas `,`.
|
|
259
|
-
- Default: `-`
|
|
260
|
-
- Example:`search-engine:SERPAPI_API_KEY=xxxxx,plugin-2:key1=value1;key2=value2`
|
|
261
|
-
|
|
262
|
-
The above example adds `search-engine` plugin settings, and sets the `SERPAPI_API_KEY` of the `search-engine` plugin to `xxxxx`, and sets the `key1` of the `plugin-2` plugin to `value1`, and `key2` to `value2`. The generated plugin settings configuration is as follows:
|
|
263
|
-
|
|
264
|
-
```json
|
|
265
|
-
{
|
|
266
|
-
"plugin-2": {
|
|
267
|
-
"key1": "value1",
|
|
268
|
-
"key2": "value2"
|
|
269
|
-
},
|
|
270
|
-
"search-engine": {
|
|
271
|
-
"SERPAPI_API_KEY": "xxxxx"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
## Agent Service
|
|
277
|
-
|
|
278
|
-
### `AGENTS_INDEX_URL`
|
|
279
|
-
|
|
280
|
-
- Type: Optional
|
|
281
|
-
- Description: The index address of the LobeChat role market. If you have deployed the role market service yourself, you can use this variable to override the default plugin market address
|
|
282
|
-
- Default: `https://chat-agents.lobehub.com`
|
|
283
|
-
|
|
284
|
-
<br/>
|
|
285
|
-
|
|
286
|
-
## Data Analytics
|
|
287
|
-
|
|
288
|
-
### Vercel Analytics
|
|
289
|
-
|
|
290
|
-
#### `NEXT_PUBLIC_ANALYTICS_VERCEL`
|
|
291
|
-
|
|
292
|
-
- Type: Optional
|
|
293
|
-
- Description: Environment variable to enable [Vercel Analytics][vercel-analytics-url]. Set to `1` to enable Vercel Analytics.
|
|
294
|
-
- Default: `-`
|
|
295
|
-
- Example: `1`
|
|
296
|
-
|
|
297
|
-
#### `NEXT_PUBLIC_VERCEL_DEBUG`
|
|
298
|
-
|
|
299
|
-
- Type: Optional
|
|
300
|
-
- Description: Enable debug mode for Vercel Analytics.
|
|
301
|
-
- Default: `-`
|
|
302
|
-
- Example: `1`
|
|
303
|
-
|
|
304
|
-
### Posthog Analytics
|
|
305
|
-
|
|
306
|
-
#### `NEXT_PUBLIC_ANALYTICS_POSTHOG`
|
|
307
|
-
|
|
308
|
-
- Type: Optional
|
|
309
|
-
- Description: Environment variable to enable [PostHog Analytics][posthog-analytics-url]. Set to `1` to enable PostHog Analytics.
|
|
310
|
-
- Default: `-`
|
|
311
|
-
- Example: `1`
|
|
312
|
-
|
|
313
|
-
#### `NEXT_PUBLIC_POSTHOG_KEY`
|
|
314
|
-
|
|
315
|
-
- Type: Optional
|
|
316
|
-
- Description: Set the PostHog project key.
|
|
317
|
-
- Default: -
|
|
318
|
-
- Example: `phc_xxxxxxxx`
|
|
319
|
-
|
|
320
|
-
#### `NEXT_PUBLIC_POSTHOG_HOST`
|
|
321
|
-
|
|
322
|
-
- Type: Optional
|
|
323
|
-
- Description: Set the deployment address of the PostHog service. Default is the official SAAS address.
|
|
324
|
-
- Default: `https://app.posthog.com`
|
|
325
|
-
- Example: `https://example.com`
|
|
326
|
-
|
|
327
|
-
#### `NEXT_PUBLIC_POSTHOG_DEBUG`
|
|
328
|
-
|
|
329
|
-
- Type: Optional
|
|
330
|
-
- Description: Enable debug mode for PostHog.
|
|
331
|
-
- Default: -
|
|
332
|
-
- Example: `1`
|
|
333
|
-
|
|
334
|
-
### Umami Analytics
|
|
335
|
-
|
|
336
|
-
#### `NEXT_PUBLIC_ANALYTICS_UMAMI`
|
|
337
|
-
|
|
338
|
-
- Type: Optional
|
|
339
|
-
- Description: Environment variable to enable [Umami Analytics][umami-analytics-url]. Set to `1` to enable Umami Analytics.
|
|
340
|
-
- Default: `-`
|
|
341
|
-
- Example: `1`
|
|
342
|
-
|
|
343
|
-
#### `NEXT_PUBLIC_UMAMI_SCRIPT_URL`
|
|
344
|
-
|
|
345
|
-
- Type: Optional
|
|
346
|
-
- Description: Set the url of the umami script. Default is the script address of Umami Cloud.
|
|
347
|
-
- Default: `https://analytics.umami.is/script.js`
|
|
348
|
-
- Example: `https://umami.your-site.com/script.js`
|
|
349
|
-
|
|
350
|
-
#### `NEXT_PUBLIC_UMAMI_WEBSITE_ID`
|
|
351
|
-
|
|
352
|
-
- Type: Required
|
|
353
|
-
- Description: The website ID in umami
|
|
354
|
-
- Default: `-`
|
|
355
|
-
- Example: `E738D82A-EE9E-4806-A81F-0CA3CAE57F65`
|
|
356
|
-
|
|
357
|
-
[auth0-client-page]: https://manage.auth0.com/dashboard
|
|
358
|
-
[azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
|
|
359
|
-
[openai-api-page]: https://platform.openai.com/account/api-keys
|
|
360
|
-
[posthog-analytics-url]: https://posthog.com
|
|
361
|
-
[umami-analytics-url]: https://umami.is
|
|
362
|
-
[vercel-analytics-url]: https://vercel.com/analytics
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Upstream Sync
|
|
2
|
-
|
|
3
|
-
## TOC
|
|
4
|
-
|
|
5
|
-
- [`A` Vercel / Zeabur Deployment](#a-vercel--zeabur-deployment)
|
|
6
|
-
- [Enabling Automatic Updates](#enabling-automatic-updates)
|
|
7
|
-
- [`B` Docker Deployment](#b-docker-deployment)
|
|
8
|
-
|
|
9
|
-
## `A` Vercel / Zeabur Deployment
|
|
10
|
-
|
|
11
|
-
If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available". This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to accurately detect updates. We suggest you redeploy using the following steps:
|
|
12
|
-
|
|
13
|
-
- Remove the original repository;
|
|
14
|
-
- Use the <kbd>Fork</kbd> button at the top right corner of the page to fork this project;
|
|
15
|
-
- Re-select and deploy on `Vercel`.
|
|
16
|
-
|
|
17
|
-
## Enabling Automatic Updates
|
|
18
|
-
|
|
19
|
-
> \[!NOTE]
|
|
20
|
-
>
|
|
21
|
-
> If you encounter an error executing Upstream Sync, manually Sync Fork once
|
|
22
|
-
|
|
23
|
-
Once you have forked the project, due to Github restrictions, you will need to manually enable Workflows on the Actions page of your forked project and activate the Upstream Sync Action. Once enabled, you can set up hourly automatic updates.
|
|
24
|
-
|
|
25
|
-

|
|
26
|
-

|
|
27
|
-
|
|
28
|
-
## `B` Docker Deployment
|
|
29
|
-
|
|
30
|
-
Upgrading the Docker deployment version is very simple, just redeploy the latest image of LobeChat. Here are the instructions to perform these steps:
|
|
31
|
-
|
|
32
|
-
1. Stop and delete the currently running LobeChat container (assuming the name of the LobeChat container is `lobe-chat`):
|
|
33
|
-
|
|
34
|
-
```fish
|
|
35
|
-
docker stop lobe-chat
|
|
36
|
-
docker rm lobe-chat
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
2. Pull the latest Docker image of LobeChat:
|
|
40
|
-
|
|
41
|
-
```fish
|
|
42
|
-
docker pull lobehub/lobe-chat
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
3. Redeploy the LobeChat container using the newly pulled image:
|
|
46
|
-
|
|
47
|
-
```fish
|
|
48
|
-
docker run -d -p 3210:3210 \
|
|
49
|
-
-e OPENAI_API_KEY=sk-xxxx \
|
|
50
|
-
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
|
51
|
-
-e ACCESS_CODE=lobe66 \
|
|
52
|
-
--name lobe-chat \
|
|
53
|
-
lobehub/lobe-chat
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Make sure you have sufficient permissions to stop and delete the container before executing these commands, and Docker has sufficient permissions to pull the new image.
|
|
57
|
-
|
|
58
|
-
> \[!NOTE]
|
|
59
|
-
>
|
|
60
|
-
> If I redeploy, will my local chat history be lost?
|
|
61
|
-
>
|
|
62
|
-
> Don't worry, all of LobeChat's chat history is stored in your local browser. Therefore, when you redeploy LobeChat using Docker, your chat history will not be lost.
|