Home / Function/ _hash_nested_dict() — langchain Function Reference

_hash_nested_dict() — langchain Function Reference

Architecture documentation for the _hash_nested_dict() function in api.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  5bcb48ef_fe17_bbfa_b7d3_dbe9f557ce9d["_hash_nested_dict()"]
  203188c0_72d6_6932_bc21_edf25c4c00ef["api.py"]
  5bcb48ef_fe17_bbfa_b7d3_dbe9f557ce9d -->|defined in| 203188c0_72d6_6932_bc21_edf25c4c00ef
  390d38a7_c5c5_6107_c482_53f850cc3c38["_hash_string()"]
  5bcb48ef_fe17_bbfa_b7d3_dbe9f557ce9d -->|calls| 390d38a7_c5c5_6107_c482_53f850cc3c38
  style 5bcb48ef_fe17_bbfa_b7d3_dbe9f557ce9d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/indexing/api.py lines 83–88

def _hash_nested_dict(
    data: dict[Any, Any], *, algorithm: Literal["sha1", "sha256", "sha512", "blake2b"]
) -> uuid.UUID:
    """Hash a nested dictionary to a UUID using the configured algorithm."""
    serialized_data = json.dumps(data, sort_keys=True)
    return _hash_string(serialized_data, algorithm=algorithm)

Subdomains

Frequently Asked Questions

What does _hash_nested_dict() do?
_hash_nested_dict() is a function in the langchain codebase, defined in libs/core/langchain_core/indexing/api.py.
Where is _hash_nested_dict() defined?
_hash_nested_dict() is defined in libs/core/langchain_core/indexing/api.py at line 83.
What does _hash_nested_dict() call?
_hash_nested_dict() calls 1 function(s): _hash_string.

Analyze Your Own Codebase

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

Try Supermodel Free