MCPcopy Create free account
hub / github.com/DSGWJQ/Feagent / _generate_document_hash

Method _generate_document_hash

scripts/ingest_docs.py:99–101  ·  view source on GitHub ↗

生成文档内容的哈希值

(self, content: str)

Source from the content-addressed store, hash-verified

97 return len(self.tokenizer.encode(text))
98
99 async def _generate_document_hash(self, content: str) -> str:
100 """生成文档内容的哈希值"""
101 return hashlib.md5(content.encode()).hexdigest()
102
103 async def _load_document_from_file(self, file_path: str) -> str | None:
104 """从文件加载文档内容"""

Callers 2

ingest_fileMethod · 0.95
ingest_urlMethod · 0.95

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected