diff --git a/llama-box/main.cpp b/llama-box/main.cpp index f3d883b..4110764 100644 --- a/llama-box/main.cpp +++ b/llama-box/main.cpp @@ -2592,14 +2592,18 @@ int main(int argc, char **argv) { // load the model if (!ctx_server.load_model(bparams)) { + state.store(SERVER_STATE_ERROR); return 1; } LOG_INFO("model loaded", {}); + // init server if (!ctx_server.init()) { + state.store(SERVER_STATE_ERROR); return 1; } LOG_INFO("server initialized", {}); + state.store(SERVER_STATE_READY); // if a custom chat template is not supplied, we will use the one that comes // with the model (if any) diff --git a/llama-box/tools/completion.sh b/llama-box/tools/completion.sh index 99282c5..6df2ac6 100755 --- a/llama-box/tools/completion.sh +++ b/llama-box/tools/completion.sh @@ -140,7 +140,7 @@ echo "SEED : ${SEED}" printf "=====================================================\n\n" if [[ -f "${LOG_FILE}" ]]; then - rm -f "${LOG_FILE}" + : > "${LOG_FILE}" fi if [[ ! -f "${LOG_FILE}" ]]; then touch "${LOG_FILE}"