MCPcopy
hub / github.com/Fosowl/agenticSeek / load_llm_router

Method load_llm_router

sources/router.py:45–59  ·  view source on GitHub ↗

Load the LLM router model. returns: AdaptiveClassifier: The loaded model exceptions: Exception: If the safetensors fails to load

(self)

Source from the content-addressed store, hash-verified

43 }
44
45 def load_llm_router(self) -> AdaptiveClassifier:
46 """
47 Load the LLM router model.
48 returns:
49 AdaptiveClassifier: The loaded model
50 exceptions:
51 Exception: If the safetensors fails to load
52 """
53 path = "../llm_router" if __name__ == "__main__" else "./llm_router"
54 try:
55 animate_thinking("Loading LLM router model...", color="status")
56 talk_classifier = AdaptiveClassifier.from_pretrained(path)
57 except Exception as e:
58 raise Exception("Failed to load the routing model. Please run the dl_safetensors.sh script inside llm_router/ directory to download the model.")
59 return talk_classifier
60
61 def get_device(self) -> str:
62 if torch.backends.mps.is_available():

Callers 1

__init__Method · 0.95

Calls 1

animate_thinkingFunction · 0.90

Tested by

no test coverage detected