Skip to content

Commit bdb70a4

Browse files
fix(py): update google_genai_hello sample to enable image generation (#3999)
Co-authored-by: Mengqin Shen <[email protected]>
1 parent e2a1508 commit bdb70a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

py/samples/google-genai-hello/src/google_genai_hello.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,9 @@ async def generate_images(name: str, ctx):
328328
The generated response with a function.
329329
"""
330330
result = await ai.generate(
331-
prompt='tell me a about the Eifel Tower with photos',
332-
config=GeminiConfigSchema(response_modalities=['text', 'image']),
331+
model='googleai/gemini-2.5-flash-image',
332+
prompt=f'tell me about {name} with photos',
333+
config=GeminiConfigSchema(response_modalities=['text', 'image']).model_dump(exclude_none=True),
333334
)
334335
return result
335336

0 commit comments

Comments
 (0)