Home / Function/ test_deserialize_legacy() — langchain Function Reference

test_deserialize_legacy() — langchain Function Reference

Architecture documentation for the test_deserialize_legacy() function in test_dict.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  29e39422_a6e7_3ee1_81e9_088ba739c97f["test_deserialize_legacy()"]
  0fed4acb_9f2e_b15c_0e09_781e9442823f["test_dict.py"]
  29e39422_a6e7_3ee1_81e9_088ba739c97f -->|defined in| 0fed4acb_9f2e_b15c_0e09_781e9442823f
  style 29e39422_a6e7_3ee1_81e9_088ba739c97f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/prompts/test_dict.py lines 21–34

def test_deserialize_legacy() -> None:
    ser = {
        "type": "constructor",
        "lc": 1,
        "id": ["langchain_core", "prompts", "message", "_DictMessagePromptTemplate"],
        "kwargs": {
            "template_format": "f-string",
            "template": {"type": "audio", "audio": "{audio_data}"},
        },
    }
    expected = DictPromptTemplate(
        template={"type": "audio", "audio": "{audio_data}"}, template_format="f-string"
    )
    assert load(ser, allowed_objects=[DictPromptTemplate]) == expected

Subdomains

Frequently Asked Questions

What does test_deserialize_legacy() do?
test_deserialize_legacy() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/prompts/test_dict.py.
Where is test_deserialize_legacy() defined?
test_deserialize_legacy() is defined in libs/core/tests/unit_tests/prompts/test_dict.py at line 21.

Analyze Your Own Codebase

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

Try Supermodel Free