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

How can I remove/reduce the safety options? #266

Open
DimitrisAndreou opened this issue Feb 21, 2024 · 0 comments
Open

How can I remove/reduce the safety options? #266

DimitrisAndreou opened this issue Feb 21, 2024 · 0 comments
Labels
type:bug Something isn't working

Comments

@DimitrisAndreou
Copy link

Description of the bug:

My python code looks like this:

      response = await model.generate_content_async(
        prompt,
        generation_config={
          'temperature': 0.0, 'max_output_tokens': expectedOutputTokens
        },
        safety_settings={
            "HARM_CATEGORY_DANGEROUS": "block_none",
            "HARM_CATEGORY_HARASSMENT": "block_none",
            "HARM_CATEGORY_HATE_SPEECH": "block_none",
            "HARM_CATEGORY_SEXUAL": "block_none"
            })

It produces internal errors (500) when I try to specify safety_settings as above. Is this not the right way? I'm trying to reduce the number of errors I get due to safety. Thanks!

Actual vs expected behavior:

Would expect this either to fail early with a message telling me what's wrong with my arguments, or for it to work as expected, while producing fewer errors of the sort "response blocked because of safety"

Any other information you'd like to share?

No response

@DimitrisAndreou DimitrisAndreou added the type:bug Something isn't working label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant