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
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,12 @@ GOOGLE_MODEL_CACHE_TTL=600
80
80
# Default: 2
81
81
GOOGLE_RETRY_COUNT=2
82
82
83
+
# Default system prompt applied to all chats
84
+
# If a user-defined system prompt exists, this is prepended to it
85
+
# Leave empty to disable
86
+
# Default: "" (empty, disabled)
87
+
GOOGLE_DEFAULT_SYSTEM_PROMPT=""
88
+
83
89
# Image processing optimization settings
84
90
# Maximum image size in MB before compression is applied
85
91
# Default: 15.0
@@ -245,6 +251,47 @@ To use this filter, ensure it's enabled in your Open WebUI configuration. Then,
245
251
246
252
Native tool calling is enabled/disabled via the standard 'Function calling' Open Web UI toggle.
247
253
254
+
## Default System Prompt
255
+
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.
257
+
258
+
### How It Works
259
+
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.
263
+
264
+
### Configuration
265
+
266
+
Set via environment variable:
267
+
268
+
```bash
269
+
# Default system prompt applied to all chats
270
+
# If a user-defined system prompt exists, this is prepended to it
271
+
GOOGLE_DEFAULT_SYSTEM_PROMPT="You are a helpful AI assistant. Always be concise and accurate."
272
+
```
273
+
274
+
Or configure through the pipeline valves in Open WebUI's Admin panel.
275
+
276
+
### Example
277
+
278
+
If your default system prompt is:
279
+
```
280
+
You are a helpful AI assistant.
281
+
```
282
+
283
+
And your model-specific system prompt is:
284
+
```
285
+
Always respond in formal English.
286
+
```
287
+
288
+
The combined system prompt sent to Gemini will be:
289
+
```
290
+
You are a helpful AI assistant.
291
+
292
+
Always respond in formal English.
293
+
```
294
+
248
295
## Thinking Configuration
249
296
250
297
The Google Gemini pipeline supports advanced thinking configuration to control how much reasoning and computation is applied by the model.
0 commit comments