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 f9595695_7e42_0095_6534_31adc83cf3b0["test_message_additional_kwargs_with_lc_key_escaped()"] c4a8d7fe_9c7d_27a9_b1d5_4a21a8860b2e["TestDumpdEscapesLcKeyInPlainDicts"] f9595695_7e42_0095_6534_31adc83cf3b0 -->|defined in| c4a8d7fe_9c7d_27a9_b1d5_4a21a8860b2e 4946a8d3_7a23_7518_def8_ca78da82b4e7["test_message_additional_kwargs_with_lc_key_escaped()"] 4946a8d3_7a23_7518_def8_ca78da82b4e7 -->|calls| f9595695_7e42_0095_6534_31adc83cf3b0 4946a8d3_7a23_7518_def8_ca78da82b4e7["test_message_additional_kwargs_with_lc_key_escaped()"] f9595695_7e42_0095_6534_31adc83cf3b0 -->|calls| 4946a8d3_7a23_7518_def8_ca78da82b4e7 style f9595695_7e42_0095_6534_31adc83cf3b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/load/test_serializable.py lines 570–580
def test_message_additional_kwargs_with_lc_key_escaped(self) -> None:
"""Test `AIMessage` with `'lc'` in `additional_kwargs` is escaped."""
msg = AIMessage(
content="Hello",
additional_kwargs={"malicious": {"lc": 1}},
)
serialized = dumpd(msg)
assert serialized["kwargs"]["additional_kwargs"]["malicious"] == {
"__lc_escaped__": {"lc": 1}
}
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 570.
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