test_agent_iterator_output_structure() — langchain Function Reference
Architecture documentation for the test_agent_iterator_output_structure() function in test_agent_iterator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6f7549c3_b00f_258d_144c_c8d9992ef7e7["test_agent_iterator_output_structure()"] 2423e003_42f4_7c6a_3fba_30db54c07a0c["test_agent_iterator.py"] 6f7549c3_b00f_258d_144c_c8d9992ef7e7 -->|defined in| 2423e003_42f4_7c6a_3fba_30db54c07a0c style 6f7549c3_b00f_258d_144c_c8d9992ef7e7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/test_agent_iterator.py lines 298–310
def test_agent_iterator_output_structure() -> None:
"""Test the output structure of AgentExecutorIterator."""
agent = _get_agent()
agent_iter = agent.iter(inputs="when was langchain made")
for step in agent_iter:
assert isinstance(step, dict)
if "intermediate_step" in step:
assert isinstance(step["intermediate_step"], list)
elif "output" in step:
assert isinstance(step["output"], str)
else:
pytest.fail("Unexpected output structure")
Domain
Subdomains
Source
Frequently Asked Questions
What does test_agent_iterator_output_structure() do?
test_agent_iterator_output_structure() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_agent_iterator.py.
Where is test_agent_iterator_output_structure() defined?
test_agent_iterator_output_structure() is defined in libs/langchain/tests/unit_tests/agents/test_agent_iterator.py at line 298.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free