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

Method __contains__

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

Source from the content-addressed store, hash-verified

86 return value
87
88 def __contains__(self, key: Sequence[int]) -> bool:
89 return self._find_longest_prefix_key(tuple(key)) is not None
90
91 def __setitem__(self, key: Sequence[int], value: "llama_cpp.llama.LlamaState"):
92 key = tuple(key)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected