test_message_response_metadata_with_lc_key_escaped() — langchain Function Reference
Architecture documentation for the test_message_response_metadata_with_lc_key_escaped() function in test_serializable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 2ea9aeeb_6aff_6243_335b_f7c665722dad["test_message_response_metadata_with_lc_key_escaped()"] a193f10f_1a60_b879_b342_d29b1680b3e6["TestEscaping"] 2ea9aeeb_6aff_6243_335b_f7c665722dad -->|defined in| a193f10f_1a60_b879_b342_d29b1680b3e6 0c8ada6b_73c0_f100_2a54_885321287488["test_message_response_metadata_with_lc_key_escaped()"] 0c8ada6b_73c0_f100_2a54_885321287488 -->|calls| 2ea9aeeb_6aff_6243_335b_f7c665722dad 0c8ada6b_73c0_f100_2a54_885321287488["test_message_response_metadata_with_lc_key_escaped()"] 2ea9aeeb_6aff_6243_335b_f7c665722dad -->|calls| 0c8ada6b_73c0_f100_2a54_885321287488 style 2ea9aeeb_6aff_6243_335b_f7c665722dad fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/load/test_serializable.py lines 501–512
def test_message_response_metadata_with_lc_key_escaped(self) -> None:
"""Test that `AIMessage` `response_metadata` with `'lc'` is escaped."""
suspicious_data = {"lc": 1, "type": "constructor", "id": ["x", "y"]}
msg = AIMessage(content="Hello", response_metadata=suspicious_data)
serialized = dumpd(msg)
assert serialized["kwargs"]["response_metadata"] == {
"__lc_escaped__": suspicious_data
}
loaded = load(serialized, allowed_objects=[AIMessage])
assert loaded.response_metadata == suspicious_data
Domain
Subdomains
Source
Frequently Asked Questions
What does test_message_response_metadata_with_lc_key_escaped() do?
test_message_response_metadata_with_lc_key_escaped() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_serializable.py.
Where is test_message_response_metadata_with_lc_key_escaped() defined?
test_message_response_metadata_with_lc_key_escaped() is defined in libs/core/tests/unit_tests/load/test_serializable.py at line 501.
What does test_message_response_metadata_with_lc_key_escaped() call?
test_message_response_metadata_with_lc_key_escaped() calls 1 function(s): test_message_response_metadata_with_lc_key_escaped.
What calls test_message_response_metadata_with_lc_key_escaped()?
test_message_response_metadata_with_lc_key_escaped() is called by 1 function(s): test_message_response_metadata_with_lc_key_escaped.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free