Description of the bug:
Hi, trying make a edit image and put a prompt to make something cool in image... but when in run returns: IMAGE_SAFETY in finishReason, but its just a picture of me... i try with other pictures.. sometimes works but the most block but i config SafetySettings in my code:
const safetySettings = [
{
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold: HarmBlockThreshold.BLOCK_ONLY_HIGH,
},
{
category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT, threshold:HarmBlockThreshold.BLOCK_ONLY_HIGH
},
{
category: HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY,
threshold:HarmBlockThreshold.BLOCK_ONLY_HIGH,
}
];
const model = genAI.getGenerativeModel({
model: "gemini-2.0-flash-exp-image-generation",
generationConfig: {
responseModalities: ['Text', 'Image']
},
safetySettings: safetySettings,
});
I already try with BLOCK_NONE but nothing works...
And other issue:
console.log(response.candidates[0].safetyRatings);
that's return:
undefined
I don't think this was supposed to be happening
Actual vs expected behavior:
When i run return IMAGE_SAFETY even if the image be a just simple photo and safety
And safetyRatings returns undefined
but in docs need return the reason category the probability and a boolean if blocked or no:
{
"category": enum (HarmCategory),
"probability": enum (HarmProbability),
"blocked": boolean
}
Any other information you'd like to share?
No response
Description of the bug:
Hi, trying make a edit image and put a prompt to make something cool in image... but when in run returns:
IMAGE_SAFETYin finishReason, but its just a picture of me... i try with other pictures.. sometimes works but the most block but i config SafetySettings in my code:I already try with
BLOCK_NONEbut nothing works...And other issue:
that's return:
undefinedI don't think this was supposed to be happening
Actual vs expected behavior:
When i run return IMAGE_SAFETY even if the image be a just simple photo and safety
And safetyRatings returns
undefinedbut in docs need return the reason category the probability and a boolean if blocked or no:
{ "category": enum (HarmCategory), "probability": enum (HarmProbability), "blocked": boolean }Any other information you'd like to share?
No response