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

Method get_kv

subprojects/llama.cpp/src/llama-model-loader.cpp:153–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151
152 public:
153 static T get_kv(const gguf_context * ctx, const int k) {
154 const enum gguf_type kt = gguf_get_kv_type(ctx, k);
155
156 if (kt != GKV::gt) {
157 throw std::runtime_error(format("key %s has wrong type %s but expected type %s",
158 gguf_get_key(ctx, k), gguf_type_name(kt), gguf_type_name(GKV::gt)));
159 }
160 return GKV::getter(ctx, k);
161 }
162
163 static const char * override_type_to_str(const llama_model_kv_override_type ty) {
164 switch (ty) {

Callers

nothing calls this directly

Calls 4

gguf_get_kv_typeFunction · 0.85
formatFunction · 0.85
gguf_get_keyFunction · 0.85
gguf_type_nameFunction · 0.85

Tested by

no test coverage detected