create_base64_image() — langchain Function Reference
Architecture documentation for the create_base64_image() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1dd19a53_952f_5baf_39c4_aa23f0cd7f59["create_base64_image()"] ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"] 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4 0fdc71cb_78df_e865_313e_4cfa498ad191["test_convert_to_openai_messages_openai_image()"] 0fdc71cb_78df_e865_313e_4cfa498ad191 -->|calls| 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 2e9528f1_b8ee_7620_e40f_bc01b0549549["test_convert_to_openai_messages_anthropic()"] 2e9528f1_b8ee_7620_e40f_bc01b0549549 -->|calls| 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 33b18a46_53d8_fe91_a83b_3316229d7dea["test_convert_to_openai_messages_bedrock_converse_image()"] 33b18a46_53d8_fe91_a83b_3316229d7dea -->|calls| 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 31add219_35f8_705e_c76c_d9ca327fb45a["test_convert_to_openai_messages_vertexai_image()"] 31add219_35f8_705e_c76c_d9ca327fb45a -->|calls| 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 0c93aab9_5244_4700_1ffa_1ec12070deb3["test_convert_to_openai_messages_mixed_content_types()"] 0c93aab9_5244_4700_1ffa_1ec12070deb3 -->|calls| 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 14e6fdde_cf6a_539a_67f6_36fd8fde5d20["create_image_data()"] 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 -->|calls| 14e6fdde_cf6a_539a_67f6_36fd8fde5d20 style 1dd19a53_952f_5baf_39c4_aa23f0cd7f59 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 964–966
def create_base64_image(image_format: str = "jpeg") -> str:
data = create_image_data()
return f"data:image/{image_format};base64,{data}"
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does create_base64_image() do?
create_base64_image() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is create_base64_image() defined?
create_base64_image() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 964.
What does create_base64_image() call?
create_base64_image() calls 1 function(s): create_image_data.
What calls create_base64_image()?
create_base64_image() is called by 5 function(s): test_convert_to_openai_messages_anthropic, test_convert_to_openai_messages_bedrock_converse_image, test_convert_to_openai_messages_mixed_content_types, test_convert_to_openai_messages_openai_image, test_convert_to_openai_messages_vertexai_image.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free