Skip to content

Commit 3fc2198

Browse files
committed
fix: test_gemini_image_generation_async_stream
1 parent efebf7e commit 3fc2198

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,10 +1278,10 @@ def _process_candidates(
12781278
"audio"
12791279
] = audio_response
12801280
chat_completion_message["content"] = None # OpenAI spec
1281-
elif image_response is not None:
1281+
if image_response is not None:
12821282
# Handle image response - combine with text content into structured format
12831283
cast(Dict[str, Any], chat_completion_message)["image"] = image_response
1284-
elif content is not None:
1284+
if content is not None:
12851285
chat_completion_message["content"] = content
12861286

12871287
if reasoning_content is not None:

tests/llm_translation/test_gemini.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ async def test_gemini_image_generation_async():
591591
IMAGE_URL = response.choices[0].message.image
592592
print("IMAGE_URL: ", IMAGE_URL)
593593

594-
assert CONTENT is not None
595-
assert IMAGE_URL is not None
596-
assert IMAGE_URL["url"] is not None
594+
assert CONTENT is not None, "CONTENT is not None"
595+
assert IMAGE_URL is not None, "IMAGE_URL is not None"
596+
assert IMAGE_URL["url"] is not None, "IMAGE_URL['url'] is not None"
597597
assert IMAGE_URL["url"].startswith("data:image/png;base64,")
598598

599599

0 commit comments

Comments
 (0)