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

Method __contains__

llama_cpp/llama_cache.py:141–142  ·  view source on GitHub ↗
(self, key: Sequence[int])

Source from the content-addressed store, hash-verified

139 return value
140
141 def __contains__(self, key: Sequence[int]) -> bool:
142 return self._find_longest_prefix_key(tuple(key)) is not None
143
144 def __setitem__(self, key: Sequence[int], value: "llama_cpp.llama.LlamaState"):
145 print("LlamaDiskCache.__setitem__: called", file=sys.stderr)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected