test_convert_to_openai_messages_guard_content() — langchain Function Reference
Architecture documentation for the test_convert_to_openai_messages_guard_content() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 51699a41_3555_e656_0d25_2a73b8101e5e["test_convert_to_openai_messages_guard_content()"] 03f6a5ae_d57a_eb66_626a_b9e082b763ea["test_utils.py"] 51699a41_3555_e656_0d25_2a73b8101e5e -->|defined in| 03f6a5ae_d57a_eb66_626a_b9e082b763ea style 51699a41_3555_e656_0d25_2a73b8101e5e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 1261–1274
def test_convert_to_openai_messages_guard_content() -> None:
messages = [
HumanMessage(
content=[
{
"type": "guard_content",
"guard_content": {"text": "Protected content"},
}
]
)
]
result = convert_to_openai_messages(messages, text_format="block")
assert result[0]["content"][0]["type"] == "text"
assert result[0]["content"][0]["text"] == "Protected content"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_convert_to_openai_messages_guard_content() do?
test_convert_to_openai_messages_guard_content() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_convert_to_openai_messages_guard_content() defined?
test_convert_to_openai_messages_guard_content() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 1261.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free