MCPcopy 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

2import tiktoken
3from hashlib import md5
4def compute_mdhash_id(content, prefix: str = ""):
5 return prefix + md5(content.encode()).hexdigest()
6def chunk_documents(
7 docs,
8 model_name="cl100k_base",

Callers 1

chunk_documentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected