🛡️Safety
Last updated
Last updated
The following code snippet shows how to set safety settings in your GenerateContent
call. This sets the harassment (HARM_CATEGORY_HARASSMENT
) and hate speech (HARM_CATEGORY_HATE_SPEECH
) categories to BLOCK_LOW_AND_ABOVE
which blocks any content that has a low or higher probability of being harassment or hate speech.