-
Notifications
You must be signed in to change notification settings - Fork 12
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
SafetySettings can be easier and less error-prone. #8
Comments
Yes, this is due to the backwards compatibility with the PaLM 2 models. I'm going to add a region to the enum to make it easier to read. Plus, going to add it to the Xmldoc of each value. Thanks for your time to point it out. Really appreciate it. |
The default safety settings are the ones used when you pass |
New version 0.9.1 should make it clearer. Plus, there is the official documentation about Safety settings in Gemini that apply. |
Where is the Do you mean you wont send |
Yes, it's an optional element of the request. Similarly, you can check the default
|
In Safety settings doc, there is a section:
In the
HarmCategory
enum, there are much more to choose from.What if I just want to use Gemini API, the coding DX is not that good.
Here is my code snippet. I listed all to my code and commented all options I don't want. This is to avoid someone after me take over my code and someone put it to the list by accident.
It maybe there is a way to make sure someone will not make this mistake. That details should be hidden from the library.
For example, provide a set of default common SafetySetting list for the users? See below:
The
DefaultSafetySettings.BlockOnlyHigh
equals to:I don't have a good idea right now. What do you think?
The text was updated successfully, but these errors were encountered: