MCPcopy Create free account
hub / github.com/UbiquitousLearning/mllm / load

Method load

mllm/engine/ConfigFile.cpp:18–28  ·  view source on GitHub ↗

Loads the configuration from a file.

Source from the content-addressed store, hash-verified

16
17// Loads the configuration from a file.
18void ConfigFile::load(const std::string& file_path) {
19 std::ifstream file(file_path);
20 if (!file.is_open()) { MLLM_ERROR_EXIT(ExitCode::kIOError, "Failed to open config file: {}", file_path); }
21
22 try {
23 // The nlohmann::json stream operator overload handles parsing directly.
24 file >> json_;
25 } catch (const nlohmann::json::parse_error& e) {
26 throw std::runtime_error("JSON parse error in file " + file_path + ": " + e.what());
27 }
28}
29
30// Loads the configuration from a string.
31void ConfigFile::loadString(const std::string& json_str) {

Callers 1

idleMethod · 0.45

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected