Skip to content

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Python

update gemini to use ultra high media resolution

Abi Raja404ba32b1f1d
diff --git a/backend/models/gemini.py b/backend/models/gemini.py
index fb0df9ab..fea938db 100644
--- a/backend/models/gemini.py
+++ b/backend/models/gemini.py
@@ -81,6 +81,7 @@ def convert_message_to_gemini_content(
types.Part.from_bytes(
data=base64.b64decode(image_data["data"]),
mime_type=image_data["mime_type"],
+ media_resolution=types.PartMediaResolutionLevel.MEDIA_RESOLUTION_ULTRA_HIGH,
)
)