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

Method fingerprint_file

examples/server/server.py:12360–12363  ·  view source on GitHub ↗
(path: str)

Source from the content-addressed store, hash-verified

12358
12359 @staticmethod
12360 def fingerprint_file(path: str) -> str:
12361 stat = os.stat(path)
12362 payload = f"{Path(path).resolve()}:{stat.st_size}:{stat.st_mtime_ns}"
12363 return hashlib.sha256(payload.encode("utf-8")).hexdigest()
12364
12365 @classmethod
12366 def compatibility_key_for_model(cls, model: "Model") -> str:

Callers 3

__init__Method · 0.45
mainFunction · 0.45

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected