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

Method get_kwarg_or_pos

subprojects/llama.cpp/common/jinja/value.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31value func_args::get_kwarg_or_pos(const std::string & key, size_t pos) const {
32 value val = get_kwarg(key, mk_val<value_undefined>());
33
34 if (val->is_undefined() && pos < count() && !is_val<value_kwarg>(args[pos])) {
35 return args[pos];
36 }
37
38 return val;
39}
40
41value func_args::get_pos(size_t pos) const {
42 if (count() > pos) {

Callers 3

tojsonFunction · 0.80
default_valueFunction · 0.80
value.cppFile · 0.80

Calls 1

is_undefinedMethod · 0.45

Tested by

no test coverage detected