@
@levelsio @levelsio
Sunday, March 16, 2025 import

Tweet

Here's my code to switch off all safety filters on Gemini: [ "model" => "gemini-2.0-flash-exp-image-generation", "contents" => [ [ "role" => "user", "parts" => [ [ "text" => $photo['ai_edit_prompt'] ], [ "inline_data" => [ "mime_type" => "image/png", "data" => $image_data ] ], ] ] ], "safetySettings" => [ [ "category" => "HARM_CATEGORY_HATE_SPEECH", "threshold" => "BLOCK_NONE" ], [ "category" => "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold" => "BLOCK_NONE" ], [ "category" => "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold" => "BLOCK_NONE" ], [ "category" => "HARM_CATEGORY_HARASSMENT", "threshold" => "BLOCK_NONE" ], [ "category" => "HARM_CATEGORY_CIVIC_INTEGRITY", "threshold" => "BLOCK_NONE" ] ], "generationConfig" => [ "temperature" => 1, "topP" => 0.95, "topK" => 40, "maxOutputTokens" => 8192, "responseMimeType" => "text/plain", "responseModalities" => ["image", "text"] ] ]