Skip to content

Commit

Permalink
Remove block_fewest (#581)
Browse files Browse the repository at this point in the history
* Remove block_fewest

* Format.

Change-Id: Ib65044811345a97078723bb74092913007f517e6

* Remove allow_all
  • Loading branch information
MarkDaoust authored Oct 2, 2024
1 parent bbd5af3 commit 0da9b2d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions google/generativeai/vision_models/_vision_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ 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"]
PersonGeneration = Literal["dont_allow", "allow_adult"]
PERSON_GENERATIONS = PersonGeneration.__args__ # type: ignore


Expand Down Expand Up @@ -277,14 +277,14 @@ 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
Returns:
An `ImageGenerationResponse` object.
Expand Down Expand Up @@ -408,12 +408,10 @@ 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
* "allow_adult" : Generate adults, but not children
* "allow_all" : Generate adults and children
Returns:
An `ImageGenerationResponse` object.
"""
Expand Down

0 comments on commit 0da9b2d

Please sign in to comment.