MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / decorator

Function decorator

llama_cpp/llama_cpp_ext.py:26–40  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

24 """Decorator for extension functions whose exported symbol name can vary by ABI."""
25
26 def decorator(f):
27 missing: list[str] = []
28 for name in names:
29 try:
30 func = getattr(_lib, name)
31 except AttributeError:
32 missing.append(name)
33 continue
34 func.argtypes = argtypes
35 func.restype = restype
36 functools.wraps(f)(func)
37 return func
38 raise AttributeError(
39 f"None of the shared library symbols were found: {', '.join(missing)}"
40 )
41
42 return decorator
43

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…