_areturn() — langchain Function Reference
Architecture documentation for the _areturn() function in agent_iterator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8e78f3ee_ca81_93a5_488f_7aad7e20bcbd["_areturn()"] 1acdec4f_565f_ad87_eef0_de1e0c0a695f["AgentExecutorIterator"] 8e78f3ee_ca81_93a5_488f_7aad7e20bcbd -->|defined in| 1acdec4f_565f_ad87_eef0_de1e0c0a695f 39cd136f_d15d_8517_b858_2109fe79723e["_aprocess_next_step_output()"] 39cd136f_d15d_8517_b858_2109fe79723e -->|calls| 8e78f3ee_ca81_93a5_488f_7aad7e20bcbd 96b6284f_50eb_7f77_f278_57e27829da21["_astop()"] 96b6284f_50eb_7f77_f278_57e27829da21 -->|calls| 8e78f3ee_ca81_93a5_488f_7aad7e20bcbd f9289611_94e3_3d85_5da2_ccb6948f473e["make_final_outputs()"] 8e78f3ee_ca81_93a5_488f_7aad7e20bcbd -->|calls| f9289611_94e3_3d85_5da2_ccb6948f473e style 8e78f3ee_ca81_93a5_488f_7aad7e20bcbd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent_iterator.py lines 419–432
async def _areturn(
self,
output: AgentFinish,
run_manager: AsyncCallbackManagerForChainRun,
) -> AddableDict:
"""Return the final output of the async iterator."""
returned_output = await self.agent_executor._areturn( # noqa: SLF001
output,
self.intermediate_steps,
run_manager=run_manager,
)
returned_output["messages"] = output.messages
await run_manager.on_chain_end(returned_output)
return self.make_final_outputs(returned_output, run_manager)
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _areturn() do?
_areturn() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent_iterator.py.
Where is _areturn() defined?
_areturn() is defined in libs/langchain/langchain_classic/agents/agent_iterator.py at line 419.
What does _areturn() call?
_areturn() calls 1 function(s): make_final_outputs.
What calls _areturn()?
_areturn() is called by 2 function(s): _aprocess_next_step_output, _astop.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free