mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix: test_gemini_image_generation_async_stream
This commit is contained in:
parent
efebf7ec7b
commit
3fc2198d27
2 changed files with 5 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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,")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue