MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / add

Method add

openkb/state.py:81–84  ·  view source on GitHub ↗

Register file_hash with metadata and persist to disk.

(self, file_hash: str, metadata: dict)

Source from the content-addressed store, hash-verified

79 # ------------------------------------------------------------------
80
81 def add(self, file_hash: str, metadata: dict) -> None:
82 """Register file_hash with metadata and persist to disk."""
83 self._data[file_hash] = metadata
84 self._persist()
85
86 def remove_by_doc_name(self, doc_name: str) -> bool:
87 """Remove the entry whose metadata['doc_name'] matches. Returns True if removed."""

Calls 1

_persistMethod · 0.95