We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 928d8b1 commit 386a1edCopy full SHA for 386a1ed
llamacpp/native/src/server/server-context.cpp
@@ -1055,10 +1055,9 @@ struct server_context_impl {
1055
common_sampler_free(slot.smpl);
1056
}
1057
1058
- // If grammar is an empty string, clear it to ensure common_sampler_init doesn't try to parse it
+ // If grammar is an empty string, clear related fields to ensure common_sampler_init doesn't fail
1059
// Empty grammar means no grammar constraints should be applied
1060
if (task.params.sampling.grammar.empty()) {
1061
- task.params.sampling.grammar.clear();
1062
task.params.sampling.grammar_triggers.clear();
1063
task.params.sampling.grammar_lazy = false;
1064
0 commit comments