When sending message to gemini pro I get ResponseBlockedError

Hello,

when calling session.send_message(message, options) I receive intermitently ResponseBlockedError.

I was unable to really pinpoint what I am doing that would trigger that exception.

I have tried multiple HarmBlockThreshold without success. For example:

HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE

I really appreciate any direction you could give.

Thank you.

2 Likes