| 288 | } |
| 289 | |
| 290 | void common_sampler_free(struct common_sampler * gsmpl) { |
| 291 | if (gsmpl) { |
| 292 | llama_sampler_free(gsmpl->grmr); |
| 293 | |
| 294 | llama_sampler_free(gsmpl->chain); |
| 295 | |
| 296 | delete gsmpl; |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | void common_sampler_accept(struct common_sampler * gsmpl, llama_token token, bool accept_grammar) { |
| 301 | if (accept_grammar) { |