Home / Function/ node_data_str() — langchain Function Reference

node_data_str() — langchain Function Reference

Architecture documentation for the node_data_str() function in graph.py from the langchain codebase.

Function python LangChainCore Runnables calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  e36afb73_0117_69fe_01c8_c476692e8baa["node_data_str()"]
  81a6280b_4752_84db_f1fa_1a3b8040d481["graph.py"]
  e36afb73_0117_69fe_01c8_c476692e8baa -->|defined in| 81a6280b_4752_84db_f1fa_1a3b8040d481
  34379327_05b8_129e_590e_63948fab3a3d["node_data_json()"]
  34379327_05b8_129e_590e_63948fab3a3d -->|calls| e36afb73_0117_69fe_01c8_c476692e8baa
  5bdca968_0e0c_d6c2_7bf4_f1990e3d1d78["add_node()"]
  5bdca968_0e0c_d6c2_7bf4_f1990e3d1d78 -->|calls| e36afb73_0117_69fe_01c8_c476692e8baa
  06f839e9_c953_ef45_72b3_7929f39522ed["is_uuid()"]
  e36afb73_0117_69fe_01c8_c476692e8baa -->|calls| 06f839e9_c953_ef45_72b3_7929f39522ed
  style e36afb73_0117_69fe_01c8_c476692e8baa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/graph.py lines 178–194

def node_data_str(
    id: str,
    data: type[BaseModel] | RunnableType | None,
) -> str:
    """Convert the data of a node to a string.

    Args:
        id: The node id.
        data: The node data.

    Returns:
        A string representation of the data.
    """
    if not is_uuid(id) or data is None:
        return id
    data_str = data.get_name() if isinstance(data, Runnable) else data.__name__
    return data_str if not data_str.startswith("Runnable") else data_str[8:]

Domain

Subdomains

Calls

Frequently Asked Questions

What does node_data_str() do?
node_data_str() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/graph.py.
Where is node_data_str() defined?
node_data_str() is defined in libs/core/langchain_core/runnables/graph.py at line 178.
What does node_data_str() call?
node_data_str() calls 1 function(s): is_uuid.
What calls node_data_str()?
node_data_str() is called by 2 function(s): add_node, node_data_json.

Analyze Your Own Codebase

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

Try Supermodel Free