mirror of
https://github.com/RYDE-WORK/llama.cpp.git
synced 2026-01-19 21:23:26 +08:00
sampling : null grammar field after reset (#3885)
This commit is contained in:
parent
9a3b4f6c86
commit
e75dfdd31b
@ -39,6 +39,7 @@ void llama_sampling_free(struct llama_sampling_context * ctx) {
|
||||
void llama_sampling_reset(llama_sampling_context * ctx) {
|
||||
if (ctx->grammar != NULL) {
|
||||
llama_grammar_free(ctx->grammar);
|
||||
ctx->grammar = NULL;
|
||||
}
|
||||
|
||||
if (!ctx->parsed_grammar.rules.empty()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user