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

Method __init__

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

Source from the content-addressed store, hash-verified

2774 )
2775
2776 def __init__(self, clip_model_path: str, verbose: bool = True):
2777 import llama_cpp.mtmd_cpp as mtmd_cpp
2778
2779 self.clip_model_path = clip_model_path
2780 self.verbose = verbose
2781 self._mtmd_cpp = mtmd_cpp
2782 self._exit_stack = ExitStack()
2783 self.mtmd_ctx: Optional[mtmd_cpp.mtmd_context_p] = None
2784
2785 if not os.path.exists(clip_model_path):
2786 raise ValueError(f"Clip model path does not exist: {clip_model_path}")
2787
2788 def _init_mtmd_context(self, llama_model: llama.Llama):
2789 """Initialize mtmd context with the llama model."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected