Home / Function/ test_ai_message_with_secret_in_response_metadata() — langchain Function Reference

test_ai_message_with_secret_in_response_metadata() — langchain Function Reference

Architecture documentation for the test_ai_message_with_secret_in_response_metadata() function in test_secret_injection.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  0e80db13_cada_6b3a_c651_113468da24aa["test_ai_message_with_secret_in_response_metadata()"]
  a31f3612_4078_d3f5_ad7f_fe2a7591bf7b["TestSerializableTopLevel"]
  0e80db13_cada_6b3a_c651_113468da24aa -->|defined in| a31f3612_4078_d3f5_ad7f_fe2a7591bf7b
  9667a3de_eb6c_d235_9e9f_0bb0ddcacee3["_assert_no_secret_leak()"]
  0e80db13_cada_6b3a_c651_113468da24aa -->|calls| 9667a3de_eb6c_d235_9e9f_0bb0ddcacee3
  style 0e80db13_cada_6b3a_c651_113468da24aa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/load/test_secret_injection.py lines 102–108

    def test_ai_message_with_secret_in_response_metadata(self) -> None:
        """`AIMessage` with secret-like dict in respo`nse_metadata."""
        msg = AIMessage(
            content="Hello",
            response_metadata={"data": MALICIOUS_SECRET_DICT},
        )
        _assert_no_secret_leak(msg)

Domain

Subdomains

Frequently Asked Questions

What does test_ai_message_with_secret_in_response_metadata() do?
test_ai_message_with_secret_in_response_metadata() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_secret_injection.py.
Where is test_ai_message_with_secret_in_response_metadata() defined?
test_ai_message_with_secret_in_response_metadata() is defined in libs/core/tests/unit_tests/load/test_secret_injection.py at line 102.
What does test_ai_message_with_secret_in_response_metadata() call?
test_ai_message_with_secret_in_response_metadata() calls 1 function(s): _assert_no_secret_leak.

Analyze Your Own Codebase

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

Try Supermodel Free