You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/google-gemini-integration.md
+28-14Lines changed: 28 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,15 +253,19 @@ Native tool calling is enabled/disabled via the standard 'Function calling' Open
253
253
254
254
## System Prompt Hierarchy
255
255
256
-
The Google Gemini pipeline supports a hierarchical system prompt configuration that combines multiple sources. This allows for flexible customization at different levels: global defaults, per-user personalization, and per-chat customization.
256
+
The Google Gemini pipeline supports a hierarchical system prompt configuration that combines multiple sources. This allows for flexible customization at different levels: global defaults, model-specific settings, and user preferences.
257
257
258
258
### Prompt Sources (in order of combination)
259
259
260
260
1.**Default System Prompt** (`GOOGLE_DEFAULT_SYSTEM_PROMPT`): Global default applied to all chats, configurable via environment variable or Admin UI valves.
261
261
262
-
2.**Per-User System Prompt** (User Personalization): Each user can set their own system prompt in Open WebUI's Settings > Personalization. This is stored in `settings.ui.system` and is automatically included.
262
+
2.**Model System Prompt**: The system prompt configured in the model settings (Admin > Models > Select Model > System Prompt). This is passed via `__metadata__["chat"]["params"]["system"]`.
263
263
264
-
3.**Chat-Level System Prompt**: The system message defined in the model settings or passed with individual chat messages.
264
+
3.**User System Prompt**: The user's personalized system prompt from either:
265
+
-**User Settings** (Settings > Personalization): Stored in `settings.ui.system`
266
+
-**Chat Controls**: The system message passed with individual chat messages
267
+
268
+
Note: User settings take precedence over chat controls if both are set.
265
269
266
270
### How It Works
267
271
@@ -270,9 +274,9 @@ All available prompts are combined in order, separated by blank lines:
270
274
```
271
275
{Default System Prompt}
272
276
273
-
{Per-User Personalization Prompt}
277
+
{Model System Prompt}
274
278
275
-
{Chat-Level System Prompt}
279
+
{User System Prompt}
276
280
```
277
281
278
282
If only one prompt source is set, it is used as-is without any additional formatting.
@@ -283,20 +287,30 @@ If only one prompt source is set, it is used as-is without any additional format
283
287
284
288
```bash
285
289
# Default system prompt applied to all chats
286
-
# Combined with per-user and chat-level prompts if they exist
290
+
# Combined with model and user prompts if they exist
287
291
GOOGLE_DEFAULT_SYSTEM_PROMPT="You are a helpful AI assistant. Always be concise and accurate."
288
292
```
289
293
290
294
Or configure through the pipeline valves in Open WebUI's Admin panel.
291
295
292
-
**Per-User Personalization:**
296
+
**Model System Prompt:**
297
+
298
+
Configure the model's system prompt in Open WebUI:
299
+
1. Go to Admin > Models
300
+
2. Select the model you want to configure
301
+
3. Enter the system prompt in the "System Prompt" field
302
+
4. Save settings
303
+
304
+
This prompt will be applied to all chats using this model.
305
+
306
+
**User System Prompt:**
293
307
294
308
Users can set their personalized system prompt in Open WebUI:
295
309
1. Go to Settings > Personalization
296
310
2. Enter your preferred system prompt in the "System Prompt" field
297
311
3. Save settings
298
312
299
-
This prompt will be automatically applied to all your Gemini chats, combined with any default and chat-level prompts.
313
+
This prompt will be automatically applied to all your Gemini chats, combined with any default and model prompts.
0 commit comments