MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / validate_request

Method validate_request

src/framework/runtime/registry.cpp:151–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 return load(request);
150}
151
152void ModelRegistry::validate_request(const ModelLoadRequest & request) const {
153 const bool builtin_audio_utility_id =
154 request.family_hint.has_value() &&
155 *request.family_hint == "builtin_audio_utils" &&
156 engine::audio::find_builtin_audio_utility(request.model_path.generic_string()).has_value();
157 if (!builtin_audio_utility_id &&
158 !engine::io::is_existing_file(request.model_path) &&
159 !engine::io::is_existing_directory(request.model_path)) {
160 throw std::runtime_error("model path does not exist: " + request.model_path.string());
161 }

Callers

nothing calls this directly

Calls 2

is_existing_fileFunction · 0.85
is_existing_directoryFunction · 0.85

Tested by

no test coverage detected