Skip to content

Commit 0da9b2d

Browse files
authored
Remove block_fewest (#581)
* Remove block_fewest * Format. Change-Id: Ib65044811345a97078723bb74092913007f517e6 * Remove allow_all
1 parent bbd5af3 commit 0da9b2d

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

google/generativeai/vision_models/_vision_models.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def to_mapping_value(value) -> struct_pb2.Struct:
104104
OutputMimeType = Literal["image/png", "image/jpeg"]
105105
OUTPUT_MIME_TYPES = OutputMimeType.__args__ # type: ignore
106106

107-
SafetyFilterLevel = Literal["block_most", "block_some", "block_few", "block_fewest"]
107+
SafetyFilterLevel = Literal["block_most", "block_some", "block_few"]
108108
SAFETY_FILTER_LEVELS = SafetyFilterLevel.__args__ # type: ignore
109109

110-
PersonGeneration = Literal["dont_allow", "allow_adult", "allow_all"]
110+
PersonGeneration = Literal["dont_allow", "allow_adult"]
111111
PERSON_GENERATIONS = PersonGeneration.__args__ # type: ignore
112112

113113

@@ -277,14 +277,14 @@ def _generate_images(
277277
Japanese, `"ko"` for Korean, and `"auto"` for automatic language
278278
detection.
279279
safety_filter_level: Adds a filter level to Safety filtering. Supported
280-
values are: * "block_most" : Strongest filtering level, most strict
281-
blocking * "block_some" : Block some problematic prompts and responses
282-
* "block_few" : Block fewer problematic prompts and responses *
283-
"block_fewest" : Block very few problematic prompts and responses
280+
values are:
281+
* "block_most" : Strongest filtering level, most strict blocking
282+
* "block_some" : Block some problematic prompts and responses
283+
* "block_few" : Block fewer problematic prompts and responses
284284
person_generation: Allow generation of people by the model Supported
285-
values are: * "dont_allow" : Block generation of people *
286-
"allow_adult" : Generate adults, but not children * "allow_all" :
287-
Generate adults and children
285+
values are:
286+
* "dont_allow" : Block generation of people
287+
* "allow_adult" : Generate adults, but not children
288288
289289
Returns:
290290
An `ImageGenerationResponse` object.
@@ -408,12 +408,10 @@ def generate_images(
408408
blocking
409409
* "block_some" : Block some problematic prompts and responses
410410
* "block_few" : Block fewer problematic prompts and responses
411-
* "block_fewest" : Block very few problematic prompts and responses
412411
person_generation: Allow generation of people by the model Supported
413412
values are:
414413
* "dont_allow" : Block generation of people
415414
* "allow_adult" : Generate adults, but not children
416-
* "allow_all" : Generate adults and children
417415
Returns:
418416
An `ImageGenerationResponse` object.
419417
"""

0 commit comments

Comments
 (0)