MCPcopy
hub / github.com/stanford-oval/storm / _md5_hash

Method _md5_hash

knowledge_storm/interface.py:97–101  ·  view source on GitHub ↗

Generate an MD5 hash for a given value.

(self, value)

Source from the content-addressed store, hash-verified

95 return f"Question: {self.meta.get('question', '')}, Query: {self.meta.get('query', '')}"
96
97 def _md5_hash(self, value):
98 """Generate an MD5 hash for a given value."""
99 if isinstance(value, (dict, list, tuple)):
100 value = json.dumps(value, sort_keys=True)
101 return hashlib.md5(str(value).encode("utf-8")).hexdigest()
102
103 @classmethod
104 def from_dict(cls, info_dict):

Callers 1

__hash__Method · 0.95

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected