_aparse_intermediate_steps() — langchain Function Reference
Architecture documentation for the _aparse_intermediate_steps() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 633db7c5_84a0_dcf2_9949_8d11da115c78["_aparse_intermediate_steps()"] 40171661_732e_8178_c8ae_92254ace13fe["OpenAIAssistantRunnable"] 633db7c5_84a0_dcf2_9949_8d11da115c78 -->|defined in| 40171661_732e_8178_c8ae_92254ace13fe 5912fbae_35d0_fc72_46fb_b0f27a511df7["ainvoke()"] 5912fbae_35d0_fc72_46fb_b0f27a511df7 -->|calls| 633db7c5_84a0_dcf2_9949_8d11da115c78 2c47f734_2b6a_7a50_60db_4c515cc3d976["_wait_for_run()"] 633db7c5_84a0_dcf2_9949_8d11da115c78 -->|calls| 2c47f734_2b6a_7a50_60db_4c515cc3d976 style 633db7c5_84a0_dcf2_9949_8d11da115c78 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/agents/openai_assistant/base.py lines 677–697
async def _aparse_intermediate_steps(
self,
intermediate_steps: list[tuple[OpenAIAssistantAction, str]],
) -> dict:
last_action, _ = intermediate_steps[-1]
run = self._wait_for_run(last_action.run_id, last_action.thread_id)
required_tool_call_ids = set()
if run.required_action:
required_tool_call_ids = {
tc.id for tc in run.required_action.submit_tool_outputs.tool_calls
}
tool_outputs = [
{"output": str(output), "tool_call_id": action.tool_call_id}
for action, output in intermediate_steps
if action.tool_call_id in required_tool_call_ids
]
return {
"tool_outputs": tool_outputs,
"run_id": last_action.run_id,
"thread_id": last_action.thread_id,
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does _aparse_intermediate_steps() do?
_aparse_intermediate_steps() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/openai_assistant/base.py.
Where is _aparse_intermediate_steps() defined?
_aparse_intermediate_steps() is defined in libs/langchain/langchain_classic/agents/openai_assistant/base.py at line 677.
What does _aparse_intermediate_steps() call?
_aparse_intermediate_steps() calls 1 function(s): _wait_for_run.
What calls _aparse_intermediate_steps()?
_aparse_intermediate_steps() is called by 1 function(s): ainvoke.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free