MCPcopy Create free account
hub / github.com/cactus-compute/cactus / _ensure_chat_binary

Function _ensure_chat_binary

python/src/cli.py:137–157  ·  view source on GitHub ↗
(project_root, lib_path)

Source from the content-addressed store, hash-verified

135
136
137def _ensure_chat_binary(project_root, lib_path):
138 tests_dir = project_root / "tests"
139 build_dir = tests_dir / "build"
140 chat_binary = build_dir / "chat"
141 chat_cpp = tests_dir / "chat.cpp"
142
143 if not _is_stale_binary(chat_binary, [lib_path, chat_cpp]):
144 return chat_binary
145
146 print_color(YELLOW, "Refreshing chat binary for current Cactus library...")
147 build_args = argparse.Namespace(
148 apple=False,
149 android=False,
150 flutter=False,
151 python=False,
152 )
153 result = cmd_build(build_args)
154 if result != 0 or not chat_binary.exists():
155 raise RuntimeError("Failed to rebuild chat binary")
156
157 return chat_binary
158
159
160def ensure_vad_weights(model_id, weights_dir, precision='INT8'):

Callers 1

cmd_runFunction · 0.85

Calls 3

_is_stale_binaryFunction · 0.85
print_colorFunction · 0.85
cmd_buildFunction · 0.85

Tested by

no test coverage detected