| 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) { |
nothing calls this directly
no test coverage detected