MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / get_missing_files

Method get_missing_files

src/pull/model_downloader.cpp:200–224  ·  view source on GitHub ↗

\brief Get missing files \param model_tag the model tag \return the missing files

Source from the content-addressed store, hash-verified

198/// \param model_tag the model tag
199/// \return the missing files
200std::vector<std::string> ModelDownloader::get_missing_files(const std::string& model_tag) {
201 std::vector<std::string> missing_files;
202
203 try {
204 auto [new_model_tag, model_info] = supported_models.get_model_info(model_tag);
205 std::string model_name = model_info["name"];
206 std::string model_path = supported_models.get_model_path(new_model_tag);
207 std::vector<std::string> model_files = model_info["files"];
208
209 // Check if this is a VLM model (default to false if key doesn't exist)
210
211 // Check each required model file
212 for (int i = 0; i < model_files.size(); ++i) {
213 std::string filename = model_files[i];
214 std::string file_path = get_model_file_path(model_path, filename);
215 if (!file_exists(file_path)) {
216 missing_files.push_back(filename);
217 }
218 }
219 } catch (const std::exception& e) {
220 header_print("ERROR", "Error checking missing files: " + std::string(e.what()));
221 }
222
223 return missing_files;
224}
225
226/// \brief Get present files
227/// \param model_tag the model tag

Callers 1

mainFunction · 0.80

Calls 4

get_model_infoMethod · 0.80
get_model_pathMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected