Skip to content

Commit 76ccd8b

Browse files
authored
Merge branch 'master' into 59-streaming-support-for-n8n-pipeline
Signed-off-by: owndev <69784886+owndev@users.noreply.github.com>
2 parents 6a4b27f + 9726ce8 commit 76ccd8b

3 files changed

Lines changed: 479 additions & 144 deletions

File tree

README.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,17 @@
2727

2828
## Prerequisites 🔗
2929

30-
> [!WARNING]
30+
> [!IMPORTANT]
3131
> To use these functions, ensure the following requirements are met:
32-
33-
1. **An Active Open WebUI Instance**: You must have [Open WebUI](https://github.com/open-webui/open-webui) installed and running.
34-
35-
2. **Required AI Services (if applicable)**: Some pipelines require external AI services, such as [Azure AI](https://ai.azure.com/).
36-
37-
3. **Admin Access**: To install functions in Open WebUI, you must have administrator privileges.
32+
>
33+
> 1. **An Active Open WebUI Instance**: You must have [Open WebUI](https://github.com/open-webui/open-webui) installed and running.
34+
> 2. **Required AI Services (if applicable)**: Some pipelines require external AI services, such as [Azure AI](https://ai.azure.com/).
35+
> 3. **Admin Access**: To install functions in Open WebUI, you must have administrator privileges.
3836
3937
## Installation 🚀
4038

41-
To install and configure functions in Open WebUI, follow these steps:
39+
> [!TIP]
40+
> Follow these steps to install and configure functions in Open WebUI:
4241
4342
1. **Ensure Admin Access**:
4443

@@ -66,6 +65,9 @@ To install and configure functions in Open WebUI, follow these steps:
6665

6766
## Security Features 🛡️
6867

68+
> [!WARNING]
69+
> **API Key Security**: Always use encryption for sensitive information like API keys!
70+
6971
### API Key Encryption
7072

7173
The functions include a built-in encryption mechanism for sensitive information:
@@ -75,21 +77,18 @@ The functions include a built-in encryption mechanism for sensitive information:
7577
- **Transparent Usage**: The encryption/decryption happens automatically when values are accessed.
7678
- **No Configuration Required**: Works out-of-the-box when [WEBUI_SECRET_KEY](https://docs.openwebui.com/getting-started/env-configuration/#webui_secret_key) is set.
7779

78-
**To enable encryption:**
79-
80-
> [!CAUTION]
81-
> **WEBUI_SECRET_KEY is required for encryption to work!**
80+
> [!IMPORTANT]
81+
> **To enable encryption**, set the `WEBUI_SECRET_KEY` environment variable:
8282
>
8383
> ```bash
8484
> # Set this in your Open WebUI environment or .env file
8585
> WEBUI_SECRET_KEY="your-secure-random-string"
8686
> ```
87-
>
88-
> Without this key, API keys and sensitive data will **not** be encrypted.
8987
9088
## Pipelines 🧩
9189
92-
Pipelines are processing functions that extend Open WebUI with **custom AI models**, **external integrations**, and **data manipulation logic**.
90+
> [!NOTE]
91+
> Pipelines are processing functions that extend Open WebUI with **custom AI models**, **external integrations**, and **data manipulation logic**.
9392
9493
### **1. [Azure AI Foundry Pipeline](./pipelines/azure/azure_ai_foundry.py)**
9594
@@ -101,6 +100,8 @@ Pipelines are processing functions that extend Open WebUI with **custom AI model
101100
- Enables interaction with **Azure OpenAI** and other **Azure AI** models.
102101
- Supports Azure Search integration for enhanced document retrieval.
103102
- Supports multiple Azure AI models selection via the `AZURE_AI_MODEL` environment variable (e.g. `gpt-4o;gpt-4o-mini`).
103+
- Customizable pipeline display with configurable prefix via `AZURE_AI_PIPELINE_PREFIX`.
104+
- Azure AI Search / RAG integration with enhanced collapsible citation display (Azure OpenAI only).
104105
- Filters valid parameters to ensure clean requests.
105106
- Handles both streaming and non-streaming responses.
106107
- Provides configurable error handling and timeouts.
@@ -148,14 +149,19 @@ Pipelines are processing functions that extend Open WebUI with **custom AI model
148149
- **Configurable Parameters**: Environment variables for image optimization (quality, max dimensions, format conversion).
149150
- Grounding with Google search with [google_search_tool.py filter](./filters/google_search_tool.py)
150151
- Native tool calling support
152+
- Configurable API version support
151153
152154
🔗 [Google Gemini Pipeline in Open WebUI](https://openwebui.com/f/owndev/google_gemini)
153155
154156
🔗 [Learn More About Google Gemini](https://ai.google.dev/gemini-api/docs?hl=de)
155157
158+
> [!NOTE]
159+
> **For LiteLLM Users**: To use Google Gemini models through LiteLLM, configure LiteLLM directly in Open WebUI's Admin Panel → Settings → Connections → OpenAI section instead of using this pipeline. For more information about LiteLLM, visit the [official LiteLLM GitHub repository](https://github.com/BerriAI/litellm).
160+
156161
## Filters 🔍
157162
158-
Filters allow for **preprocessing and postprocessing** of data within Open WebUI.
163+
> [!NOTE]
164+
> Filters allow for **preprocessing and postprocessing** of data within Open WebUI.
159165
160166
### **1. [Time Token Tracker](./filters/time_token_tracker.py)**
161167
@@ -194,16 +200,19 @@ Look here for [Google Gemini Integration](./docs/google-gemini-integration.md).
194200
195201
## Contribute 💪
196202
197-
We accept different types of contributions, including some that don't require you to write a single line of code.
198-
For detailed instructions on how to get started with our project, see [about contributing to Open-WebUI-Functions](https://own.dev/github-owndev-open-webui-functions-contributing).
203+
> [!TIP]
204+
> We welcome contributions of all kinds! You don't need to write code to contribute.
205+
>
206+
> For detailed instructions on how to get started with our project, see [about contributing to Open-WebUI-Functions](./.github/CONTRIBUTING.md).
199207
200208
## License 📜
201209
202210
This project is licensed under the [Apache License 2.0](./LICENSE) - see the [LICENSE](./LICENSE) file for details. 📄
203211
204212
## Support 💬
205213
206-
If you have any questions, suggestions, or need assistance, please open an [issue](../../issues/new/choose) to connect with us! 🤝
214+
> [!NOTE]
215+
> If you have any questions, suggestions, or need assistance, please open an [issue](../../issues/new/choose) to connect with us! 🤝
207216
208217
## Star History 💫
209218
@@ -217,4 +226,4 @@ If you have any questions, suggestions, or need assistance, please open an [issu
217226
218227
---
219228
220-
Created by [owndev](https://own.dev/github) - Let's make Open WebUI even more amazing together! 💪
229+
Created by [owndev](https://github.com/owndev) - Let's make Open WebUI even more amazing together! 💪

docs/google-gemini-integration.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
This integration enables **Open WebUI** to interact with **Google Gemini** models via the official Google Generative AI API (using API Keys) or through Google Cloud Vertex AI (leveraging Google Cloud's infrastructure and authentication). It provides a robust and customizable pipeline to access text and multimodal generation capabilities from Google’s latest AI models.
44

5-
🔗 [Learn More About Google AI](https://own.dev/ai-google-dev)
5+
🔗 [Learn More About Google AI](https://ai.google.dev/)
66

77
## Pipeline
88

9-
- 🧩 [Google Gemini Pipeline](https://own.dev/github-owndev-open-webui-functions-google-gemini)
9+
- 🧩 [Google Gemini Pipeline](../pipelines/google/google_gemini.py)
1010

1111
## Features
1212

@@ -52,7 +52,10 @@ This integration enables **Open WebUI** to interact with **Google Gemini** model
5252
- **Grounding with Google search**
5353
Improve the accuracy and recency of Gemini responses with Google search grounding.
5454

55-
- **Native tool calling support**
55+
- **Ability to forward User Headers and change gemini base url**
56+
Forward user information headers (like Name, Id, Email and Role) to Google API or LiteLLM for better context and analytics. Also, change the base URL for the Google Generative AI API if needed.
57+
58+
- **Native tool calling support**
5659
Leverage Google genai native function calling to orchestrate the use of tools
5760

5861
## Environment Variables
@@ -95,6 +98,23 @@ GOOGLE_IMAGE_ENABLE_OPTIMIZATION=true
9598
# Default: 0.5
9699
GOOGLE_IMAGE_PNG_THRESHOLD_MB=0.5
97100

101+
# Maximum number of images (history + current message) sent per request
102+
# Default: 5
103+
GOOGLE_IMAGE_HISTORY_MAX_REFERENCES=5
104+
105+
# Add inline labels like [Image 1] before each image to allow references in follow-up prompts
106+
# Default: true
107+
GOOGLE_IMAGE_ADD_LABELS=true
108+
109+
# Deduplicate identical images from history (hash-based) to reduce payload size
110+
# Default: true
111+
GOOGLE_IMAGE_DEDUP_HISTORY=true
112+
113+
# Boolean: When true (default) history images come before current message images.
114+
# When false, current message images are placed first.
115+
# Default: true
116+
GOOGLE_IMAGE_HISTORY_FIRST=true
117+
98118
# Enable fallback to data URL when image upload fails
99119
# Default: true
100120
GOOGLE_IMAGE_UPLOAD_FALLBACK=true
@@ -111,7 +131,7 @@ GOOGLE_API_KEY="your-google-api-key"
111131
```
112132

113133
> [!TIP]
114-
> You can obtain your API key from the [Google AI Studio](https://own.dev/aistudio-google-com) dashboard after signing up.
134+
> You can obtain your API key from the [Google AI Studio](https://aistudio.google.com/) dashboard after signing up.
115135
116136
### Connection Method: Google Cloud Vertex AI
117137

0 commit comments

Comments
 (0)