MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / ensure_model

Method ensure_model

core/loader_v2.py:351–355  ·  view source on GitHub ↗

Ensure the model is loaded and running.

(self, model_type: str = "primary")

Source from the content-addressed store, hash-verified

349 self._loaded = False
350
351 def ensure_model(self, model_type: str = "primary") -> bool:
352 """Ensure the model is loaded and running."""
353 if self._loaded and self._server and self._server.is_running():
354 return True
355 return self.load_primary()
356
357 def get_loaded_model(self) -> Optional[str]:
358 """Get the currently loaded model type."""

Callers 2

inferFunction · 0.80
_main_loopMethod · 0.80

Calls 2

load_primaryMethod · 0.95
is_runningMethod · 0.45

Tested by

no test coverage detected