MCPcopy Index your code
hub / github.com/geekcomputers/Python / check_lm_studio

Function check_lm_studio

JARVIS/cli.py:58–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57
58def check_lm_studio():
59 try:
60 request = Request(f"{OPENAI_BASE_URL}/models")
61 with urlopen(request, timeout=3) as response:
62 data = json.loads(response.read().decode("utf-8"))
63 models = [item.get("id", "") for item in data.get("data", [])]
64 if OPENAI_MODEL in models:
65 say(f"LM Studio connected: {OPENAI_MODEL}")
66 else:
67 say("LM Studio is running, but the selected model was not listed.")
68 except Exception as exc:
69 say(f"LM Studio not ready: {exc}")
70
71
72def handle_command(user_input):

Callers 1

voice_loopFunction · 0.85

Calls 2

sayFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected