| 29 | } |
| 30 | |
| 31 | void llama_sampling_free(struct llama_sampling_context * ctx) { |
| 32 | if (ctx->grammar != NULL) { |
| 33 | llama_grammar_free(ctx->grammar); |
| 34 | } |
| 35 | |
| 36 | delete ctx; |
| 37 | } |
| 38 | |
| 39 | void llama_sampling_reset(llama_sampling_context * ctx) { |
| 40 | if (ctx->grammar != NULL) { |