Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KnowledgeXLab/LeanRAG
/ compute_mdhash_id
Function
compute_mdhash_id
file_chunk.py:4–5 ·
view source on GitHub ↗
(content, prefix: str = "")
Source
from the content-addressed store, hash-verified
2
import
tiktoken
3
from
hashlib
import
md5
4
def
compute_mdhash_id(content, prefix: str =
""
):
5
return
prefix + md5(content.encode()).hexdigest()
6
def
chunk_documents(
7
docs,
8
model_name=
"cl100k_base"
,
Callers
1
chunk_documents
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected