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
+19-43Lines changed: 19 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,72 +251,48 @@ To use this filter, ensure it's enabled in your Open WebUI configuration. Then,
251
251
252
252
Native tool calling is enabled/disabled via the standard 'Function calling' Open Web UI toggle.
253
253
254
-
## System Prompt Hierarchy
254
+
## Default System Prompt
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 and user preferences.
257
-
258
-
### Prompt Sources (in order of combination)
259
-
260
-
1.**Default System Prompt** (`GOOGLE_DEFAULT_SYSTEM_PROMPT`): Global default applied to all chats, configurable via environment variable or Admin UI valves.
261
-
262
-
2.**User System Prompt**: The user's personalized system prompt from either:
263
-
-**Chat Controls**: The system message passed with individual chat messages
264
-
-**User Settings** (Settings > Personalization): Stored in `settings.ui.system`
265
-
266
-
Note: Chat controls take precedence over user settings if both are set.
256
+
The Google Gemini pipeline supports a configurable default system prompt that is applied to all chats. This is useful when you want to consistently apply certain behaviors or instructions to all Gemini models without having to configure each model individually.
267
257
268
258
### How It Works
269
259
270
-
All available prompts are combined in order, separated by blank lines:
271
-
272
-
```
273
-
{Default System Prompt}
274
-
275
-
{User System Prompt}
276
-
```
277
-
278
-
If only one prompt source is set, it is used as-is without any additional formatting.
260
+
-**Default Only**: If only `GOOGLE_DEFAULT_SYSTEM_PROMPT` is set and no user-defined system prompt exists, the default prompt is used as the system instruction.
261
+
-**User Only**: If only a user-defined system prompt exists (from model settings), it is used as-is.
262
+
-**Both**: If both are set, the default system prompt is **prepended** to the user-defined prompt, separated by a blank line. This allows you to have base instructions that apply to all chats while still allowing model-specific customization.
279
263
280
264
### Configuration
281
265
282
-
**Environment Variable:**
266
+
Set via environment variable:
283
267
284
268
```bash
285
269
# Default system prompt applied to all chats
286
-
#Combined with user prompts if they exist
270
+
#If a user-defined system prompt exists, this is prepended to it
287
271
GOOGLE_DEFAULT_SYSTEM_PROMPT="You are a helpful AI assistant. Always be concise and accurate."
288
272
```
289
273
290
274
Or configure through the pipeline valves in Open WebUI's Admin panel.
291
275
292
-
**User System Prompt:**
293
-
294
-
Users can set their personalized system prompt in Open WebUI:
295
-
1. Go to Settings > Personalization
296
-
2. Enter your preferred system prompt in the "System Prompt" field
297
-
3. Save settings
298
-
299
-
Alternatively, users can override the system prompt per-chat using chat controls. If both are set, the chat controls value takes precedence.
300
-
301
276
### Example
302
277
303
-
If your configuration is:
278
+
If your default system prompt is:
304
279
305
-
**Default system prompt (`GOOGLE_DEFAULT_SYSTEM_PROMPT`):**
306
280
```
307
281
You are a helpful AI assistant.
308
282
```
309
283
310
-
**User system prompt (chat controls OR Settings > Personalization):**
284
+
And your model-specific system prompt is:
285
+
311
286
```
312
-
My name is John. I prefer detailed explanations.
287
+
Always respond in formal English.
313
288
```
314
289
315
290
The combined system prompt sent to Gemini will be:
291
+
316
292
```
317
293
You are a helpful AI assistant.
318
294
319
-
My name is John. I prefer detailed explanations.
295
+
Always respond in formal English.
320
296
```
321
297
322
298
## Thinking Configuration
@@ -438,9 +414,9 @@ print(response.text)
438
414
439
415
### Model Compatibility
440
416
441
-
| Model | thinking_level | thinking_budget |
442
-
|-------|---------------|-----------------|
443
-
| gemini-3-*| ✅ Supported ("low", "high") | ❌ Not used |
444
-
| gemini-2.5-*| ❌ Not used | ✅ Supported (0-32768) |
445
-
| gemini-2.5-flash-image-*| ❌ Not supported | ❌ Not supported |
446
-
| Other models | ❌ Not used | ✅ May be supported |
0 commit comments