Skip to content

Commit d581554

Browse files
authored
revert: google_gemini.py and google-gemini-integration.md
1 parent 63e2f2f commit d581554

2 files changed

Lines changed: 9 additions & 27 deletions

File tree

docs/google-gemini-integration.md

Lines changed: 4 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://ai.google.dev/)
5+
🔗 [Learn More About Google AI](https://own.dev/ai-google-dev)
66

77
## Pipeline
88

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

1111
## Features
1212

@@ -111,7 +111,7 @@ GOOGLE_API_KEY="your-google-api-key"
111111
```
112112

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

@@ -153,4 +153,4 @@ When enabled, sources and google queries used by Gemini will be displayed with t
153153

154154
## Native tool calling support
155155

156-
Native tool calling is enabled/disabled via the standard 'Function calling' Open Web UI toggle.
156+
Native tool calling is enabled/disabled via the standard 'Function calling' Open Web UI toggle.

pipelines/google/google_gemini.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
author_url: https://github.com/owndev/
55
project_url: https://github.com/owndev/Open-WebUI-Functions
66
funding_url: https://github.com/sponsors/owndev
7-
version: 1.5.2
7+
version: 1.5.1
88
license: Apache License 2.0
99
description: Highly optimized Google Gemini pipeline with advanced image generation capabilities, intelligent compression, and streamlined processing workflows.
1010
features:
@@ -1329,18 +1329,9 @@ async def _handle_streaming_response(
13291329
duration_s = int(
13301330
max(0, time.time() - (thinking_started_at or time.time()))
13311331
)
1332-
# Format each line with > for blockquote while preserving formatting
1333-
thought_content = ''.join(thought_chunks).strip()
1334-
quoted_lines = []
1335-
for line in thought_content.split('\n'):
1336-
quoted_lines.append(f"> {line}")
1337-
quoted_content = '\n'.join(quoted_lines)
1338-
13391332
details_block = f"""<details>
1340-
<summary>Thought ({duration_s}s)</summary>
1341-
1342-
{quoted_content}
1343-
1333+
<summary>Thinking ({duration_s}s)</summary>
1334+
{''.join(thought_chunks)}
13441335
</details>""".strip()
13451336

13461337
# Combine thoughts and answer (images not processed in streaming mode)
@@ -1720,18 +1711,9 @@ async def get_response():
17201711
# If we have thoughts, wrap them using <details>
17211712
if thought_segments:
17221713
duration_s = int(max(0, time.time() - start_ts))
1723-
# Format each line with > for blockquote while preserving formatting
1724-
thought_content = ''.join(thought_segments).strip()
1725-
quoted_lines = []
1726-
for line in thought_content.split('\n'):
1727-
quoted_lines.append(f"> {line}")
1728-
quoted_content = '\n'.join(quoted_lines)
1729-
17301714
details_block = f"""<details>
1731-
<summary>Thought ({duration_s}s)</summary>
1732-
1733-
{quoted_content}
1734-
1715+
<summary>Thinking ({duration_s}s)</summary>
1716+
{''.join(thought_segments)}
17351717
</details>""".strip()
17361718
full_response += details_block
17371719

0 commit comments

Comments
 (0)