Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit a9af2cf

Browse files
IMAGE_ENCODING_FIX
1 parent 8d55e7f commit a9af2cf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

IMAGE_ENCODING_FIX.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,18 @@ To verify the fix resolves your issue:
142142

143143
# This now works reliably
144144
image = PIL.Image.open(image_path)
145-
model = genai.GenerativeModel('gemini-1.5-flash')
145+
model = genai.GenerativeModel('gemini-2.0-flash')
146146
response = model.generate_content(['Describe this image', image])
147147
```
148148

149+
### Valid Model Names
150+
151+
Use any of these valid Gemini model names:
152+
- `gemini-2.0-flash` (recommended for most use cases - newest & fast)
153+
- `gemini-2.0-flash-001`
154+
- `gemini-1.5-flash`
155+
- `gemini-1.5-flash-latest`
156+
- `gemini-1.5-pro`
157+
- `gemini-1.5-pro-latest`
158+
149159
Both approaches should work without errors.

0 commit comments

Comments
 (0)