_hash_string() — langchain Function Reference
Architecture documentation for the _hash_string() function in api.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 390d38a7_c5c5_6107_c482_53f850cc3c38["_hash_string()"] 203188c0_72d6_6932_bc21_edf25c4c00ef["api.py"] 390d38a7_c5c5_6107_c482_53f850cc3c38 -->|defined in| 203188c0_72d6_6932_bc21_edf25c4c00ef 5bcb48ef_fe17_bbfa_b7d3_dbe9f557ce9d["_hash_nested_dict()"] 5bcb48ef_fe17_bbfa_b7d3_dbe9f557ce9d -->|calls| 390d38a7_c5c5_6107_c482_53f850cc3c38 dadaa1e9_e74e_95c1_ae3a_65e79ceaffbe["_warn_about_sha1()"] 390d38a7_c5c5_6107_c482_53f850cc3c38 -->|calls| dadaa1e9_e74e_95c1_ae3a_65e79ceaffbe 620ce5e7_2594_a746_99a6_c56af4fd553a["_calculate_hash()"] 390d38a7_c5c5_6107_c482_53f850cc3c38 -->|calls| 620ce5e7_2594_a746_99a6_c56af4fd553a style 390d38a7_c5c5_6107_c482_53f850cc3c38 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/indexing/api.py lines 73–80
def _hash_string(
input_string: str, *, algorithm: Literal["sha1", "sha256", "sha512", "blake2b"]
) -> uuid.UUID:
"""Hash *input_string* to a deterministic UUID using the configured algorithm."""
if algorithm == "sha1":
_warn_about_sha1()
hash_value = _calculate_hash(input_string, algorithm)
return uuid.uuid5(NAMESPACE_UUID, hash_value)
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does _hash_string() do?
_hash_string() is a function in the langchain codebase, defined in libs/core/langchain_core/indexing/api.py.
Where is _hash_string() defined?
_hash_string() is defined in libs/core/langchain_core/indexing/api.py at line 73.
What does _hash_string() call?
_hash_string() calls 2 function(s): _calculate_hash, _warn_about_sha1.
What calls _hash_string()?
_hash_string() is called by 1 function(s): _hash_nested_dict.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free