@@ -5145,9 +5145,9 @@ def generate_content(
5145
5145
response = client.models.generate_content(
5146
5146
model='gemini-1.5-flash-002',
5147
5147
contents=[
5148
- types.Part.from_text('What is shown in this image?'),
5149
- types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
5150
- 'image/jpeg')
5148
+ types.Part.from_text(text= 'What is shown in this image?'),
5149
+ types.Part.from_uri(file_uri= 'gs://generativeai-downloads/images/scones.jpg',
5150
+ mime_type= 'image/jpeg')
5151
5151
]
5152
5152
)
5153
5153
print(response.text)
@@ -5264,9 +5264,9 @@ def generate_content_stream(
5264
5264
for chunk in client.models.generate_content_stream(
5265
5265
model='gemini-1.5-flash-002',
5266
5266
contents=[
5267
- types.Part.from_text('What is shown in this image?'),
5268
- types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
5269
- 'image/jpeg')
5267
+ types.Part.from_text(text= 'What is shown in this image?'),
5268
+ types.Part.from_uri(file_uri= 'gs://generativeai-downloads/images/scones.jpg',
5269
+ mime_type= 'image/jpeg')
5270
5270
]
5271
5271
):
5272
5272
print(chunk.text)
@@ -6500,9 +6500,9 @@ async def generate_content_stream(
6500
6500
async for chunk in awiat client.aio.models.generate_content_stream(
6501
6501
model='gemini-1.5-flash-002',
6502
6502
contents=[
6503
- types.Part.from_text('What is shown in this image?'),
6504
- types.Part.from_uri('gs://generativeai-downloads/images/scones.jpg',
6505
- 'image/jpeg')
6503
+ types.Part.from_text(text= 'What is shown in this image?'),
6504
+ types.Part.from_uri(file_uri= 'gs://generativeai-downloads/images/scones.jpg',
6505
+ mime_type= 'image/jpeg')
6506
6506
]
6507
6507
):
6508
6508
print(chunk.text)
0 commit comments