Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ Where a `types.ModelContent` is a subclass of `types.Content`, the
from google.genai import types

contents = types.Part.from_uri(
file_uri: 'gs://generativeai-downloads/images/scones.jpg',
mime_type: 'image/jpeg',
file_uri='gs://generativeai-downloads/images/scones.jpg',
mime_type='image/jpeg',
)
```

Expand All @@ -540,8 +540,8 @@ The SDK converts all non function call parts into a content with a `user` role.
[
types.UserContent(parts=[
types.Part.from_uri(
file_uri: 'gs://generativeai-downloads/images/scones.jpg',
mime_type: 'image/jpeg',
file_uri='gs://generativeai-downloads/images/scones.jpg',
mime_type='image/jpeg',
)
])
]
Expand All @@ -555,8 +555,8 @@ from google.genai import types
contents = [
types.Part.from_text('What is this image about?'),
types.Part.from_uri(
file_uri: 'gs://generativeai-downloads/images/scones.jpg',
mime_type: 'image/jpeg',
file_uri='gs://generativeai-downloads/images/scones.jpg',
mime_type='image/jpeg',
)
]
```
Expand All @@ -569,8 +569,8 @@ The SDK will convert the list of parts into a content with a `user` role
parts=[
types.Part.from_text('What is this image about?'),
types.Part.from_uri(
file_uri: 'gs://generativeai-downloads/images/scones.jpg',
mime_type: 'image/jpeg',
file_uri='gs://generativeai-downloads/images/scones.jpg',
mime_type='image/jpeg',
)
]
)
Expand Down
Loading