Home / Function/ test_format_message_content_mixed() — langchain Function Reference

test_format_message_content_mixed() — langchain Function Reference

Architecture documentation for the test_format_message_content_mixed() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9135e9c1_f766_dae5_d776_eaebd0c92d87["test_format_message_content_mixed()"]
  5bf2e477_37e0_3e98_4042_bc609f2f7f60["test_chat_models.py"]
  9135e9c1_f766_dae5_d776_eaebd0c92d87 -->|defined in| 5bf2e477_37e0_3e98_4042_bc609f2f7f60
  style 9135e9c1_f766_dae5_d776_eaebd0c92d87 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/groq/tests/unit_tests/test_chat_models.py lines 999–1009

def test_format_message_content_mixed() -> None:
    """Test that mixed content with text and image is handled correctly."""
    content = [
        {"type": "text", "text": "Describe this image"},
        {"type": "image", "base64": "<data>", "mime_type": "image/png"},
    ]
    expected = [
        {"type": "text", "text": "Describe this image"},
        {"type": "image_url", "image_url": {"url": "data:image/png;base64,<data>"}},
    ]
    assert expected == _format_message_content(content)

Domain

Subdomains

Frequently Asked Questions

What does test_format_message_content_mixed() do?
test_format_message_content_mixed() is a function in the langchain codebase, defined in libs/partners/groq/tests/unit_tests/test_chat_models.py.
Where is test_format_message_content_mixed() defined?
test_format_message_content_mixed() is defined in libs/partners/groq/tests/unit_tests/test_chat_models.py at line 999.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free