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

Method __init__

llama_cpp/llama_chat_format.py:3270–3283  ·  view source on GitHub ↗
(
        self, clip_model_path: str, verbose: bool = True, use_gpu: bool = True
    )

Source from the content-addressed store, hash-verified

3268
3269class MTMDChatHandler:
3270 def __init__(
3271 self, clip_model_path: str, verbose: bool = True, use_gpu: bool = True
3272 ):
3273 import llama_cpp.mtmd_cpp as mtmd_cpp
3274
3275 self.clip_model_path = clip_model_path
3276 self.verbose = verbose
3277 self.use_gpu = use_gpu
3278 self._mtmd_cpp = mtmd_cpp
3279 self._exit_stack = ExitStack()
3280 self.mtmd_ctx: Optional[mtmd_cpp.mtmd_context_p] = None
3281
3282 if not os.path.exists(clip_model_path):
3283 raise ValueError(f"Clip model path does not exist: {clip_model_path}")
3284
3285 def _init_mtmd_context(self, llama_model: llama.Llama):
3286 self.verbose = llama_model.verbose

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected