def test_bedrock_converse_integration_chat_multimodal(
    temp_image_bytes, bedrock_converse_integration
):
    """Test multimodal chat (text + image) integration with Bedrock Converse."""
    llm = bedrock_converse_integration
    messages = [
        ChatMessage(
            role=MessageRole.USER,
            blocks=[ImageBlock(image=temp_image_bytes, image_mimetype="image/png")],
        ),
        ChatMessage(
            role=MessageRole.USER,
            blocks=[TextBlock(text="What color do you see in the image above?")],
        ),
    ]

    response = llm.chat(messages)

    assert isinstance(response, ChatResponse)
    assert response.message.role == MessageRole.ASSISTANT
    assert isinstance(response.message.content, str)
    assert "red" in response.message.content.lower()
Test multimodal chat (text + image) integration with Bedrock Converse.
llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/test_llms_bedrock_converse.py