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

Method save

openkb/agent/chat_session.py:153–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

151 }
152
153 def save(self) -> None:
154 self.path.parent.mkdir(parents=True, exist_ok=True)
155 tmp = self.path.with_suffix(".json.tmp")
156 tmp.write_text(
157 json.dumps(self.to_dict(), ensure_ascii=False, indent=2, default=str),
158 encoding="utf-8",
159 )
160 os.replace(tmp, self.path)
161
162 def record_turn(
163 self,

Callers 2

record_turnMethod · 0.95
extract_pdf_imagesFunction · 0.80

Calls 1

to_dictMethod · 0.95

Tested by

no test coverage detected