| 249 | } |
| 250 | |
| 251 | static bool set(const gguf_context * ctx, const int k, T & target, const struct llama_model_kv_override * ovrd = nullptr) { |
| 252 | if (try_override<T>(target, ovrd)) { |
| 253 | return true; |
| 254 | } |
| 255 | if (k < 0) { return false; } |
| 256 | target = get_kv(ctx, k); |
| 257 | return true; |
| 258 | } |
| 259 | |
| 260 | static bool set(const gguf_context * ctx, const char * key, T & target, const struct llama_model_kv_override * ovrd = nullptr) { |
| 261 | return set(ctx, gguf_find_key(ctx, key), target, ovrd); |
no test coverage detected