__init__() — langchain Function Reference
Architecture documentation for the __init__() function in agent_iterator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4f6760de_4a90_cabd_bc2d_41b34ee0f1da["__init__()"] 490b6bce_9d4c_017c_89ae_b13ea74223ea["AgentExecutorIterator"] 4f6760de_4a90_cabd_bc2d_41b34ee0f1da -->|defined in| 490b6bce_9d4c_017c_89ae_b13ea74223ea c1255a97_00b6_d464_ae57_ba7c07bdee0f["reset()"] 4f6760de_4a90_cabd_bc2d_41b34ee0f1da -->|calls| c1255a97_00b6_d464_ae57_ba7c07bdee0f style 4f6760de_4a90_cabd_bc2d_41b34ee0f1da fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent_iterator.py lines 43–81
def __init__(
self,
agent_executor: AgentExecutor,
inputs: Any,
callbacks: Callbacks = None,
*,
tags: list[str] | None = None,
metadata: dict[str, Any] | None = None,
run_name: str | None = None,
run_id: UUID | None = None,
include_run_info: bool = False,
yield_actions: bool = False,
):
"""Initialize the `AgentExecutorIterator`.
Initialize the `AgentExecutorIterator` with the given `AgentExecutor`,
inputs, and optional callbacks.
Args:
agent_executor: The `AgentExecutor` to iterate over.
inputs: The inputs to the `AgentExecutor`.
callbacks: The callbacks to use during iteration.
tags: The tags to use during iteration.
metadata: The metadata to use during iteration.
run_name: The name of the run.
run_id: The ID of the run.
include_run_info: Whether to include run info in the output.
yield_actions: Whether to yield actions as they are generated.
"""
self._agent_executor = agent_executor
self.inputs = inputs
self.callbacks = callbacks
self.tags = tags
self.metadata = metadata
self.run_name = run_name
self.run_id = run_id
self.include_run_info = include_run_info
self.yield_actions = yield_actions
self.reset()
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does __init__() do?
__init__() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent_iterator.py.
Where is __init__() defined?
__init__() is defined in libs/langchain/langchain_classic/agents/agent_iterator.py at line 43.
What does __init__() call?
__init__() calls 1 function(s): reset.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free