null grammar field after reset
This commit is contained in:
parent
238657db23
commit
524c6ca8a7
1 changed files with 1 additions and 0 deletions
|
@ -39,6 +39,7 @@ void llama_sampling_free(struct llama_sampling_context * ctx) {
|
||||||
void llama_sampling_reset(llama_sampling_context * ctx) {
|
void llama_sampling_reset(llama_sampling_context * ctx) {
|
||||||
if (ctx->grammar != NULL) {
|
if (ctx->grammar != NULL) {
|
||||||
llama_grammar_free(ctx->grammar);
|
llama_grammar_free(ctx->grammar);
|
||||||
|
ctx->grammar = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ctx->parsed_grammar.rules.empty()) {
|
if (!ctx->parsed_grammar.rules.empty()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue