make_final_outputs() — langchain Function Reference
Architecture documentation for the make_final_outputs() function in agent_iterator.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b619821e_4fac_7e42_a6d5_e63b54816851["make_final_outputs()"] 490b6bce_9d4c_017c_89ae_b13ea74223ea["AgentExecutorIterator"] b619821e_4fac_7e42_a6d5_e63b54816851 -->|defined in| 490b6bce_9d4c_017c_89ae_b13ea74223ea 4d87dde3_a32d_10d0_6e36_d6572758987b["_return()"] 4d87dde3_a32d_10d0_6e36_d6572758987b -->|calls| b619821e_4fac_7e42_a6d5_e63b54816851 0a3774fd_ebe1_abde_5275_25554914ae62["_areturn()"] 0a3774fd_ebe1_abde_5275_25554914ae62 -->|calls| b619821e_4fac_7e42_a6d5_e63b54816851 style b619821e_4fac_7e42_a6d5_e63b54816851 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/agent_iterator.py lines 148–171
def make_final_outputs(
self,
outputs: dict[str, Any],
run_manager: CallbackManagerForChainRun | AsyncCallbackManagerForChainRun,
) -> AddableDict:
"""Make final outputs for the iterator.
Args:
outputs: The outputs from the agent executor.
run_manager: The run manager to use for callbacks.
"""
# have access to intermediate steps by design in iterator,
# so return only outputs may as well always be true.
prepared_outputs = AddableDict(
self.agent_executor.prep_outputs(
self.inputs,
outputs,
return_only_outputs=True,
),
)
if self.include_run_info:
prepared_outputs[RUN_KEY] = RunInfo(run_id=run_manager.run_id)
return prepared_outputs
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does make_final_outputs() do?
make_final_outputs() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent_iterator.py.
Where is make_final_outputs() defined?
make_final_outputs() is defined in libs/langchain/langchain_classic/agents/agent_iterator.py at line 148.
What calls make_final_outputs()?
make_final_outputs() is called by 2 function(s): _areturn, _return.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free