fix: test_gemini_image_generation_async_stream

This commit is contained in:
Ishaan Jaff 2025-08-30 10:33:23 -07:00
parent efebf7ec7b
commit 3fc2198d27
2 changed files with 5 additions and 5 deletions

View file

@ -1278,10 +1278,10 @@ class VertexGeminiConfig(VertexAIBaseConfig, BaseConfig):
"audio"
] = audio_response
chat_completion_message["content"] = None # OpenAI spec
elif image_response is not None:
if image_response is not None:
# Handle image response - combine with text content into structured format
cast(Dict[str, Any], chat_completion_message)["image"] = image_response
elif content is not None:
if content is not None:
chat_completion_message["content"] = content
if reasoning_content is not None:

View file

@ -591,9 +591,9 @@ async def test_gemini_image_generation_async():
IMAGE_URL = response.choices[0].message.image
print("IMAGE_URL: ", IMAGE_URL)
assert CONTENT is not None
assert IMAGE_URL is not None
assert IMAGE_URL["url"] is not None
assert CONTENT is not None, "CONTENT is not None"
assert IMAGE_URL is not None, "IMAGE_URL is not None"
assert IMAGE_URL["url"] is not None, "IMAGE_URL['url'] is not None"
assert IMAGE_URL["url"].startswith("data:image/png;base64,")