Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
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
21 changes: 1 addition & 20 deletions controllers/llamaCPP.h
Original file line number Diff line number Diff line change
Expand Up @@ -2496,25 +2496,6 @@ class llamaCPP : public drogon::HttpController<llamaCPP> {
log_disable(); // Disable the log to file feature, reduce bloat for
// target
// system ()
std::vector<std::string> llama_models =
nitro_utils::listFilesInDir(nitro_utils::models_folder);
std::string model_index;
if (llama_models.size() > 0) {
LOG_INFO << "Found models folder, here are the llama models you have:";
int index_val = 0;
for (auto llama_model : llama_models) {
LOG_INFO << "index: " << index_val++ << "| model: " << llama_model;
std::cout
<< "Please type the index of the model you want to load here >> ";
std::cin >> model_index;
Json::Value jsonBody;
jsonBody["llama_model_path"] = nitro_utils::models_folder + "/" +
llama_models[std::stoi(model_index)];
loadModelImpl(jsonBody);
}
} else {
LOG_INFO << "Not found models folder, start server as usual";
}
}

~llamaCPP() { stopBackgroundTask(); }
Expand Down Expand Up @@ -2575,4 +2556,4 @@ class llamaCPP : public drogon::HttpController<llamaCPP> {
std::atomic<bool> single_queue_is_busy; // This value only used under the
// condition n_parallel is 1
};
}; // namespace inferences
}; // namespace inferences