| 240 | } |
| 241 | |
| 242 | static bool set(const gguf_context * ctx, const int k, T & target, const struct llama_model_kv_override * ovrd = nullptr) { |
| 243 | if (try_override<T>(target, ovrd)) { |
| 244 | return true; |
| 245 | } |
| 246 | if (k < 0) { return false; } |
| 247 | target = get_kv(ctx, k); |
| 248 | return true; |
| 249 | } |
| 250 | |
| 251 | static bool set(const gguf_context * ctx, const char * key, T & target, const struct llama_model_kv_override * ovrd = nullptr) { |
| 252 | return set(ctx, gguf_find_key(ctx, key), target, ovrd); |
no test coverage detected