MCPcopy Create free account
hub / github.com/78/tenbox / LoadHostSettings

Function LoadHostSettings

src/daemon/host_settings.cpp:78–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78HostSettings LoadHostSettings(const std::string& data_dir) {
79 HostSettings out;
80 fs::path path = fs::path(data_dir) / kHostSettingsFile;
81 std::ifstream in(path);
82 if (!in) return out;
83 auto json = nlohmann::json::parse(in, nullptr, false);
84 if (json.is_discarded() || !json.is_object()) return out;
85 if (json.contains("llm_proxy")) {
86 out.llm_proxy = LlmProxyFromJson(json["llm_proxy"]);
87 }
88 return out;
89}
90
91bool SaveHostSettings(const std::string& data_dir, const HostSettings& settings) {
92 nlohmann::json doc = {

Callers 1

StartMethod · 0.85

Calls 1

LlmProxyFromJsonFunction · 0.85

Tested by

no test coverage detected