Return the current model, loading the default if none was provided.
(model_path: str | None = None)
| 29 | |
| 30 | |
| 31 | def 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 | |
| 39 | def embed_chunks(model: StaticModel, chunks: list[Chunk]) -> npt.NDArray[np.float32]: |