Home / Function/ _wait_for_run() — langchain Function Reference

_wait_for_run() — langchain Function Reference

Architecture documentation for the _wait_for_run() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  e6d8fb32_f7d9_78ac_9bc7_107c33d59cfc["_wait_for_run()"]
  09337f8e_7eda_ea1a_ab7c_b599191c842b["OpenAIAssistantRunnable"]
  e6d8fb32_f7d9_78ac_9bc7_107c33d59cfc -->|defined in| 09337f8e_7eda_ea1a_ab7c_b599191c842b
  acfabc93_03c5_a0b9_d52c_ca4d4bce7257["invoke()"]
  acfabc93_03c5_a0b9_d52c_ca4d4bce7257 -->|calls| e6d8fb32_f7d9_78ac_9bc7_107c33d59cfc
  153a370e_5d26_ba21_3517_c8b162088d42["_parse_intermediate_steps()"]
  153a370e_5d26_ba21_3517_c8b162088d42 -->|calls| e6d8fb32_f7d9_78ac_9bc7_107c33d59cfc
  a5574091_2091_7165_bf03_411badd98678["_aparse_intermediate_steps()"]
  a5574091_2091_7165_bf03_411badd98678 -->|calls| e6d8fb32_f7d9_78ac_9bc7_107c33d59cfc
  style e6d8fb32_f7d9_78ac_9bc7_107c33d59cfc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/openai_assistant/base.py lines 668–675

    def _wait_for_run(self, run_id: str, thread_id: str) -> Any:
        in_progress = True
        while in_progress:
            run = self.client.beta.threads.runs.retrieve(run_id, thread_id=thread_id)
            in_progress = run.status in ("in_progress", "queued")
            if in_progress:
                sleep(self.check_every_ms / 1000)
        return run

Subdomains

Frequently Asked Questions

What does _wait_for_run() do?
_wait_for_run() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/openai_assistant/base.py.
Where is _wait_for_run() defined?
_wait_for_run() is defined in libs/langchain/langchain_classic/agents/openai_assistant/base.py at line 668.
What calls _wait_for_run()?
_wait_for_run() is called by 3 function(s): _aparse_intermediate_steps, _parse_intermediate_steps, invoke.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free