Update src/llm_models/model_client/gemini_client.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -82,9 +82,7 @@ def _convert_messages(
|
|||||||
content: List[Part] = []
|
content: List[Part] = []
|
||||||
for item in message.content:
|
for item in message.content:
|
||||||
if isinstance(item, tuple):
|
if isinstance(item, tuple):
|
||||||
image_format = item[0].lower()
|
image_format = "jpeg" if item[0].lower() == "jpg" else item[0].lower()
|
||||||
if image_format == "jpg":
|
|
||||||
image_format = "jpeg"
|
|
||||||
content.append(
|
content.append(
|
||||||
Part.from_bytes(data=base64.b64decode(item[1]), mime_type=f"image/{image_format}")
|
Part.from_bytes(data=base64.b64decode(item[1]), mime_type=f"image/{image_format}")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user