Home / Function/ add_node() — langchain Function Reference

add_node() — langchain Function Reference

Architecture documentation for the add_node() function in graph_png.py from the langchain codebase.

Function python LangChainCore Runnables calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  daf54039_8ae0_cde5_b789_6cc575db8dc6["add_node()"]
  5a670bac_6993_ecfd_ad71_f79187c3df76["PngDrawer"]
  daf54039_8ae0_cde5_b789_6cc575db8dc6 -->|defined in| 5a670bac_6993_ecfd_ad71_f79187c3df76
  05cb2749_4b9a_b841_c17a_7346d04b345e["add_nodes()"]
  05cb2749_4b9a_b841_c17a_7346d04b345e -->|calls| daf54039_8ae0_cde5_b789_6cc575db8dc6
  557b796b_dd51_df06_143c_2aa6bd117a0a["get_node_label()"]
  daf54039_8ae0_cde5_b789_6cc575db8dc6 -->|calls| 557b796b_dd51_df06_143c_2aa6bd117a0a
  style daf54039_8ae0_cde5_b789_6cc575db8dc6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/graph_png.py lines 78–92

    def add_node(self, viz: Any, node: str) -> None:
        """Adds a node to the graph.

        Args:
            viz: The graphviz object.
            node: The node to add.
        """
        viz.add_node(
            node,
            label=self.get_node_label(node),
            style="filled",
            fillcolor="yellow",
            fontsize=15,
            fontname=self.fontname,
        )

Domain

Subdomains

Called By

Frequently Asked Questions

What does add_node() do?
add_node() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/graph_png.py.
Where is add_node() defined?
add_node() is defined in libs/core/langchain_core/runnables/graph_png.py at line 78.
What does add_node() call?
add_node() calls 1 function(s): get_node_label.
What calls add_node()?
add_node() is called by 1 function(s): add_nodes.

Analyze Your Own Codebase

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

Try Supermodel Free