iter() — langchain Function Reference
Architecture documentation for the iter() function in agent.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c0853a78_0cf9_a513_64ff_763067d684da["iter()"] 493d4ce4_2303_08e0_2337_2bee34fe2662["AgentExecutor"] c0853a78_0cf9_a513_64ff_763067d684da -->|defined in| 493d4ce4_2303_08e0_2337_2bee34fe2662 style c0853a78_0cf9_a513_64ff_763067d684da fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent.py lines 1185–1210
def iter(
self,
inputs: Any,
callbacks: Callbacks = None,
*,
include_run_info: bool = False,
async_: bool = False, # noqa: ARG002 arg kept for backwards compat, but ignored
) -> AgentExecutorIterator:
"""Enables iteration over steps taken to reach final output.
Args:
inputs: Inputs to the agent.
callbacks: Callbacks to run.
include_run_info: Whether to include run info.
async_: Whether to run async. (Ignored)
Returns:
Agent executor iterator object.
"""
return AgentExecutorIterator(
self,
inputs,
callbacks,
tags=self.tags,
include_run_info=include_run_info,
)
Domain
Subdomains
Source
Frequently Asked Questions
What does iter() do?
iter() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent.py.
Where is iter() defined?
iter() is defined in libs/langchain/langchain_classic/agents/agent.py at line 1185.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free