|
| 1 | +--- |
| 2 | +title: LobeChat Feature Flags Environment Variables Configuration Guide |
| 3 | +description: >- |
| 4 | + Learn how to use environment variables to customize LobeChat's feature flags, |
| 5 | + including controlling whether a feature is enabled or disabled, or enabling or |
| 6 | + disabling features for specific user groups or environments as needed. |
| 7 | +tags: |
| 8 | + - LobeChat |
| 9 | + - Environment Variables |
| 10 | + - Configuration Guide |
| 11 | + - Feature Flags |
| 12 | +--- |
| 13 | + |
| 14 | +# Feature Flags |
| 15 | + |
| 16 | +In addition to basic environment variable configuration, LobeChat also offers feature flags to control whether a feature is enabled globally, or to enable or disable features for specific user groups or environments as needed. |
| 17 | + |
| 18 | +## Feature Flags Environment Variable `FEATURE_FLAGS` |
| 19 | + |
| 20 | +- Type: Optional |
| 21 | +- Description: Used to control LobeChat's feature functionalities. Supports multiple feature flags, using `+` to add a feature and `-` to disable a feature. Separate multiple feature flags with a comma `,` and enclose the entire value in quotes `"` to avoid parsing errors. |
| 22 | +- Default Value: `-` |
| 23 | +- Example: `"-welcome_suggest"` |
| 24 | + |
| 25 | +All features are controlled by the `FEATURE_FLAGS` variable as the sole configuration variable. |
| 26 | + |
| 27 | +You can achieve various feature combinations using the above configuration syntax. All feature flags are Boolean values, enabled with `+` and disabled with `-`. |
| 28 | + |
| 29 | +<Callout type={'tip'}> |
| 30 | +Attention: Unlike the `OPENAI_MODEL_LIST` variable, the `FEATURE_FLAGS` variable does not support the `all` keyword. You need to manually control all feature flags (otherwise, they will adopt their default values). |
| 31 | +</Callout> |
| 32 | + |
| 33 | +| Configuration Item | Description | Default Value | |
| 34 | +| ------------------------- | --------------------------------- | ------------- | |
| 35 | +| `webrtc_sync` | Enables WebRTC sync functionality.| Enabled | |
| 36 | +| `language_model_settings` | Enables language model settings. | Enabled | |
| 37 | +| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled | |
| 38 | +| `openai_proxy_url` | Allows users to customize the OpenAI proxy URL. | Enabled | |
| 39 | +| `create_session` | Allows users to create sessions. | Enabled | |
| 40 | +| `edit_agent` | Allows users to edit assistants. | Enabled | |
| 41 | +| `dalle` | Enables the DALL-E functionality. | Enabled | |
| 42 | +| `check_updates` | Allows checking for updates. | Enabled | |
| 43 | +| `welcome_suggest` | Displays welcome suggestions. | Enabled | |
| 44 | + |
| 45 | +You can always check the [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/index.ts) to get the latest list of feature flags. |
0 commit comments