[GH-ISSUE #177] Setting Google GenAI Manifold Pipeline to minimum safety blocking by default #85

Closed
opened 2026-10-18 21:02:28 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @rotemdan on GitHub (Jul 27, 2024).
Original GitHub issue: https://github.com/open-webui/pipelines/issues/177

For a harmless prompt like:

What is pig Latin? Is that a language spoken by pigs? Where did that concept come from?

I kept getting a cryptic network errors, although a single token (Pig) did come across:

Uh-oh! There was an issue connecting to Google: Gemini 1.5 Pro Latest.
network error

It turned out it was caused by Gemini safety blocking.

The source code for the pipeline includes the line:

safety_settings = body.get("safety_settings")

But I don't know how exactly the safety_settings settings is passed.

After researching a bit, I found out I can set all "safety" blocking to minimum by changing that to:

            safety_settings = {
                genai.types.HarmCategory.HARM_CATEGORY_HARASSMENT: genai.types.HarmBlockThreshold.BLOCK_NONE,
                genai.types.HarmCategory.HARM_CATEGORY_HATE_SPEECH: genai.types.HarmBlockThreshold.BLOCK_NONE,
                genai.types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: genai.types.HarmBlockThreshold.BLOCK_NONE,
                genai.types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: genai.types.HarmBlockThreshold.BLOCK_NONE,
            }

Now the same prompt does work.

Is anyone interested in making this change as part of the default pipeline source code?

Average, non-programmer users may not be able to make such a source code change on their own. In any case it took me at least 30 minutes to figure out how to do this.

Also, the kind of people who use open-webui and local models are most likely not interested in any unnecessary blocking.

With the default blocking settings, many harmless prompts or messages can produce similar cryptic errors. I believe that LibreChat passes the most permissive blocking thresholds by default (If I recall correctly, I vaguely remember I was the one who opened an issue for that, a long time ago), so I thought about suggesting it here too.

Originally created by @rotemdan on GitHub (Jul 27, 2024). Original GitHub issue: https://github.com/open-webui/pipelines/issues/177 For a harmless prompt like: ``` What is pig Latin? Is that a language spoken by pigs? Where did that concept come from? ``` I kept getting a cryptic network errors, although a single token (`Pig`) did come across: ``` Uh-oh! There was an issue connecting to Google: Gemini 1.5 Pro Latest. network error ``` It turned out it was caused by Gemini safety blocking. The source code for the pipeline includes the line: ```py safety_settings = body.get("safety_settings") ``` But I don't know how exactly the `safety_settings` settings is passed. After researching a bit, I found out I can set all "safety" blocking to minimum by changing that to: ```py safety_settings = { genai.types.HarmCategory.HARM_CATEGORY_HARASSMENT: genai.types.HarmBlockThreshold.BLOCK_NONE, genai.types.HarmCategory.HARM_CATEGORY_HATE_SPEECH: genai.types.HarmBlockThreshold.BLOCK_NONE, genai.types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: genai.types.HarmBlockThreshold.BLOCK_NONE, genai.types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: genai.types.HarmBlockThreshold.BLOCK_NONE, } ``` Now the same prompt does work. Is anyone interested in making this change as part of the default pipeline source code? Average, non-programmer users may not be able to make such a source code change on their own. In any case it took me at least 30 minutes to figure out how to do this. Also, the kind of people who use `open-webui` and local models are most likely not interested in any unnecessary blocking. With the default blocking settings, many harmless prompts or messages can produce similar cryptic errors. I believe that LibreChat passes the most permissive blocking thresholds by default (If I recall correctly, I vaguely remember I was the one who opened an issue for that, a long time ago), so I thought about suggesting it here too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/pipelines#85
No description provided.