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

[FEATURE] New HarmCategory Added by GoogleGenerativeAI Last Week CIVIC #3137

Open
akwin1234 opened this issue Sep 3, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@akwin1234
Copy link

Python code example:
`model = genai.GenerativeModel(
model_name="gemini-1.5-flash-exp-0827",#gemini-1.5-pro-exp-0827
generation_config=generation_config,

safety_settings = Adjust safety settings

See https://ai.google.dev/gemini-api/docs/safety-settings

safety_settings={
HarmCategory.HARM_CATEGORY_HATE_SPEECH: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_HARASSMENT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE,
HarmCategory.HARM_CATEGORY_CIVIC_INTEGRITY: HarmBlockThreshold.BLOCK_NONE,
}
`

Please add option for CIVIC Category.
You can not see it in official Docs but my above code works fine.,
You can see this category in AI studio too, just not in docs yet.

@HenryHengZJ HenryHengZJ added the enhancement New feature or request label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants