MCPcopy
hub / github.com/MinishLab/semble / load_model

Function load_model

src/semble/index/dense.py:31–36  ·  view source on GitHub ↗

Return the current model, loading the default if none was provided.

(model_path: str | None = None)

Source from the content-addressed store, hash-verified

29
30
31def load_model(model_path: str | None = None) -> tuple[StaticModel, str]:
32 """Return the current model, loading the default if none was provided."""
33 if model_path is None:
34 model_path = resolve_model_name()
35 model = _load_cached(model_path)
36 return model, model_path
37
38
39def embed_chunks(model: StaticModel, chunks: list[Chunk]) -> npt.NDArray[np.float32]:

Callers 4

from_pathMethod · 0.90
from_gitMethod · 0.90
load_from_diskMethod · 0.90
test_load_modelFunction · 0.90

Calls 2

resolve_model_nameFunction · 0.90
_load_cachedFunction · 0.85

Tested by 1

test_load_modelFunction · 0.72