Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safety Settings in Google geminı Chat Model doesn't work #12700

Open
xconkhi9x opened this issue Jan 19, 2025 · 4 comments
Open

Safety Settings in Google geminı Chat Model doesn't work #12700

xconkhi9x opened this issue Jan 19, 2025 · 4 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@xconkhi9x
Copy link

Bug Description

When I texted Gemini, though adjusting the Safety Category to Block_none all. They are still censored and do not send feedback.
I tested the same question on AI Studio and Gemini completely answered.

To Reproduce

  1. Send Message
  2. Wait Gemini responded
  3. Error

Expected behavior

{
"errorMessage": "[GoogleGenerativeAI Error]: Candidate was blocked due to SAFETY",
"errorDetails": {},
"n8nDetails": {
"time": "06:51:07 19/1/2025",
"n8nVersion": "1.74.3 (Self Hosted)",
"binaryDataMode": "default",
"cause": {
"response": {
"candidates": [
{
"finishReason": "SAFETY",
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "LOW"
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE"
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "MEDIUM",
"blocked": true
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE"
}
]
}
],
"usageMetadata": {
"promptTokenCount": 1326,
"candidatesTokenCount": 65,
"totalTokenCount": 1391
},
"modelVersion": "gemini-2.0-flash-exp"
}
}
}
}

Operating System

Ubuntu linux 22.04

n8n Version

1.74.3

Node.js Version

20.18.1

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Jan 19, 2025

Hey @xconkhi9x,

We have created an internal ticket to look into this which we will be tracking as "N8N-8158"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Jan 19, 2025
@burivuhster
Copy link
Contributor

@xconkhi9x , can you please help us to reproduce this issue by sharing the workflow JSON?

@xconkhi9x
Copy link
Author

Main_2.json

@jeanpaul
Copy link
Contributor

@xconkhi9x thank you for sharing the workflow. Unfortunately, I can't reproduce the error. Can you send us the input that triggered the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

4 participants