-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1227 from janhq/j/download-model-direct-url
feat: download model with direct url
- Loading branch information
Showing
35 changed files
with
620 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include "services/engine_service.h" | ||
|
||
namespace commands { | ||
class EngineGetCmd { | ||
public: | ||
EngineGetCmd(const std::string& engine) : engine_{engine} {}; | ||
explicit EngineGetCmd() : engine_service_{EngineService()} {}; | ||
|
||
void Exec() const; | ||
void Exec(const std::string& engineName) const; | ||
|
||
private: | ||
std::string engine_; | ||
EngineService engine_service_; | ||
}; | ||
} // namespace commands |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "engine_install_cmd.h" | ||
// clang-format off | ||
#include "utils/cortexso_parser.h" | ||
#include "utils/archive_utils.h" | ||
// clang-format on | ||
#include "utils/cuda_toolkit_utils.h" | ||
#include "utils/engine_matcher_utils.h" | ||
#include "utils/logging_utils.h" | ||
|
||
namespace commands { | ||
|
||
void EngineInstallCmd::Exec(const std::string& engine, | ||
const std::string& version) { | ||
engine_service_.InstallEngine(engine, version); | ||
CLI_LOG("Engine " << engine << " installed successfully!"); | ||
} | ||
}; // namespace commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include "services/engine_service.h" | ||
|
||
namespace commands { | ||
|
||
class EngineInstallCmd { | ||
public: | ||
explicit EngineInstallCmd() : engine_service_{EngineService()} {}; | ||
|
||
void Exec(const std::string& engine, const std::string& version = "latest"); | ||
|
||
private: | ||
EngineService engine_service_; | ||
}; | ||
} // namespace commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include "services/engine_service.h" | ||
|
||
namespace commands { | ||
class EngineUninstallCmd { | ||
public: | ||
EngineUninstallCmd(std::string engine); | ||
explicit EngineUninstallCmd() : engine_service_{EngineService()} {}; | ||
|
||
void Exec() const; | ||
void Exec(const std::string& engine); | ||
|
||
private: | ||
std::string engine_; | ||
EngineService engine_service_; | ||
}; | ||
} // namespace commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.