MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / parse_bool_arg

Function parse_bool_arg

subprojects/llama.cpp/common/preset.cpp:287–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287static std::string parse_bool_arg(const common_arg & arg, const std::string & key, const std::string & value) {
288 // if this is a negated arg, we need to reverse the value
289 for (const auto & neg_arg : arg.args_neg) {
290 if (rm_leading_dashes(neg_arg) == key) {
291 return common_arg_utils::is_truthy(value) ? "false" : "true";
292 }
293 }
294 // otherwise, not negated
295 return value;
296}
297
298common_preset_context::common_preset_context(llama_example ex, bool only_remote_allowed)
299 : ctx_params(common_params_parser_init(default_params, ex)) {

Callers 1

load_from_iniMethod · 0.85

Calls 1

rm_leading_dashesFunction · 0.85

Tested by

no test coverage detected