Home / Function/ get_parents() — langchain Function Reference

get_parents() — langchain Function Reference

Architecture documentation for the get_parents() function in stdout.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ce337549_19ba_f194_9b7a_4c9f15e4f177["get_parents()"]
  56d9fac7_db71_9c71_7cac_1d680d392fa0["FunctionCallbackHandler"]
  ce337549_19ba_f194_9b7a_4c9f15e4f177 -->|defined in| 56d9fac7_db71_9c71_7cac_1d680d392fa0
  1bda6774_d332_dec5_ed8f_8d6eef57961e["get_breadcrumbs()"]
  1bda6774_d332_dec5_ed8f_8d6eef57961e -->|calls| ce337549_19ba_f194_9b7a_4c9f15e4f177
  style ce337549_19ba_f194_9b7a_4c9f15e4f177 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/stdout.py lines 69–87

    def get_parents(self, run: Run) -> list[Run]:
        """Get the parents of a run.

        Args:
            run: The run to get the parents of.

        Returns:
            A list of parent runs.
        """
        parents = []
        current_run = run
        while current_run.parent_run_id:
            parent = self.run_map.get(str(current_run.parent_run_id))
            if parent:
                parents.append(parent)
                current_run = parent
            else:
                break
        return parents

Domain

Subdomains

Called By

Frequently Asked Questions

What does get_parents() do?
get_parents() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/stdout.py.
Where is get_parents() defined?
get_parents() is defined in libs/core/langchain_core/tracers/stdout.py at line 69.
What calls get_parents()?
get_parents() is called by 1 function(s): get_breadcrumbs.

Analyze Your Own Codebase

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

Try Supermodel Free