diff --git a/engine/commands/model_pull_cmd.cc b/engine/commands/model_pull_cmd.cc index 88a474e86..b275f8beb 100644 --- a/engine/commands/model_pull_cmd.cc +++ b/engine/commands/model_pull_cmd.cc @@ -6,8 +6,6 @@ void ModelPullCmd::Exec(const std::string& input) { auto result = model_service_.DownloadModel(input); if (result.has_error()) { CLI_LOG(result.error()); - } else { - CLI_LOG("Model downloaded successfully!"); - } + } } }; // namespace commands diff --git a/engine/services/download_service.cc b/engine/services/download_service.cc index d985636f2..5ae5974a9 100644 --- a/engine/services/download_service.cc +++ b/engine/services/download_service.cc @@ -183,6 +183,7 @@ cpp::result DownloadService::Download( CLI_LOG("Resuming download.."); } else { CLI_LOG("Start over.."); + return {}; } } else { CLI_LOG(download_item.localPath.filename().string() @@ -231,6 +232,7 @@ cpp::result DownloadService::Download( fclose(file); curl_easy_cleanup(curl); + CLI_LOG("Model " << download_id << " downloaded successfully!") return {}; } diff --git a/engine/services/model_service.cc b/engine/services/model_service.cc index 0e25e71ab..344c9506a 100644 --- a/engine/services/model_service.cc +++ b/engine/services/model_service.cc @@ -223,7 +223,6 @@ cpp::result ModelService::HandleUrl( }}}}; auto on_finished = [&](const DownloadTask& finishedTask) { - CLI_LOG("Model " << finishedTask.id << " downloaded successfully!") auto gguf_download_item = finishedTask.items[0]; ParseGguf(gguf_download_item, author); }; @@ -295,7 +294,6 @@ cpp::result ModelService::DownloadModelFromCortexso( return cpp::fail(result.error()); } - CLI_LOG("Model " << model_id << " downloaded successfully!") return model_id; }