MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / _safe_open

Method _safe_open

examples/server/server.py:12388–12396  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

12386
12387 @staticmethod
12388 def _safe_open(path: Path) -> Any:
12389 try:
12390 from safetensors import safe_open
12391 except ImportError as exc:
12392 raise ImportError(
12393 "disk_cache requires safetensors. Install it with `pip install safetensors`."
12394 ) from exc
12395
12396 return safe_open(str(path), framework="numpy")
12397
12398 @staticmethod
12399 def _save_file(

Callers 2

_read_entry_headerMethod · 0.95
_read_entry_payloadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected