test_convert_from_v1_to_responses() — langchain Function Reference
Architecture documentation for the test_convert_from_v1_to_responses() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8e2b9a43_5c69_6e8e_72a0_efb30715d360["test_convert_from_v1_to_responses()"] 48232d20_f8c1_b597_14fa_7dc407e9bfe5["test_base.py"] 8e2b9a43_5c69_6e8e_72a0_efb30715d360 -->|defined in| 48232d20_f8c1_b597_14fa_7dc407e9bfe5 style 8e2b9a43_5c69_6e8e_72a0_efb30715d360 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 2745–2761
def test_convert_from_v1_to_responses(
message_v1: AIMessage, expected: list[dict[str, Any]]
) -> None:
tcs: list[types.ToolCall] = [
{
"type": "tool_call",
"name": tool_call["name"],
"args": tool_call["args"],
"id": tool_call.get("id"),
}
for tool_call in message_v1.tool_calls
]
result = _convert_from_v1_to_responses(message_v1.content_blocks, tcs)
assert result == expected
# Check no mutation
assert message_v1 != result
Domain
Subdomains
Source
Frequently Asked Questions
What does test_convert_from_v1_to_responses() do?
test_convert_from_v1_to_responses() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py.
Where is test_convert_from_v1_to_responses() defined?
test_convert_from_v1_to_responses() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py at line 2745.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free