test_multiple_structured_outputs_with_retry() — langchain Function Reference
Architecture documentation for the test_multiple_structured_outputs_with_retry() function in test_response_format.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD bea172eb_53d7_bc2e_cdfa_45a2187ca545["test_multiple_structured_outputs_with_retry()"] d1d579f8_d411_ce75_6fa3_d97e725405cb["TestResponseFormatAsToolStrategy"] bea172eb_53d7_bc2e_cdfa_45a2187ca545 -->|defined in| d1d579f8_d411_ce75_6fa3_d97e725405cb style bea172eb_53d7_bc2e_cdfa_45a2187ca545 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/test_response_format.py lines 456–495
def test_multiple_structured_outputs_with_retry(self) -> None:
"""Test that retry handles multiple structured output tool calls."""
tool_calls = [
[
{
"name": "WeatherBaseModel",
"id": "1",
"args": WEATHER_DATA,
},
{
"name": "LocationResponse",
"id": "2",
"args": LOCATION_DATA,
},
],
[
{
"name": "WeatherBaseModel",
"id": "3",
"args": WEATHER_DATA,
},
],
]
model = FakeToolCallingModel(tool_calls=tool_calls)
agent = create_agent(
model,
[],
response_format=ToolStrategy(
WeatherBaseModel | LocationResponse,
handle_errors=True,
),
)
response = agent.invoke({"messages": [HumanMessage("Give me weather")]})
# HumanMessage, AIMessage, ToolMessage, ToolMessage, AI, ToolMessage
assert len(response["messages"]) == 6
assert response["structured_response"] == EXPECTED_WEATHER_PYDANTIC
Domain
Subdomains
Source
Frequently Asked Questions
What does test_multiple_structured_outputs_with_retry() do?
test_multiple_structured_outputs_with_retry() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/test_response_format.py.
Where is test_multiple_structured_outputs_with_retry() defined?
test_multiple_structured_outputs_with_retry() is defined in libs/langchain_v1/tests/unit_tests/agents/test_response_format.py at line 456.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free