Skip to content

Commit 15b2144

Browse files
hkt74copybara-github
authored andcommitted
docs: improve generate images documentation
* add docs for person generation config * add aspect ratio supported values PiperOrigin-RevId: 775352393
1 parent 6cc2bdb commit 15b2144

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

google/genai/types.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,11 @@ class PersonGeneration(_common.CaseInSensitiveEnum):
435435
"""Enum that controls the generation of people."""
436436

437437
DONT_ALLOW = 'DONT_ALLOW'
438+
"""Block generation of images of people."""
438439
ALLOW_ADULT = 'ALLOW_ADULT'
440+
"""Generate images of adults, but not children."""
439441
ALLOW_ALL = 'ALLOW_ALL'
442+
"""Generate images that include adults and children."""
440443

441444

442445
class ImagePromptLanguage(_common.CaseInSensitiveEnum):
@@ -5383,7 +5386,8 @@ class GenerateImagesConfig(_common.BaseModel):
53835386
)
53845387
aspect_ratio: Optional[str] = Field(
53855388
default=None,
5386-
description="""Aspect ratio of the generated images.
5389+
description="""Aspect ratio of the generated images. Supported values are
5390+
"1:1", "3:4", "4:3", "9:16", and "16:9".
53875391
""",
53885392
)
53895393
guidance_scale: Optional[float] = Field(
@@ -5468,7 +5472,8 @@ class GenerateImagesConfigDict(TypedDict, total=False):
54685472
"""
54695473

54705474
aspect_ratio: Optional[str]
5471-
"""Aspect ratio of the generated images.
5475+
"""Aspect ratio of the generated images. Supported values are
5476+
"1:1", "3:4", "4:3", "9:16", and "16:9".
54725477
"""
54735478

54745479
guidance_scale: Optional[float]
@@ -6054,7 +6059,8 @@ class EditImageConfig(_common.BaseModel):
60546059
)
60556060
aspect_ratio: Optional[str] = Field(
60566061
default=None,
6057-
description="""Aspect ratio of the generated images.
6062+
description="""Aspect ratio of the generated images. Supported values are
6063+
"1:1", "3:4", "4:3", "9:16", and "16:9".
60586064
""",
60596065
)
60606066
guidance_scale: Optional[float] = Field(
@@ -6138,7 +6144,8 @@ class EditImageConfigDict(TypedDict, total=False):
61386144
"""
61396145

61406146
aspect_ratio: Optional[str]
6141-
"""Aspect ratio of the generated images.
6147+
"""Aspect ratio of the generated images. Supported values are
6148+
"1:1", "3:4", "4:3", "9:16", and "16:9".
61426149
"""
61436150

61446151
guidance_scale: Optional[float]

0 commit comments

Comments
 (0)