Skip to content

Commit 42b59b4

Browse files
authored
Using the part accessor in save_image
1 parent c7c3f90 commit 42b59b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickstarts/Image_out.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"# Save the image\n",
246246
"# If there are multiple ones, only the last one will be saved\n",
247247
"def save_image(response, path):\n",
248-
" for part in response.candidates[0].content.parts:\n",
248+
" for part in response.parts:\n",
249249
" if image:= part.as_image():\n",
250250
" image.save(path)"
251251
]

0 commit comments

Comments
 (0)