Skip to content

Commit db6d822

Browse files
Fix/download model logs (#1361)
* fix/mistral-nemo-chat-template * Fix: change log when re download model * fix: remove unnecessary logs
1 parent 93bce74 commit db6d822

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

engine/commands/model_pull_cmd.cc

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ void ModelPullCmd::Exec(const std::string& input) {
66
auto result = model_service_.DownloadModel(input);
77
if (result.has_error()) {
88
CLI_LOG(result.error());
9-
} else {
10-
CLI_LOG("Model downloaded successfully!");
11-
}
9+
}
1210
}
1311
}; // namespace commands

engine/services/download_service.cc

+2
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ cpp::result<void, std::string> DownloadService::Download(
183183
CLI_LOG("Resuming download..");
184184
} else {
185185
CLI_LOG("Start over..");
186+
return {};
186187
}
187188
} else {
188189
CLI_LOG(download_item.localPath.filename().string()
@@ -231,6 +232,7 @@ cpp::result<void, std::string> DownloadService::Download(
231232

232233
fclose(file);
233234
curl_easy_cleanup(curl);
235+
CLI_LOG("Model " << download_id << " downloaded successfully!")
234236
return {};
235237
}
236238

engine/services/model_service.cc

-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ cpp::result<std::string, std::string> ModelService::HandleUrl(
223223
}}}};
224224

225225
auto on_finished = [&](const DownloadTask& finishedTask) {
226-
CLI_LOG("Model " << finishedTask.id << " downloaded successfully!")
227226
auto gguf_download_item = finishedTask.items[0];
228227
ParseGguf(gguf_download_item, author);
229228
};
@@ -295,7 +294,6 @@ cpp::result<std::string, std::string> ModelService::DownloadModelFromCortexso(
295294
return cpp::fail(result.error());
296295
}
297296

298-
CLI_LOG("Model " << model_id << " downloaded successfully!")
299297
return model_id;
300298
}
301299

0 commit comments

Comments
 (0)