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

Method run_model

app/server/runtime.cpp:586–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584 return error_response(503, ex.what(), "server_busy");
585 }
586}
587
588void ServerState::load_models() {
589 for (auto & config : config_.models) {
590 auto loaded = std::make_unique<LoadedModel>();
591 loaded->config = std::move(config);
592 loaded->task = engine::runtime::TaskSpec{
593 engine::runtime::parse_voice_task_kind(loaded->config.task),
594 engine::runtime::parse_run_mode(loaded->config.mode),
595 };
596 if (!model_index_.emplace(loaded->config.id, models_.size()).second) {
597 throw std::runtime_error("duplicate server model id: " + loaded->config.id);
598 }

Callers

nothing calls this directly

Calls 4

elapsed_msFunction · 0.70
prepareMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected