MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _save_cached

Method _save_cached

skills/embedding/scripts/embed.py:381–389  ·  view source on GitHub ↗
(self, text: str, embedding: List[float])

Source from the content-addressed store, hash-verified

379
380 try:
381 data = json.loads(cache_path.read_text(encoding="utf-8"))
382 except (json.JSONDecodeError, OSError):
383 return None
384
385 embedding = data.get("embedding")
386 if not isinstance(embedding, list):
387 return None
388 return embedding
389
390 def _save_cached(self, text: str, embedding: List[float]) -> None:
391 cache_path = self._cache_path(text)
392 payload = {

Callers 2

embed_textMethod · 0.95
embed_batchMethod · 0.95

Calls 1

_cache_pathMethod · 0.95

Tested by

no test coverage detected