Skip to content

Commit e2ad3ff

Browse files
ecyht2danielzgtg
andauthored
feat: Checked for extension in models directory
Co-authored-by: Daniel Tang <danielzgtg.opensource@gmail.com>
1 parent 35d7f88 commit e2ad3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ int main(int argc, const char ** argv) {
445445
const std::string model_path = args.get_string_param("--model-path");
446446
if (std::filesystem::is_directory(model_path)) {
447447
for (auto const &entry : std::filesystem::directory_iterator(model_path)) {
448-
if (!entry.is_directory()) {
448+
if (!entry.is_directory() && entry.path().extension() == ".gguf") {
449449
const std::string id = entry.path().stem();
450450
model_map[id] = entry.path().string();
451451
}

0 commit comments

Comments
 (0)