Skip to content

Commit

Permalink
fix: run cmd (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
vansangpfiev authored Oct 1, 2024
1 parent 58ec4f9 commit c12a78f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/commands/run_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ void RunCmd::Exec(bool chat_flag) {
// If it is llamacpp, then check model status first
{
if ((mc.engine.find("llamacpp") == std::string::npos) ||
!commands::ModelStatusCmd().IsLoaded(host_, port_, model_handle_)) {
if (!ModelStartCmd().Exec(host_, port_, model_handle_)) {
!commands::ModelStatusCmd().IsLoaded(host_, port_, *model_id)) {
if (!ModelStartCmd().Exec(host_, port_, *model_id)) {
return;
}
}
}

// Chat
if (chat_flag) {
ChatCompletionCmd().Exec(host_, port_, model_handle_, mc, "");
ChatCompletionCmd().Exec(host_, port_, *model_id, mc, "");
} else {
CLI_LOG(*model_id << " model started successfully. Use `"
<< commands::GetCortexBinary() << " chat " << *model_id
Expand Down

0 comments on commit c12a78f

Please sign in to comment.