@lobehub/chat 1.136.13 → 1.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/add-setting-env.mdc +175 -0
- package/.cursor/rules/db-migrations.mdc +25 -0
- package/.env.example +7 -0
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/docs/development/database-schema.dbml +1 -0
- package/docs/self-hosting/advanced/feature-flags.mdx +25 -15
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +25 -15
- package/docs/self-hosting/environment-variables/basic.mdx +12 -0
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +12 -0
- package/locales/ar/setting.json +8 -0
- package/locales/bg-BG/setting.json +8 -0
- package/locales/de-DE/setting.json +8 -0
- package/locales/en-US/setting.json +8 -0
- package/locales/es-ES/setting.json +8 -0
- package/locales/fa-IR/setting.json +8 -0
- package/locales/fr-FR/setting.json +8 -0
- package/locales/it-IT/setting.json +8 -0
- package/locales/ja-JP/setting.json +8 -0
- package/locales/ko-KR/setting.json +8 -0
- package/locales/nl-NL/setting.json +8 -0
- package/locales/pl-PL/setting.json +8 -0
- package/locales/pt-BR/setting.json +8 -0
- package/locales/ru-RU/setting.json +8 -0
- package/locales/tr-TR/setting.json +8 -0
- package/locales/vi-VN/setting.json +8 -0
- package/locales/zh-CN/setting.json +8 -0
- package/locales/zh-TW/setting.json +8 -0
- package/package.json +1 -1
- package/packages/const/src/settings/image.ts +8 -0
- package/packages/const/src/settings/index.ts +3 -0
- package/packages/context-engine/src/__tests__/pipeline.test.ts +485 -0
- package/packages/context-engine/src/base/__tests__/BaseProcessor.test.ts +381 -0
- package/packages/context-engine/src/base/__tests__/BaseProvider.test.ts +392 -0
- package/packages/context-engine/src/processors/__tests__/MessageCleanup.test.ts +346 -0
- package/packages/context-engine/src/processors/__tests__/ToolCall.test.ts +552 -0
- package/packages/database/migrations/0038_add_image_user_settings.sql +1 -0
- package/packages/database/migrations/meta/0038_snapshot.json +7580 -0
- package/packages/database/migrations/meta/_journal.json +7 -0
- package/packages/database/src/core/migrations.json +6 -0
- package/packages/database/src/models/user.ts +3 -1
- package/packages/database/src/schemas/user.ts +1 -0
- package/packages/file-loaders/src/loaders/docx/index.test.ts +0 -1
- package/packages/file-loaders/src/loaders/excel/__snapshots__/index.test.ts.snap +30 -0
- package/packages/file-loaders/src/loaders/excel/index.test.ts +8 -0
- package/packages/file-loaders/src/loaders/pptx/index.test.ts +25 -0
- package/packages/file-loaders/src/utils/parser-utils.test.ts +155 -0
- package/packages/file-loaders/vitest.config.mts +8 -0
- package/packages/types/src/serverConfig.ts +7 -1
- package/packages/types/src/user/settings/image.ts +3 -0
- package/packages/types/src/user/settings/index.ts +3 -0
- package/src/app/[variants]/(main)/settings/_layout/SettingsContent.tsx +3 -0
- package/src/app/[variants]/(main)/settings/hooks/useCategory.tsx +8 -3
- package/src/app/[variants]/(main)/settings/image/index.tsx +74 -0
- package/src/components/FormInput/FormSliderWithInput.tsx +40 -0
- package/src/components/FormInput/index.ts +1 -0
- package/src/envs/image.ts +27 -0
- package/src/hooks/useFetchAiImageConfig.ts +12 -17
- package/src/locales/default/setting.ts +8 -0
- package/src/server/globalConfig/index.ts +5 -0
- package/src/store/global/initialState.ts +1 -0
- package/src/store/image/slices/generationConfig/action.test.ts +17 -0
- package/src/store/image/slices/generationConfig/action.ts +18 -21
- package/src/store/image/slices/generationConfig/initialState.ts +3 -2
- package/src/store/user/slices/common/action.ts +1 -0
- package/src/store/user/slices/settings/selectors/settings.ts +3 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Guide for adding environment variables to configure user settings
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Adding Environment Variable for User Settings
|
|
7
|
+
|
|
8
|
+
Add server-side environment variables to configure default values for user settings.
|
|
9
|
+
|
|
10
|
+
**Priority**: User Custom > Server Env Var > Hardcoded Default
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
### 1. Define Environment Variable
|
|
15
|
+
|
|
16
|
+
Create `src/envs/<domain>.ts`:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { createEnv } from '@t3-oss/env-nextjs';
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
|
|
22
|
+
export const get<Domain>Config = () => {
|
|
23
|
+
return createEnv({
|
|
24
|
+
server: {
|
|
25
|
+
YOUR_ENV_VAR: z.coerce.number().min(MIN).max(MAX).optional(),
|
|
26
|
+
},
|
|
27
|
+
runtimeEnv: {
|
|
28
|
+
YOUR_ENV_VAR: process.env.YOUR_ENV_VAR,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const <domain>Env = get<Domain>Config();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Update Type (Optional)
|
|
37
|
+
|
|
38
|
+
**Skip this step if the domain field already exists in `GlobalServerConfig`.**
|
|
39
|
+
|
|
40
|
+
Add to `packages/types/src/serverConfig.ts`:
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
export interface GlobalServerConfig {
|
|
44
|
+
<domain>?: {
|
|
45
|
+
<settingName>?: <type>;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Prefer reusing existing types** from `packages/types/src/user/settings` with `PartialDeep`:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import { User<Domain>Config } from './user/settings';
|
|
54
|
+
|
|
55
|
+
export interface GlobalServerConfig {
|
|
56
|
+
<domain>?: PartialDeep<User<Domain>Config>;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 3. Assemble Server Config (Optional)
|
|
61
|
+
|
|
62
|
+
**Skip this step if the domain field already exists in server config.**
|
|
63
|
+
|
|
64
|
+
In `src/server/globalConfig/index.ts`:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { <domain>Env } from '@/envs/<domain>';
|
|
68
|
+
import { cleanObject } from '@/utils/object';
|
|
69
|
+
|
|
70
|
+
export const getServerGlobalConfig = async () => {
|
|
71
|
+
const config: GlobalServerConfig = {
|
|
72
|
+
// ...
|
|
73
|
+
<domain>: cleanObject({
|
|
74
|
+
<settingName>: <domain>Env.YOUR_ENV_VAR,
|
|
75
|
+
}),
|
|
76
|
+
};
|
|
77
|
+
return config;
|
|
78
|
+
};
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If the domain already exists, just add the new field to the existing `cleanObject()`:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
<domain>: cleanObject({
|
|
85
|
+
existingField: <domain>Env.EXISTING_VAR,
|
|
86
|
+
<settingName>: <domain>Env.YOUR_ENV_VAR, // Add this line
|
|
87
|
+
}),
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 4. Merge to User Store (Optional)
|
|
91
|
+
|
|
92
|
+
**Skip this step if the domain field already exists in `serverSettings`.**
|
|
93
|
+
|
|
94
|
+
In `src/store/user/slices/common/action.ts`, add to `serverSettings`:
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
const serverSettings: PartialDeep<UserSettings> = {
|
|
98
|
+
defaultAgent: serverConfig.defaultAgent,
|
|
99
|
+
<domain>: serverConfig.<domain>, // Add this line
|
|
100
|
+
// ...
|
|
101
|
+
};
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 5. Update .env.example
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# <Description> (range/options, default: X)
|
|
108
|
+
# YOUR_ENV_VAR=<example>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 6. Update Documentation
|
|
112
|
+
|
|
113
|
+
Update both English and Chinese documentation:
|
|
114
|
+
- `docs/self-hosting/environment-variables/basic.mdx`
|
|
115
|
+
- `docs/self-hosting/environment-variables/basic.zh-CN.mdx`
|
|
116
|
+
|
|
117
|
+
Add new section or subsection with environment variable details (type, description, default, example, range/constraints).
|
|
118
|
+
|
|
119
|
+
## Type Reuse
|
|
120
|
+
|
|
121
|
+
**Prefer reusing existing types** from `packages/types/src/user/settings` instead of defining inline types in `serverConfig.ts`.
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// ✅ Good - reuse existing type
|
|
125
|
+
import { UserImageConfig } from './user/settings';
|
|
126
|
+
|
|
127
|
+
export interface GlobalServerConfig {
|
|
128
|
+
image?: PartialDeep<UserImageConfig>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// ❌ Bad - inline type definition
|
|
132
|
+
export interface GlobalServerConfig {
|
|
133
|
+
image?: {
|
|
134
|
+
defaultImageNum?: number;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Example: AI_IMAGE_DEFAULT_IMAGE_NUM
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// src/envs/image.ts
|
|
143
|
+
export const getImageConfig = () => {
|
|
144
|
+
return createEnv({
|
|
145
|
+
server: {
|
|
146
|
+
AI_IMAGE_DEFAULT_IMAGE_NUM: z.coerce.number().min(1).max(20).optional(),
|
|
147
|
+
},
|
|
148
|
+
runtimeEnv: {
|
|
149
|
+
AI_IMAGE_DEFAULT_IMAGE_NUM: process.env.AI_IMAGE_DEFAULT_IMAGE_NUM,
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// packages/types/src/serverConfig.ts
|
|
155
|
+
import { UserImageConfig } from './user/settings';
|
|
156
|
+
|
|
157
|
+
export interface GlobalServerConfig {
|
|
158
|
+
image?: PartialDeep<UserImageConfig>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// src/server/globalConfig/index.ts
|
|
162
|
+
image: cleanObject({
|
|
163
|
+
defaultImageNum: imageEnv.AI_IMAGE_DEFAULT_IMAGE_NUM,
|
|
164
|
+
}),
|
|
165
|
+
|
|
166
|
+
// src/store/user/slices/common/action.ts
|
|
167
|
+
const serverSettings: PartialDeep<UserSettings> = {
|
|
168
|
+
image: serverConfig.image,
|
|
169
|
+
// ...
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
// .env.example
|
|
173
|
+
# AI_IMAGE_DEFAULT_IMAGE_NUM=4
|
|
174
|
+
```
|
|
175
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
globs: packages/database/migrations/**/*
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Database Migrations Guide
|
|
7
|
+
|
|
8
|
+
## Defensive Programming - Use Idempotent Clauses
|
|
9
|
+
|
|
10
|
+
Always use defensive clauses to make migrations idempotent:
|
|
11
|
+
|
|
12
|
+
```sql
|
|
13
|
+
-- ✅ Good: Idempotent operations
|
|
14
|
+
ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "avatar" text;
|
|
15
|
+
DROP TABLE IF EXISTS "old_table";
|
|
16
|
+
CREATE INDEX IF NOT EXISTS "users_email_idx" ON "users" ("email");
|
|
17
|
+
ALTER TABLE "posts" DROP COLUMN IF EXISTS "deprecated_field";
|
|
18
|
+
|
|
19
|
+
-- ❌ Bad: Non-idempotent operations
|
|
20
|
+
ALTER TABLE "users" ADD COLUMN "avatar" text;
|
|
21
|
+
DROP TABLE "old_table";
|
|
22
|
+
CREATE INDEX "users_email_idx" ON "users" ("email");
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Important**: After modifying migration SQL (e.g., adding `IF NOT EXISTS` clauses), run `bun run db:generate-client` to update the hash in `packages/database/src/core/migrations.json`.
|
package/.env.example
CHANGED
|
@@ -169,6 +169,13 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
|
|
169
169
|
|
|
170
170
|
# FAL_API_KEY=fal-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
171
171
|
|
|
172
|
+
########################################
|
|
173
|
+
######### AI Image Settings ############
|
|
174
|
+
########################################
|
|
175
|
+
|
|
176
|
+
# Default image generation count (range: 1-20, default: 4)
|
|
177
|
+
# AI_IMAGE_DEFAULT_IMAGE_NUM=4
|
|
178
|
+
|
|
172
179
|
### Nebius ###
|
|
173
180
|
|
|
174
181
|
# NEBIUS_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 1.137.0](https://github.com/lobehub/lobe-chat/compare/v1.136.13...v1.137.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2025-10-12**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Add new setting for default image num.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Add new setting for default image num, closes [#9618](https://github.com/lobehub/lobe-chat/issues/9618) ([de7368b](https://github.com/lobehub/lobe-chat/commit/de7368b))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.136.13](https://github.com/lobehub/lobe-chat/compare/v1.136.12...v1.136.13)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2025-10-12**</sup>
|
package/changelog/v1.json
CHANGED
|
@@ -31,20 +31,30 @@ You can achieve various feature combinations using the above configuration synta
|
|
|
31
31
|
their default values).
|
|
32
32
|
</Callout>
|
|
33
33
|
|
|
34
|
-
| Configuration Item | Description
|
|
35
|
-
| ------------------------- |
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
34
|
+
| Configuration Item | Description | Default Value |
|
|
35
|
+
| ------------------------- | -------------------------------------------------------------------------------------------------------- | ------------- |
|
|
36
|
+
| `check_updates` | Allows checking for updates. | Enabled |
|
|
37
|
+
| `pin_list` | Controls pinned agent list display in sidebar. | Disabled |
|
|
38
|
+
| `language_model_settings` | Enables language model settings. | Enabled |
|
|
39
|
+
| `provider_settings` | Controls model provider settings display. | Enabled |
|
|
40
|
+
| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled |
|
|
41
|
+
| `openai_proxy_url` | Allows users to customize the OpenAI proxy URL. | Enabled |
|
|
42
|
+
| `api_key_manage` | Controls access to API key management page (/profile/apikey). | Disabled |
|
|
43
|
+
| `create_session` | Allows users to create sessions. | Enabled |
|
|
44
|
+
| `edit_agent` | Allows users to edit assistants. | Enabled |
|
|
45
|
+
| `plugins` | Controls plugin functionality in chat and agent settings. | Enabled |
|
|
46
|
+
| `dalle` | Enables the DALL-E functionality. | Enabled |
|
|
47
|
+
| `ai_image` | Controls AI image generation feature and page (/image). | Enabled |
|
|
48
|
+
| `speech_to_text` | Enables speech-to-text functionality. | Enabled |
|
|
49
|
+
| `token_counter` | Reserved for token counter display. | Enabled |
|
|
50
|
+
| `welcome_suggest` | Displays welcome suggestions. | Enabled |
|
|
51
|
+
| `changelog` | Controls changelog modal/page display. | Enabled |
|
|
52
|
+
| `clerk_sign_up` | Enables the Clerk SignUp functionality. | Enabled |
|
|
53
|
+
| `market` | Enables the assistant market functionality. | Enabled |
|
|
54
|
+
| `knowledge_base` | Enables the knowledge base functionality. | Enabled |
|
|
55
|
+
| `rag_eval` | Controls RAG evaluation feature (/repos/\[id]/evals). | Disabled |
|
|
56
|
+
| `cloud_promotion` | Controls cloud service promotion link display in user menu. | Disabled |
|
|
57
|
+
| `commercial_hide_github` | Hides GitHub-related links in settings footer (requires commercial license). | Disabled |
|
|
58
|
+
| `commercial_hide_docs` | Hides documentation and help menu including changelog, docs, and feedback (requires commercial license). | Disabled |
|
|
49
59
|
|
|
50
60
|
You can always check the [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) to get the latest list of feature flags.
|
|
@@ -28,20 +28,30 @@ tags:
|
|
|
28
28
|
关键字,你需要手动控制所有的功能标志(否则它们会采用对应的默认值)。
|
|
29
29
|
</Callout>
|
|
30
30
|
|
|
31
|
-
| 配置项 | 解释
|
|
32
|
-
| ------------------------- |
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
31
|
+
| 配置项 | 解释 | 默认值 |
|
|
32
|
+
| ------------------------- | ------------------------------------ | --- |
|
|
33
|
+
| `check_updates` | 允许检查更新。 | 开启 |
|
|
34
|
+
| `pin_list` | 控制侧边栏中置顶助手列表的显示。 | 关闭 |
|
|
35
|
+
| `language_model_settings` | 启用语言模型设置。 | 开启 |
|
|
36
|
+
| `provider_settings` | 控制模型供应商设置的显示。 | 开启 |
|
|
37
|
+
| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 |
|
|
38
|
+
| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 |
|
|
39
|
+
| `api_key_manage` | 控制 API 密钥管理页面 (/profile/apikey) 的访问。 | 关闭 |
|
|
40
|
+
| `create_session` | 允许用户创建会话。 | 开启 |
|
|
41
|
+
| `edit_agent` | 允许用户编辑助手。 | 开启 |
|
|
42
|
+
| `plugins` | 控制聊天和助手设置中的插件功能。 | 开启 |
|
|
43
|
+
| `dalle` | 启用 DALL-E 功能。 | 开启 |
|
|
44
|
+
| `ai_image` | 控制 AI 图像生成功能和页面 (/image)。 | 开启 |
|
|
45
|
+
| `speech_to_text` | 启用语音转文本功能。 | 开启 |
|
|
46
|
+
| `token_counter` | 保留用于令牌计数器显示。 | 开启 |
|
|
47
|
+
| `welcome_suggest` | 显示欢迎建议。 | 开启 |
|
|
48
|
+
| `changelog` | 控制更新日志弹窗 / 页面的显示。 | 开启 |
|
|
49
|
+
| `clerk_sign_up` | 启用 Clerk 注册功能。 | 开启 |
|
|
50
|
+
| `market` | 启用助手市场功能。 | 开启 |
|
|
51
|
+
| `knowledge_base` | 启用知识库功能。 | 开启 |
|
|
52
|
+
| `rag_eval` | 控制 RAG 评估功能 (/repos/\[id]/evals)。 | 关闭 |
|
|
53
|
+
| `cloud_promotion` | 控制用户菜单中云服务推广链接的显示。 | 关闭 |
|
|
54
|
+
| `commercial_hide_github` | 隐藏设置页面底部的 GitHub 相关链接(需要商业授权)。 | 关闭 |
|
|
55
|
+
| `commercial_hide_docs` | 隐藏文档和帮助菜单,包括更新日志、文档和反馈(需要商业授权)。 | 关闭 |
|
|
46
56
|
|
|
47
57
|
你可以随时检查 [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) 以获取最新的特性标志列表。
|
|
@@ -152,6 +152,18 @@ For specific content, please refer to the [Feature Flags](/docs/self-hosting/adv
|
|
|
152
152
|
- Default: -
|
|
153
153
|
- Example: `https://cdn.example.com`
|
|
154
154
|
|
|
155
|
+
## AI Image
|
|
156
|
+
|
|
157
|
+
### `AI_IMAGE_DEFAULT_IMAGE_NUM`
|
|
158
|
+
|
|
159
|
+
- Type: Optional
|
|
160
|
+
- Description: Sets the default number of images to generate for AI image generation. Users can still override this value in their settings.
|
|
161
|
+
- Default: `4`
|
|
162
|
+
- Example: `6`
|
|
163
|
+
- Range: `1-20`
|
|
164
|
+
|
|
165
|
+
This environment variable allows administrators to customize the default image generation count for their deployment. The value must be between 1 and 20. If not set, it defaults to 4. Users can still adjust this value in their personal settings.
|
|
166
|
+
|
|
155
167
|
## Plugin Service
|
|
156
168
|
|
|
157
169
|
### `PLUGINS_INDEX_URL`
|
|
@@ -148,6 +148,18 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
|
|
|
148
148
|
- 默认值:-
|
|
149
149
|
- 示例:`https://cdn.example.com`
|
|
150
150
|
|
|
151
|
+
## AI 图像
|
|
152
|
+
|
|
153
|
+
### `AI_IMAGE_DEFAULT_IMAGE_NUM`
|
|
154
|
+
|
|
155
|
+
- 类型:可选
|
|
156
|
+
- 描述:设置 AI 图像生成的默认图片数量。用户仍可在个人设置中覆盖此值。
|
|
157
|
+
- 默认值:`4`
|
|
158
|
+
- 示例:`6`
|
|
159
|
+
- 范围:`1-20`
|
|
160
|
+
|
|
161
|
+
此环境变量允许管理员为其部署自定义默认图片生成数量。值必须在 1 到 20 之间。如果未设置,默认为 4。用户仍可在个人设置中调整此值。
|
|
162
|
+
|
|
151
163
|
## 插件服务
|
|
152
164
|
|
|
153
165
|
### `PLUGINS_INDEX_URL`
|
package/locales/ar/setting.json
CHANGED
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "الإعدادات العامة"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "اضبط عدد الصور الافتراضي عند إنشاء مهمة جديدة في لوحة توليد الصور.",
|
|
300
|
+
"label": "عدد الصور الافتراضي",
|
|
301
|
+
"title": "إعدادات الرسم بالذكاء الاصطناعي"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "تمكين الحد الأقصى للردود"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "إعدادات عامة",
|
|
550
557
|
"experiment": "تجربة",
|
|
551
558
|
"hotkey": "اختصارات لوحة المفاتيح",
|
|
559
|
+
"image": "الرسم بالذكاء الاصطناعي",
|
|
552
560
|
"llm": "نموذج اللغة",
|
|
553
561
|
"provider": "مزود خدمة الذكاء الاصطناعي",
|
|
554
562
|
"proxy": "وكيل الشبكة",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "Общи настройки"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Задайте броя на изображенията по подразбиране, които да се генерират при създаване на нова задача в панела за генериране на изображения.",
|
|
300
|
+
"label": "Брой изображения по подразбиране",
|
|
301
|
+
"title": "Настройки за AI рисуване"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Активиране на ограничението за максимален брой токени"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Общи настройки",
|
|
550
557
|
"experiment": "Експеримент",
|
|
551
558
|
"hotkey": "Бързи клавиши",
|
|
559
|
+
"image": "AI рисуване",
|
|
552
560
|
"llm": "Езиков модел",
|
|
553
561
|
"provider": "AI доставчик",
|
|
554
562
|
"proxy": "Мрежов прокси",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "Allgemeine Einstellungen"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Legen Sie die Standardanzahl der Bilder fest, die beim Erstellen einer neuen Aufgabe im Bildgenerierungs-Panel erzeugt werden.",
|
|
300
|
+
"label": "Standardanzahl der Bilder",
|
|
301
|
+
"title": "AI-Zeichnungseinstellungen"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Maximale Token pro Antwort aktivieren"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Allgemeine Einstellungen",
|
|
550
557
|
"experiment": "Experiment",
|
|
551
558
|
"hotkey": "Tastenkombinationen",
|
|
559
|
+
"image": "AI-Zeichnung",
|
|
552
560
|
"llm": "Sprachmodell",
|
|
553
561
|
"provider": "KI-Dienstanbieter",
|
|
554
562
|
"proxy": "Netzwerkproxy",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "General Settings"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Set the default number of images generated when creating a new task in the image generation panel.",
|
|
300
|
+
"label": "Default Image Count",
|
|
301
|
+
"title": "AI Drawing Settings"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Enable Max Tokens Limit"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Common Settings",
|
|
550
557
|
"experiment": "Experiment",
|
|
551
558
|
"hotkey": "Hotkeys",
|
|
559
|
+
"image": "AI Drawing",
|
|
552
560
|
"llm": "Language Model",
|
|
553
561
|
"provider": "AI Service Provider",
|
|
554
562
|
"proxy": "Network Proxy",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "Configuración Común"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Establece la cantidad predeterminada de imágenes al crear una nueva tarea en el panel de generación de imágenes.",
|
|
300
|
+
"label": "Cantidad de imágenes predeterminada",
|
|
301
|
+
"title": "Configuración de dibujo con IA"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Activar límite de tokens por respuesta"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Configuración común",
|
|
550
557
|
"experiment": "Experimento",
|
|
551
558
|
"hotkey": "Atajos de teclado",
|
|
559
|
+
"image": "Dibujo con IA",
|
|
552
560
|
"llm": "Modelo de lenguaje",
|
|
553
561
|
"provider": "Proveedor de servicios de IA",
|
|
554
562
|
"proxy": "Proxy de red",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "تنظیمات عمومی"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "تعداد پیشفرض تصاویر تولیدشده هنگام ایجاد یک وظیفه جدید را در پنل تولید تصویر تنظیم کنید.",
|
|
300
|
+
"label": "تعداد پیشفرض تصاویر",
|
|
301
|
+
"title": "تنظیمات نقاشی هوش مصنوعی"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "فعالسازی محدودیت پاسخ"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "تنظیمات عمومی",
|
|
550
557
|
"experiment": "آزمایش",
|
|
551
558
|
"hotkey": "کلیدهای میانبر",
|
|
559
|
+
"image": "نقاشی هوش مصنوعی",
|
|
552
560
|
"llm": "مدل زبان",
|
|
553
561
|
"provider": "ارائه دهنده خدمات هوش مصنوعی",
|
|
554
562
|
"proxy": "پروکسی شبکه",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "Paramètres généraux"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Définir le nombre d'images générées par défaut lors de la création d'une nouvelle tâche dans le panneau de génération d'images.",
|
|
300
|
+
"label": "Nombre d'images par défaut",
|
|
301
|
+
"title": "Paramètres de dessin IA"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Activer la limite de tokens par réponse"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Paramètres généraux",
|
|
550
557
|
"experiment": "Expérience",
|
|
551
558
|
"hotkey": "Raccourcis clavier",
|
|
559
|
+
"image": "Dessin IA",
|
|
552
560
|
"llm": "Modèle de langue",
|
|
553
561
|
"provider": "Fournisseur de services d'IA",
|
|
554
562
|
"proxy": "Proxy réseau",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "Impostazioni Generali"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Imposta il numero predefinito di immagini da generare quando si crea una nuova attività nel pannello di generazione immagini.",
|
|
300
|
+
"label": "Numero predefinito di immagini",
|
|
301
|
+
"title": "Impostazioni AI per il disegno"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Abilita limite di risposta singola"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Impostazioni comuni",
|
|
550
557
|
"experiment": "实验",
|
|
551
558
|
"hotkey": "Scorciatoie",
|
|
559
|
+
"image": "Disegno AI",
|
|
552
560
|
"llm": "Modello linguistico",
|
|
553
561
|
"provider": "Fornitore di servizi AI",
|
|
554
562
|
"proxy": "Proxy di rete",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "一般設定"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "新しいタスクを作成する際に、画像生成パネルでのデフォルト画像数を設定します。",
|
|
300
|
+
"label": "デフォルト画像数",
|
|
301
|
+
"title": "AI画像設定"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "単一応答制限を有効にする"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "一般設定",
|
|
550
557
|
"experiment": "実験",
|
|
551
558
|
"hotkey": "ショートカットキー",
|
|
559
|
+
"image": "AI画像生成",
|
|
552
560
|
"llm": "言語モデル",
|
|
553
561
|
"provider": "AIサービスプロバイダー",
|
|
554
562
|
"proxy": "ネットワークプロキシ",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "일반 설정"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "새 작업을 생성할 때 이미지 생성 패널의 기본 이미지 수를 설정합니다.",
|
|
300
|
+
"label": "기본 이미지 수",
|
|
301
|
+
"title": "AI 그림 설정"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "단일 응답 제한 활성화"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "일반 설정",
|
|
550
557
|
"experiment": "실험",
|
|
551
558
|
"hotkey": "단축키",
|
|
559
|
+
"image": "AI 그림",
|
|
552
560
|
"llm": "언어 모델",
|
|
553
561
|
"provider": "AI 서비스 제공자",
|
|
554
562
|
"proxy": "네트워크 프록시",
|
|
@@ -294,6 +294,13 @@
|
|
|
294
294
|
},
|
|
295
295
|
"title": "Algemene instellingen"
|
|
296
296
|
},
|
|
297
|
+
"settingImage": {
|
|
298
|
+
"defaultCount": {
|
|
299
|
+
"desc": "Stel het standaard aantal afbeeldingen in dat wordt gegenereerd wanneer een nieuwe taak wordt aangemaakt.",
|
|
300
|
+
"label": "Standaard aantal afbeeldingen",
|
|
301
|
+
"title": "AI Tekeninstellingen"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
297
304
|
"settingModel": {
|
|
298
305
|
"enableMaxTokens": {
|
|
299
306
|
"title": "Limiet voor enkele reacties inschakelen"
|
|
@@ -549,6 +556,7 @@
|
|
|
549
556
|
"common": "Algemene instellingen",
|
|
550
557
|
"experiment": "Experiment",
|
|
551
558
|
"hotkey": "Sneltoetsen",
|
|
559
|
+
"image": "AI Tekeningen",
|
|
552
560
|
"llm": "Taalmodel",
|
|
553
561
|
"provider": "AI-dienstverlener",
|
|
554
562
|
"proxy": "Netwerkproxy",
|