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

Remove block_fewest #581

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions google/generativeai/vision_models/_vision_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def to_mapping_value(value) -> struct_pb2.Struct:
OutputMimeType = Literal["image/png", "image/jpeg"]
OUTPUT_MIME_TYPES = OutputMimeType.__args__ # type: ignore

SafetyFilterLevel = Literal["block_most", "block_some", "block_few", "block_fewest"]
SafetyFilterLevel = Literal["block_most", "block_some", "block_few"]
SAFETY_FILTER_LEVELS = SafetyFilterLevel.__args__ # type: ignore

PersonGeneration = Literal["dont_allow", "allow_adult", "allow_all"]
Expand Down Expand Up @@ -277,14 +277,15 @@ def _generate_images(
Japanese, `"ko"` for Korean, and `"auto"` for automatic language
detection.
safety_filter_level: Adds a filter level to Safety filtering. Supported
values are: * "block_most" : Strongest filtering level, most strict
blocking * "block_some" : Block some problematic prompts and responses
* "block_few" : Block fewer problematic prompts and responses *
"block_fewest" : Block very few problematic prompts and responses
values are:
* "block_most" : Strongest filtering level, most strict blocking
* "block_some" : Block some problematic prompts and responses
* "block_few" : Block fewer problematic prompts and responses
person_generation: Allow generation of people by the model Supported
values are: * "dont_allow" : Block generation of people *
"allow_adult" : Generate adults, but not children * "allow_all" :
Generate adults and children
values are:
* "dont_allow" : Block generation of people
* "allow_adult" : Generate adults, but not children
* "allow_all" : Generate adults and children

Returns:
An `ImageGenerationResponse` object.
Expand Down Expand Up @@ -408,7 +409,6 @@ def generate_images(
blocking
* "block_some" : Block some problematic prompts and responses
* "block_few" : Block fewer problematic prompts and responses
* "block_fewest" : Block very few problematic prompts and responses
person_generation: Allow generation of people by the model Supported
values are:
* "dont_allow" : Block generation of people
Expand Down
Loading