Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions engine/cli/commands/engine_install_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bool EngineInstallCmd::Exec(const std::string& engine,

httplib::Client cli(host_ + ":" + std::to_string(port_));
Json::Value json_data;
json_data["version"] = version.empty() ? "latest" : version;
auto data_str = json_data.toStyledString();
cli.set_read_timeout(std::chrono::seconds(60));
auto res = cli.Post("/v1/engines/install/" + engine, httplib::Headers(),
Expand Down
2 changes: 2 additions & 0 deletions engine/cli/commands/model_pull_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ std::optional<std::string> ModelPullCmd::Exec(const std::string& host, int port,
return std::nullopt;
}

CTL_INF("model: " << model << ", model_id: " << model_id);

// Send request download model to server
Json::Value json_data;
json_data["model"] = model;
Expand Down
6 changes: 5 additions & 1 deletion engine/controllers/engines.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ void Engines::InstallEngine(
return;
}

auto version{"latest"};
std::string version = "latest";
if (auto o = req->getJsonObject(); o) {
version = (*o).get("version", "latest").asString();
}

auto result = engine_service_->InstallEngineAsync(engine, version);
if (result.has_error()) {
Json::Value res;
Expand Down
Loading