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